23#ifdef WITH_CXX_GUARDEDALLOC
123 return Vec3f(_color[0], _color[1], _color[2]);
144 return _thickness[0];
150 return _thickness[1];
157 return Vec2f(_thickness[0], _thickness[1]);
247 _thickness[0] = tRL[0];
248 _thickness[1] = tRL[1];
288 typedef std::map<const char *, float, StringUtils::ltstr> realMap;
289 typedef std::map<const char *, Vec2f, StringUtils::ltstr> Vec2fMap;
290 typedef std::map<const char *, Vec3f, StringUtils::ltstr> Vec3fMap;
299 realMap *_userAttributesReal;
300 Vec2fMap *_userAttributesVec2f;
301 Vec3fMap *_userAttributesVec3f;
303#ifdef WITH_CXX_GUARDEDALLOC
304 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:StrokeAttribute")
319 return "StrokeVertex";
324 float _CurvilignAbscissa;
390 return _CurvilignAbscissa;
396 return _StrokeLength;
400 inline float u()
const
402 return _CurvilignAbscissa / _StrokeLength;
441 _Attribute = iAttribute;
447 _CurvilignAbscissa = iAbscissa;
455 _StrokeLength = iLength;
461#ifdef WITH_CXX_GUARDEDALLOC
462 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:StrokeVertex")
474namespace StrokeInternal {
537 Vec2r _extremityOrientations[2];
554 template<
class InputVertexIterator>
Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd);
662 return (_mtex[0] !=
nullptr) || _nodeTree;
674 return _Vertices.size();
679 return _ViewEdges.begin();
684 return _ViewEdges.begin();
689 return _ViewEdges.end();
694 return _ViewEdges.end();
699 return _ViewEdges.size();
704 return _extremityOrientations[0];
709 return _extremityOrientations[0].
x();
714 return _extremityOrientations[0].
y();
719 return _extremityOrientations[1];
724 return _extremityOrientations[1].
x();
729 return _extremityOrientations[1].
y();
763 for (
int a = 0; a <
MAX_MTEX; a++) {
775 _nodeTree = iNodeTree;
786 _Vertices.push_back(iVertex);
791 _Vertices.push_front(iVertex);
796 _ViewEdges.push_back(iViewEdge);
801 _extremityOrientations[0] = iOrientation;
806 _extremityOrientations[0] =
Vec2r(x, y);
811 _extremityOrientations[1] = iOrientation;
816 _extremityOrientations[1] =
Vec2r(x, y);
841 return _Vertices.size();
847 return *(_Vertices.at(i));
860#ifdef WITH_CXX_GUARDEDALLOC
861 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Stroke")
870template<
class InputVertexIterator>
873 for (InputVertexIterator
v = iBegin, vend = iEnd;
v != vend;
v++) {
874 _Vertices.push_back(*
v);
Class to define a container for curves.
Configuration definitions.
Interface 1D and related tools definitions.
Read Guarded memory(de)allocation.
Classes to define a silhouette structure.
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual Vec2r getPoint2D() const
void setThickness(const Vec2f &tRL)
virtual ~StrokeAttribute()
void setVisible(bool iVisible)
bool isAttributeAvailableVec3f(const char *iName) const
Vec2f getThicknessRL() const
void setThickness(float tr, float tl)
Vec3f getAttributeVec3f(const char *iName) const
void setAttributeReal(const char *iName, float att)
const float * getThickness() const
const float * getColor() const
const float getThicknessR() const
const float getColorR() const
void setAttributeVec3f(const char *iName, const Vec3f &att)
const float getColorB() const
const float getThicknessL() const
Vec3f getColorRGB() const
void setColor(float r, float g, float b)
const float getColorG() const
bool isAttributeAvailableVec2f(const char *iName) const
void setAlpha(float alpha)
void setColor(const Vec3f &iRGB)
Vec2f getAttributeVec2f(const char *iName) const
void setAttributeVec2f(const char *iName, const Vec2f &att)
StrokeAttribute & operator=(const StrokeAttribute &iBrother)
bool isAttributeAvailableReal(const char *iName) const
float getAttributeReal(const char *iName) const
real & operator[](const int i)
float curvilinearAbscissa() const
void setCurvilinearAbscissa(float iAbscissa)
real operator[](const int i) const
void setAttribute(const StrokeAttribute &iAttribute)
float strokeLength() const
void setPoint(real x, real y)
const StrokeAttribute & attribute() const
void setPoint(const Vec2r &p)
StrokeVertex & operator=(const StrokeVertex &iBrother)
void setStrokeLength(float iLength)
virtual string getExactTypeName() const
StrokeAttribute & attribute()
virtual Interface0DIterator pointsEnd(float t=0.0f)
viewedge_container::iterator viewedges_end()
void setTextureId(uint id)
const_vertex_iterator vertices_begin() const
embedding vertex iterator
viewedge_container::const_iterator viewedges_end() const
void push_back(StrokeVertex *iVertex)
StrokeVertex & strokeVerticeAt(uint i)
void setBeginningOrientation(const Vec2r &iOrientation)
int viewedges_size() const
void setTextureStep(float step)
void ScaleThickness(float iFactor)
void setBeginningOrientation(real x, real y)
virtual Interface0DIterator verticesBegin()
StrokeInternal::vertex_iterator_base< StrokeInternal::vertex_nonconst_traits > vertex_iterator
std::vector< ViewEdge * > viewedge_container
StrokeInternal::vertex_iterator_base< StrokeInternal::vertex_const_traits > const_vertex_iterator
void setEndingOrientation(real x, real y)
bNodeTree * getNodeTree()
void AddViewEdge(ViewEdge *iViewEdge)
void RemoveVertex(StrokeVertex *iVertex)
void push_front(StrokeVertex *iVertex)
void InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next)
real getEndingOrientationX() const
int vertices_size() const
const_vertex_iterator vertices_end() const
std::deque< StrokeVertex * > vertex_container
virtual Interface0DIterator verticesEnd()
real getBeginningOrientationY() const
void setEndingOrientation(const Vec2r &iOrientation)
uint strokeVerticesSize() const
MediumType getMediumType() const
virtual Interface0DIterator pointsBegin(float t=0.0f)
Vec2r getBeginningOrientation() const
void RenderBasic(const StrokeRenderer *iRenderer)
Stroke & operator=(const Stroke &iBrother)
void setLength(float iLength)
float ComputeSampling(int iNVertices)
viewedge_container::const_iterator viewedges_begin() const
StrokeInternal::StrokeVertexIterator strokeVerticesEnd()
Vec2r getEndingOrientation() const
viewedge_container::iterator viewedges_begin()
StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t=0.0f)
virtual string getExactTypeName() const
real getEndingOrientationY() const
void setNodeTree(bNodeTree *iNodeTree)
int Resample(int iNPoints)
real getBeginningOrientationX() const
void setMediumType(MediumType iType)
local_group_size(16, 16) .push_constant(Type b
VecMat::Vec3< float > Vec3f
VecMat::Vec2< real > Vec2r
VecMat::Vec2< float > Vec2f