Blender  V3.3
Stroke.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #include <map>
11 #include <vector>
12 
13 #include "Curve.h"
14 
15 #include "../view_map/Interface1D.h"
16 #include "../view_map/Silhouette.h"
17 
18 #include "../system/FreestyleConfig.h"
19 #include "../system/StringUtils.h"
20 
21 #ifdef WITH_CXX_GUARDEDALLOC
22 # include "MEM_guardedalloc.h"
23 #endif
24 
25 extern "C" {
26 struct MTex;
27 struct bNodeTree;
28 }
29 
30 #ifndef MAX_MTEX
31 # define MAX_MTEX 18
32 #endif
33 
34 namespace Freestyle {
35 
36 //
37 // StrokeAttribute
38 //
40 
45  public:
48 
50  StrokeAttribute(const StrokeAttribute &iBrother);
51 
66  StrokeAttribute(float iRColor,
67  float iGColor,
68  float iBColor,
69  float iAlpha,
70  float iRThickness,
71  float iLThickness);
72 
82  StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribute &a2, float t);
83 
85  virtual ~StrokeAttribute();
86 
87  /* operators */
89  StrokeAttribute &operator=(const StrokeAttribute &iBrother);
90 
91  /* accessors */
95  inline const float *getColor() const
96  {
97  return _color;
98  }
99 
101  inline const float getColorR() const
102  {
103  return _color[0];
104  }
105 
107  inline const float getColorG() const
108  {
109  return _color[1];
110  }
111 
113  inline const float getColorB() const
114  {
115  return _color[2];
116  }
117 
119  inline Vec3f getColorRGB() const
120  {
121  return Vec3f(_color[0], _color[1], _color[2]);
122  }
123 
125  inline float getAlpha() const
126  {
127  return _alpha;
128  }
129 
134  inline const float *getThickness() const
135  {
136  return _thickness;
137  }
138 
140  inline const float getThicknessR() const
141  {
142  return _thickness[0];
143  }
144 
146  inline const float getThicknessL() const
147  {
148  return _thickness[1];
149  }
150 
153  inline Vec2f getThicknessRL() const
154  {
155  return Vec2f(_thickness[0], _thickness[1]);
156  }
157 
159  inline bool isVisible() const
160  {
161  return _visible;
162  }
163 
168  float getAttributeReal(const char *iName) const;
169 
174  Vec2f getAttributeVec2f(const char *iName) const;
175 
180  Vec3f getAttributeVec3f(const char *iName) const;
181 
183  bool isAttributeAvailableReal(const char *iName) const;
184 
186  bool isAttributeAvailableVec2f(const char *iName) const;
187 
189  bool isAttributeAvailableVec3f(const char *iName) const;
190 
191  /* modifiers */
200  inline void setColor(float r, float g, float b)
201  {
202  _color[0] = r;
203  _color[1] = g;
204  _color[2] = b;
205  }
206 
211  inline void setColor(const Vec3f &iRGB)
212  {
213  _color[0] = iRGB[0];
214  _color[1] = iRGB[1];
215  _color[2] = iRGB[2];
216  }
217 
222  inline void setAlpha(float alpha)
223  {
224  _alpha = alpha;
225  }
226 
233  inline void setThickness(float tr, float tl)
234  {
235  _thickness[0] = tr;
236  _thickness[1] = tl;
237  }
238 
243  inline void setThickness(const Vec2f &tRL)
244  {
245  _thickness[0] = tRL[0];
246  _thickness[1] = tRL[1];
247  }
248 
250  inline void setVisible(bool iVisible)
251  {
252  _visible = iVisible;
253  }
254 
263  void setAttributeReal(const char *iName, float att);
264 
273  void setAttributeVec2f(const char *iName, const Vec2f &att);
274 
283  void setAttributeVec3f(const char *iName, const Vec3f &att);
284 
285  private:
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;
289 
291  float _color[3];
293  float _alpha;
295  float _thickness[2];
296  bool _visible;
297  realMap *_userAttributesReal;
298  Vec2fMap *_userAttributesVec2f;
299  Vec3fMap *_userAttributesVec3f;
300 
301 #ifdef WITH_CXX_GUARDEDALLOC
302  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeAttribute")
303 #endif
304 };
305 
306 //
307 // StrokeVertex
308 //
310 
312 class StrokeVertex : public CurvePoint {
313  public: // Implementation of Interface0D
315  virtual string getExactTypeName() const
316  {
317  return "StrokeVertex";
318  }
319 
320  private:
321  StrokeAttribute _Attribute;
322  float _CurvilignAbscissa;
323  float _StrokeLength; // stroke length
324 
325  public:
327  StrokeVertex();
328 
330  StrokeVertex(const StrokeVertex &iBrother);
331 
333  StrokeVertex(SVertex *iSVertex);
334 
336  StrokeVertex(CurvePoint *iPoint);
337 
339  StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3);
340 
342  StrokeVertex(SVertex *iSVertex, const StrokeAttribute &iAttribute);
343 
344  /* operators */
346  StrokeVertex &operator=(const StrokeVertex &iBrother);
347 
348  /* accessors */
350  inline real x() const
351  {
352  return _Point2d[0];
353  }
354 
356  inline real y() const
357  {
358  return _Point2d[1];
359  }
360 
362  inline Vec2r getPoint() const
363  {
364  return getPoint2D();
365  }
366 
368  inline real operator[](const int i) const
369  {
370  return _Point2d[i];
371  }
372 
374  inline const StrokeAttribute &attribute() const
375  {
376  return _Attribute;
377  }
378 
381  {
382  return _Attribute;
383  }
384 
386  inline float curvilinearAbscissa() const
387  {
388  return _CurvilignAbscissa;
389  }
390 
392  inline float strokeLength() const
393  {
394  return _StrokeLength;
395  }
396 
398  inline float u() const
399  {
400  return _CurvilignAbscissa / _StrokeLength;
401  }
402 
403  /* modifiers */
405  inline void setX(real x)
406  {
407  _Point2d[0] = x;
408  }
409 
411  inline void setY(real y)
412  {
413  _Point2d[1] = y;
414  }
415 
417  inline void setPoint(real x, real y)
418  {
419  _Point2d[0] = x;
420  _Point2d[1] = y;
421  }
422 
424  inline void setPoint(const Vec2r &p)
425  {
426  _Point2d[0] = p[0];
427  _Point2d[1] = p[1];
428  }
429 
431  inline real &operator[](const int i)
432  {
433  return _Point2d[i];
434  }
435 
437  inline void setAttribute(const StrokeAttribute &iAttribute)
438  {
439  _Attribute = iAttribute;
440  }
441 
443  inline void setCurvilinearAbscissa(float iAbscissa)
444  {
445  _CurvilignAbscissa = iAbscissa;
446  }
447 
451  inline void setStrokeLength(float iLength)
452  {
453  _StrokeLength = iLength;
454  }
455 
456  /* interface definition */
457  /* inherited */
458 
459 #ifdef WITH_CXX_GUARDEDALLOC
460  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeVertex")
461 #endif
462 };
463 
464 //
465 // Stroke
466 //
468 
469 class StrokeRenderer;
470 class StrokeRep;
471 
472 namespace StrokeInternal {
473 
474 class vertex_const_traits;
476 template<class Traits> class vertex_iterator_base;
478 
479 } // end of namespace StrokeInternal
480 
487 class Stroke : public Interface1D {
488  public: // Implementation of Interface1D
490  virtual string getExactTypeName() const
491  {
492  return "Stroke";
493  }
494 
495  // Data access methods
496 
498  virtual Id getId() const
499  {
500  return _id;
501  }
502 
504  typedef enum {
508  } MediumType;
509 
510  public:
511  typedef std::deque<StrokeVertex *> vertex_container; // the vertices container
512  typedef std::vector<ViewEdge *> viewedge_container; // the viewedges container
517 
518  public:
519  // typedef StrokeVertex vertex_type;
520 
521  private:
522  vertex_container _Vertices;
523  Id _id;
524  float _Length; // The stroke length
525  viewedge_container _ViewEdges;
526  float _sampling;
527  float _textureStep;
528  // StrokeRenderer *_renderer; // mark implementation OpenGL renderer
529  MediumType _mediumType;
530  unsigned int _textureId;
531  MTex *_mtex[MAX_MTEX];
532  bNodeTree *_nodeTree;
533  bool _tips;
534  StrokeRep *_rep;
535  Vec2r _extremityOrientations[2]; // the orientations of the first and last extermity
536 
537  public:
539  Stroke();
540 
542  Stroke(const Stroke &iBrother);
543 
552  template<class InputVertexIterator> Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd);
553 
555  virtual ~Stroke();
556 
557  /* operators */
559  Stroke &operator=(const Stroke &iBrother);
560 
570  float ComputeSampling(int iNVertices);
571 
579  int Resample(int iNPoints);
580 
587  int Resample(float iSampling);
588 
591  void RemoveAllVertices();
592 
598  void RemoveVertex(StrokeVertex *iVertex);
599 
608 
610  void UpdateLength();
611 
612  /* Render method */
613  void ScaleThickness(float iFactor);
614  void Render(const StrokeRenderer *iRenderer);
615  void RenderBasic(const StrokeRenderer *iRenderer);
616 
617  /* Iterator definition */
618 
619  /* accessors */
621  inline real getLength2D() const
622  {
623  return _Length;
624  }
625 
628  inline MediumType getMediumType() const
629  {
630  return _mediumType;
631  }
632 
634  inline unsigned int getTextureId()
635  {
636  return _textureId;
637  }
638 
640  inline float getTextureStep()
641  {
642  return _textureStep;
643  }
644 
646  inline MTex *getMTex(int idx)
647  {
648  return _mtex[idx];
649  }
650 
653  {
654  return _nodeTree;
655  }
656 
658  inline bool hasTex() const
659  {
660  return (_mtex[0] != NULL) || _nodeTree;
661  }
662 
664  inline bool hasTips() const
665  {
666  return _tips;
667  }
668 
669  /* these advanced iterators are used only in C++ */
670  inline int vertices_size() const
671  {
672  return _Vertices.size();
673  }
674 
675  inline viewedge_container::const_iterator viewedges_begin() const
676  {
677  return _ViewEdges.begin();
678  }
679 
680  inline viewedge_container::iterator viewedges_begin()
681  {
682  return _ViewEdges.begin();
683  }
684 
685  inline viewedge_container::const_iterator viewedges_end() const
686  {
687  return _ViewEdges.end();
688  }
689 
690  inline viewedge_container::iterator viewedges_end()
691  {
692  return _ViewEdges.end();
693  }
694 
695  inline int viewedges_size() const
696  {
697  return _ViewEdges.size();
698  }
699 
701  {
702  return _extremityOrientations[0];
703  }
704 
706  {
707  return _extremityOrientations[0].x();
708  }
709 
711  {
712  return _extremityOrientations[0].y();
713  }
714 
716  {
717  return _extremityOrientations[1];
718  }
719 
721  {
722  return _extremityOrientations[1].x();
723  }
724 
726  {
727  return _extremityOrientations[1].y();
728  }
729 
730  /* modifiers */
732  inline void setId(const Id &id)
733  {
734  _id = id;
735  }
736 
738  void setLength(float iLength);
739 
741  inline void setMediumType(MediumType iType)
742  {
743  _mediumType = iType;
744  }
745 
747  inline void setTextureId(unsigned int id)
748  {
749  _textureId = id;
750  }
751 
753  inline void setTextureStep(float step)
754  {
755  _textureStep = step;
756  }
757 
759  inline int setMTex(MTex *mtex)
760  {
761  for (int a = 0; a < MAX_MTEX; a++) {
762  if (!_mtex[a]) {
763  _mtex[a] = mtex;
764  return 0;
765  }
766  }
767  return -1; /* no free slots */
768  }
769 
771  inline void setNodeTree(bNodeTree *iNodeTree)
772  {
773  _nodeTree = iNodeTree;
774  }
775 
777  inline void setTips(bool iTips)
778  {
779  _tips = iTips;
780  }
781 
782  inline void push_back(StrokeVertex *iVertex)
783  {
784  _Vertices.push_back(iVertex);
785  }
786 
787  inline void push_front(StrokeVertex *iVertex)
788  {
789  _Vertices.push_front(iVertex);
790  }
791 
792  inline void AddViewEdge(ViewEdge *iViewEdge)
793  {
794  _ViewEdges.push_back(iViewEdge);
795  }
796 
797  inline void setBeginningOrientation(const Vec2r &iOrientation)
798  {
799  _extremityOrientations[0] = iOrientation;
800  }
801 
803  {
804  _extremityOrientations[0] = Vec2r(x, y);
805  }
806 
807  inline void setEndingOrientation(const Vec2r &iOrientation)
808  {
809  _extremityOrientations[1] = iOrientation;
810  }
811 
813  {
814  _extremityOrientations[1] = Vec2r(x, y);
815  }
816 
817  /* Information access interface */
818 
819  // embedding vertex iterator
821  vertex_iterator vertices_begin(float sampling = 0.0f);
824 
832 
835 
837  inline unsigned int strokeVerticesSize() const
838  {
839  return _Vertices.size();
840  }
841 
843  inline StrokeVertex &strokeVerticeAt(unsigned int i)
844  {
845  return *(_Vertices.at(i));
846  }
847 
848  // Iterator access (Interface1D)
851 
854 
855  virtual Interface0DIterator pointsBegin(float t = 0.0f);
856  virtual Interface0DIterator pointsEnd(float t = 0.0f);
857 
858 #ifdef WITH_CXX_GUARDEDALLOC
859  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Stroke")
860 #endif
861 };
862 
863 //
864 // Implementation
865 //
867 
868 template<class InputVertexIterator>
869 Stroke::Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd)
870 {
871  for (InputVertexIterator v = iBegin, vend = iEnd; v != vend; v++) {
872  _Vertices.push_back(*v);
873  }
874  _Length = 0;
875  _id = 0;
876 }
877 
878 } /* namespace Freestyle */
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.
#define MAX_MTEX
Definition: Stroke.h:31
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual Vec2r getPoint2D() const
Definition: Curve.h:100
void setThickness(const Vec2f &tRL)
Definition: Stroke.h:243
void setVisible(bool iVisible)
Definition: Stroke.h:250
bool isAttributeAvailableVec3f(const char *iName) const
Definition: Stroke.cpp:287
Vec2f getThicknessRL() const
Definition: Stroke.h:153
void setThickness(float tr, float tl)
Definition: Stroke.h:233
Vec3f getAttributeVec3f(const char *iName) const
Definition: Stroke.cpp:244
void setAttributeReal(const char *iName, float att)
Definition: Stroke.cpp:299
const float getThicknessR() const
Definition: Stroke.h:140
const float getColorR() const
Definition: Stroke.h:101
void setAttributeVec3f(const char *iName, const Vec3f &att)
Definition: Stroke.cpp:315
const float getColorB() const
Definition: Stroke.h:113
bool isVisible() const
Definition: Stroke.h:159
const float getThicknessL() const
Definition: Stroke.h:146
Vec3f getColorRGB() const
Definition: Stroke.h:119
float getAlpha() const
Definition: Stroke.h:125
void setColor(float r, float g, float b)
Definition: Stroke.h:200
const float getColorG() const
Definition: Stroke.h:107
const float * getThickness() const
Definition: Stroke.h:134
bool isAttributeAvailableVec2f(const char *iName) const
Definition: Stroke.cpp:275
void setAlpha(float alpha)
Definition: Stroke.h:222
void setColor(const Vec3f &iRGB)
Definition: Stroke.h:211
const float * getColor() const
Definition: Stroke.h:95
Vec2f getAttributeVec2f(const char *iName) const
Definition: Stroke.cpp:225
void setAttributeVec2f(const char *iName, const Vec2f &att)
Definition: Stroke.cpp:307
StrokeAttribute & operator=(const StrokeAttribute &iBrother)
Definition: Stroke.cpp:166
bool isAttributeAvailableReal(const char *iName) const
Definition: Stroke.cpp:263
float getAttributeReal(const char *iName) const
Definition: Stroke.cpp:206
float curvilinearAbscissa() const
Definition: Stroke.h:386
Vec2r getPoint() const
Definition: Stroke.h:362
void setCurvilinearAbscissa(float iAbscissa)
Definition: Stroke.h:443
const StrokeAttribute & attribute() const
Definition: Stroke.h:374
real operator[](const int i) const
Definition: Stroke.h:368
void setY(real y)
Definition: Stroke.h:411
void setAttribute(const StrokeAttribute &iAttribute)
Definition: Stroke.h:437
float u() const
Definition: Stroke.h:398
float strokeLength() const
Definition: Stroke.h:392
void setX(real x)
Definition: Stroke.h:405
void setPoint(real x, real y)
Definition: Stroke.h:417
StrokeAttribute & attribute()
Definition: Stroke.h:380
void setPoint(const Vec2r &p)
Definition: Stroke.h:424
StrokeVertex & operator=(const StrokeVertex &iBrother)
Definition: Stroke.cpp:372
real x() const
Definition: Stroke.h:350
void setStrokeLength(float iLength)
Definition: Stroke.h:451
real & operator[](const int i)
Definition: Stroke.h:431
real y() const
Definition: Stroke.h:356
virtual string getExactTypeName() const
Definition: Stroke.h:315
virtual Interface0DIterator pointsEnd(float t=0.0f)
Definition: Stroke.cpp:784
viewedge_container::iterator viewedges_end()
Definition: Stroke.h:690
const_vertex_iterator vertices_begin() const
embedding vertex iterator
Definition: Stroke.cpp:735
bool hasTex() const
Definition: Stroke.h:658
viewedge_container::const_iterator viewedges_end() const
Definition: Stroke.h:685
void push_back(StrokeVertex *iVertex)
Definition: Stroke.h:782
void setId(const Id &id)
Definition: Stroke.h:732
void setBeginningOrientation(const Vec2r &iOrientation)
Definition: Stroke.h:797
bNodeTree * getNodeTree()
Definition: Stroke.h:652
virtual Id getId() const
Definition: Stroke.h:498
int viewedges_size() const
Definition: Stroke.h:695
void setTextureStep(float step)
Definition: Stroke.h:753
void ScaleThickness(float iFactor)
Definition: Stroke.cpp:789
void setBeginningOrientation(real x, real y)
Definition: Stroke.h:802
virtual Interface0DIterator verticesBegin()
Definition: Stroke.cpp:765
StrokeInternal::vertex_iterator_base< StrokeInternal::vertex_nonconst_traits > vertex_iterator
Definition: Stroke.h:514
std::vector< ViewEdge * > viewedge_container
Definition: Stroke.h:512
StrokeInternal::vertex_iterator_base< StrokeInternal::vertex_const_traits > const_vertex_iterator
Definition: Stroke.h:516
void RemoveAllVertices()
Definition: Stroke.cpp:687
StrokeVertex & strokeVerticeAt(unsigned int i)
Definition: Stroke.h:843
void setEndingOrientation(real x, real y)
Definition: Stroke.h:812
void AddViewEdge(ViewEdge *iViewEdge)
Definition: Stroke.h:792
virtual ~Stroke()
Definition: Stroke.cpp:436
void RemoveVertex(StrokeVertex *iVertex)
Definition: Stroke.cpp:697
void push_front(StrokeVertex *iVertex)
Definition: Stroke.h:787
void setTextureId(unsigned int id)
Definition: Stroke.h:747
void InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next)
Definition: Stroke.cpp:710
real getEndingOrientationX() const
Definition: Stroke.h:720
int vertices_size() const
Definition: Stroke.h:670
const_vertex_iterator vertices_end() const
Definition: Stroke.cpp:740
std::deque< StrokeVertex * > vertex_container
Definition: Stroke.h:511
bool hasTips() const
Definition: Stroke.h:664
virtual Interface0DIterator verticesEnd()
Definition: Stroke.cpp:772
real getBeginningOrientationY() const
Definition: Stroke.h:710
float getTextureStep()
Definition: Stroke.h:640
void UpdateLength()
Definition: Stroke.cpp:717
int setMTex(MTex *mtex)
Definition: Stroke.h:759
void Render(const StrokeRenderer *iRenderer)
Definition: Stroke.cpp:798
void setEndingOrientation(const Vec2r &iOrientation)
Definition: Stroke.h:807
MTex * getMTex(int idx)
Definition: Stroke.h:646
void setTips(bool iTips)
Definition: Stroke.h:777
MediumType getMediumType() const
Definition: Stroke.h:628
virtual Interface0DIterator pointsBegin(float t=0.0f)
Definition: Stroke.cpp:779
Vec2r getBeginningOrientation() const
Definition: Stroke.h:700
void RenderBasic(const StrokeRenderer *iRenderer)
Definition: Stroke.cpp:806
Stroke & operator=(const Stroke &iBrother)
Definition: Stroke.cpp:453
void setLength(float iLength)
Definition: Stroke.cpp:479
float ComputeSampling(int iNVertices)
Definition: Stroke.cpp:487
viewedge_container::const_iterator viewedges_begin() const
Definition: Stroke.h:675
StrokeInternal::StrokeVertexIterator strokeVerticesEnd()
Definition: Stroke.cpp:759
Vec2r getEndingOrientation() const
Definition: Stroke.h:715
viewedge_container::iterator viewedges_begin()
Definition: Stroke.h:680
StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t=0.0f)
Definition: Stroke.cpp:750
virtual string getExactTypeName() const
Definition: Stroke.h:490
real getEndingOrientationY() const
Definition: Stroke.h:725
void setNodeTree(bNodeTree *iNodeTree)
Definition: Stroke.h:771
real getLength2D() const
Definition: Stroke.h:621
int Resample(int iNPoints)
Definition: Stroke.cpp:521
real getBeginningOrientationX() const
Definition: Stroke.h:705
unsigned int getTextureId()
Definition: Stroke.h:634
void setMediumType(MediumType iType)
Definition: Stroke.h:741
unsigned int strokeVerticesSize() const
Definition: Stroke.h:837
value_type x() const
Definition: VecMat.h:305
value_type y() const
Definition: VecMat.h:315
struct Vec3f Vec3f
static ulong * next
VecMat::Vec2< real > Vec2r
Definition: Geom.h:22
VecMat::Vec2< float > Vec2f
Definition: Geom.h:20
inherits from class Rep
Definition: AppCanvas.cpp:18
static unsigned x[3]
Definition: RandGen.cpp:73
static unsigned a[3]
Definition: RandGen.cpp:78
double real
Definition: Precision.h:12
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)