12 #include "../geometry/Geom.h"
14 #ifdef WITH_CXX_GUARDEDALLOC
27 # define NO_TEXTURE_WITH_BLEND_STROKE -2
28 # define NO_TEXTURE_STROKE -1
29 # define PSEUDO_CHARCOAL_STROKE 0
30 # define WASH_BRUSH_STROKE 1
32 # define NO_BLEND_STROKE 3
33 # define CHARCOAL_MIN_STROKE 4
34 # define BRUSH_MIN_STROKE 5
35 # define OPAQUE_DRY_STROKE 6
36 # define OPAQUE_STROKE 7
38 # define DEFAULT_STROKE 0
40 # define NUMBER_STROKE_RENDERER 8
69 return _texCoord_w_tips;
118 #ifdef WITH_CXX_GUARDEDALLOC
119 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:StrokeVertexRep")
132 Strip(
const std::vector<StrokeVertex *> &iStrokeVertices,
134 bool tipBegin =
false,
136 float texStep = 1.0);
141 void createStrip(
const std::vector<StrokeVertex *> &iStrokeVertices);
142 void cleanUpSingularities(
const std::vector<StrokeVertex *> &iStrokeVertices);
143 void setVertexColor(
const std::vector<StrokeVertex *> &iStrokeVertices);
144 void computeTexCoord(
const std::vector<StrokeVertex *> &iStrokeVertices,
float texStep);
145 void computeTexCoordWithTips(
const std::vector<StrokeVertex *> &iStrokeVertices,
153 return _vertices.size();
161 #ifdef WITH_CXX_GUARDEDALLOC
162 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Strip")
230 return _strips.size();
246 _textureId = textureId;
254 inline void setMTex(
int idx,
MTex *mtex_ptr)
256 _mtex[idx] = mtex_ptr;
260 #ifdef WITH_CXX_GUARDEDALLOC
261 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)
std::unique_ptr< IDProperty, IDPropertyDeleter > create(StringRefNull prop_name, int32_t value)
Allocate a new IDProperty of type IDP_INT, set its name and value.