15 #include "../view_map/Interface1D.h"
16 #include "../view_map/Silhouette.h"
18 #include "../system/FreestyleConfig.h"
19 #include "../system/StringUtils.h"
21 #ifdef WITH_CXX_GUARDEDALLOC
121 return Vec3f(_color[0], _color[1], _color[2]);
142 return _thickness[0];
148 return _thickness[1];
155 return Vec2f(_thickness[0], _thickness[1]);
245 _thickness[0] = tRL[0];
246 _thickness[1] = tRL[1];
286 typedef std::map<const char *, float, StringUtils::ltstr> realMap;
287 typedef std::map<const char *, Vec2f, StringUtils::ltstr> Vec2fMap;
288 typedef std::map<const char *, Vec3f, StringUtils::ltstr> Vec3fMap;
297 realMap *_userAttributesReal;
298 Vec2fMap *_userAttributesVec2f;
299 Vec3fMap *_userAttributesVec3f;
301 #ifdef WITH_CXX_GUARDEDALLOC
302 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:StrokeAttribute")
317 return "StrokeVertex";
322 float _CurvilignAbscissa;
388 return _CurvilignAbscissa;
394 return _StrokeLength;
398 inline float u()
const
400 return _CurvilignAbscissa / _StrokeLength;
439 _Attribute = iAttribute;
445 _CurvilignAbscissa = iAbscissa;
453 _StrokeLength = iLength;
459 #ifdef WITH_CXX_GUARDEDALLOC
460 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:StrokeVertex")
469 class StrokeRenderer;
472 namespace StrokeInternal {
530 unsigned int _textureId;
535 Vec2r _extremityOrientations[2];
552 template<
class InputVertexIterator>
Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd);
660 return (_mtex[0] !=
NULL) || _nodeTree;
672 return _Vertices.size();
677 return _ViewEdges.begin();
682 return _ViewEdges.begin();
687 return _ViewEdges.end();
692 return _ViewEdges.end();
697 return _ViewEdges.size();
702 return _extremityOrientations[0];
707 return _extremityOrientations[0].
x();
712 return _extremityOrientations[0].
y();
717 return _extremityOrientations[1];
722 return _extremityOrientations[1].
x();
727 return _extremityOrientations[1].
y();
773 _nodeTree = iNodeTree;
784 _Vertices.push_back(iVertex);
789 _Vertices.push_front(iVertex);
794 _ViewEdges.push_back(iViewEdge);
799 _extremityOrientations[0] = iOrientation;
804 _extremityOrientations[0] =
Vec2r(
x,
y);
809 _extremityOrientations[1] = iOrientation;
814 _extremityOrientations[1] =
Vec2r(
x,
y);
839 return _Vertices.size();
845 return *(_Vertices.at(i));
858 #ifdef WITH_CXX_GUARDEDALLOC
859 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Stroke")
868 template<
class InputVertexIterator>
871 for (InputVertexIterator
v = iBegin, vend = iEnd;
v != vend;
v++) {
872 _Vertices.push_back(*
v);
Class to define a container for curves.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Read Guarded memory(de)allocation.
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 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
const float * getThickness() const
bool isAttributeAvailableVec2f(const char *iName) const
void setAlpha(float alpha)
void setColor(const Vec3f &iRGB)
const float * getColor() const
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
float curvilinearAbscissa() const
void setCurvilinearAbscissa(float iAbscissa)
const StrokeAttribute & attribute() const
real operator[](const int i) const
void setAttribute(const StrokeAttribute &iAttribute)
float strokeLength() const
void setPoint(real x, real y)
StrokeAttribute & attribute()
void setPoint(const Vec2r &p)
StrokeVertex & operator=(const StrokeVertex &iBrother)
void setStrokeLength(float iLength)
real & operator[](const int i)
virtual string getExactTypeName() const
virtual Interface0DIterator pointsEnd(float t=0.0f)
viewedge_container::iterator viewedges_end()
const_vertex_iterator vertices_begin() const
embedding vertex iterator
viewedge_container::const_iterator viewedges_end() const
void push_back(StrokeVertex *iVertex)
void setBeginningOrientation(const Vec2r &iOrientation)
bNodeTree * getNodeTree()
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
StrokeVertex & strokeVerticeAt(unsigned int i)
void setEndingOrientation(real x, real y)
void AddViewEdge(ViewEdge *iViewEdge)
void RemoveVertex(StrokeVertex *iVertex)
void push_front(StrokeVertex *iVertex)
void setTextureId(unsigned int id)
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 Render(const StrokeRenderer *iRenderer)
void setEndingOrientation(const Vec2r &iOrientation)
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
unsigned int getTextureId()
void setMediumType(MediumType iType)
unsigned int strokeVerticesSize() const
VecMat::Vec2< real > Vec2r
VecMat::Vec2< float > Vec2f
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)