26 #include "../geometry/Geom.h"
28 #ifdef WITH_CXX_GUARDEDALLOC
41 # define NO_TEXTURE_WITH_BLEND_STROKE -2
42 # define NO_TEXTURE_STROKE -1
43 # define PSEUDO_CHARCOAL_STROKE 0
44 # define WASH_BRUSH_STROKE 1
46 # define NO_BLEND_STROKE 3
47 # define CHARCOAL_MIN_STROKE 4
48 # define BRUSH_MIN_STROKE 5
49 # define OPAQUE_DRY_STROKE 6
50 # define OPAQUE_STROKE 7
52 # define DEFAULT_STROKE 0
54 # define NUMBER_STROKE_RENDERER 8
83 return _texCoord_w_tips;
108 _texCoord_w_tips = p;
132 #ifdef WITH_CXX_GUARDEDALLOC
133 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:StrokeVertexRep")
146 Strip(
const std::vector<StrokeVertex *> &iStrokeVertices,
148 bool tipBegin =
false,
150 float texStep = 1.0);
155 void createStrip(
const std::vector<StrokeVertex *> &iStrokeVertices);
156 void cleanUpSingularities(
const std::vector<StrokeVertex *> &iStrokeVertices);
157 void setVertexColor(
const std::vector<StrokeVertex *> &iStrokeVertices);
158 void computeTexCoord(
const std::vector<StrokeVertex *> &iStrokeVertices,
float texStep);
159 void computeTexCoordWithTips(
const std::vector<StrokeVertex *> &iStrokeVertices,
167 return _vertices.size();
175 #ifdef WITH_CXX_GUARDEDALLOC
176 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Strip")
201 virtual void create();
244 return _strips.size();
260 _textureId = textureId;
268 inline void setMTex(
int idx,
MTex *mtex_ptr)
270 _mtex[idx] = mtex_ptr;
274 #ifdef WITH_CXX_GUARDEDALLOC
275 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:StrokeRep")
Read Guarded memory(de)allocation.
Classes to define a stroke.
ATTR_WARN_UNUSED_RESULT BMesh const char itype
vertex_container _vertices
std::vector< StrokeVertexRep * > vertex_container
vertex_container & vertices()
unsigned int getNumberOfStrips() const
Stroke::MediumType _strokeType
void setMediumType(Stroke::MediumType itype)
bNodeTree * getNodeTree() const
MTex * getMTex(int idx) const
Material * getMaterial() const
vector< Strip * > _strips
void setMaterial(Material *mat)
void setTextureId(unsigned textureId)
Stroke::MediumType getMediumType() const
unsigned getTextureId() const
vector< Strip * > & getStrips()
virtual ~StrokeVertexRep()
void setPoint2d(const Vec2r &p)
Vec2r & texCoord(bool tips=false)
void setTexCoord(const Vec2r &p, bool tips=false)
void setColor(const Vec3r &p)
StrokeVertexRep(const Vec2r &iPoint2d)