Blender  V2.93
Stroke.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
24 #include <map>
25 #include <vector>
26 
27 #include "Curve.h"
28 
29 #include "../view_map/Interface1D.h"
30 #include "../view_map/Silhouette.h"
31 
32 #include "../system/FreestyleConfig.h"
33 #include "../system/StringUtils.h"
34 
35 #ifdef WITH_CXX_GUARDEDALLOC
36 # include "MEM_guardedalloc.h"
37 #endif
38 
39 extern "C" {
40 struct MTex;
41 struct bNodeTree;
42 }
43 
44 #ifndef MAX_MTEX
45 # define MAX_MTEX 18
46 #endif
47 
48 namespace Freestyle {
49 
50 //
51 // StrokeAttribute
52 //
54 
59  public:
62 
64  StrokeAttribute(const StrokeAttribute &iBrother);
65 
80  StrokeAttribute(float iRColor,
81  float iGColor,
82  float iBColor,
83  float iAlpha,
84  float iRThickness,
85  float iLThickness);
86 
96  StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribute &a2, float t);
97 
99  virtual ~StrokeAttribute();
100 
101  /* operators */
103  StrokeAttribute &operator=(const StrokeAttribute &iBrother);
104 
105  /* accessors */
109  inline const float *getColor() const
110  {
111  return _color;
112  }
113 
115  inline const float getColorR() const
116  {
117  return _color[0];
118  }
119 
121  inline const float getColorG() const
122  {
123  return _color[1];
124  }
125 
127  inline const float getColorB() const
128  {
129  return _color[2];
130  }
131 
133  inline Vec3f getColorRGB() const
134  {
135  return Vec3f(_color[0], _color[1], _color[2]);
136  }
137 
139  inline float getAlpha() const
140  {
141  return _alpha;
142  }
143 
148  inline const float *getThickness() const
149  {
150  return _thickness;
151  }
152 
154  inline const float getThicknessR() const
155  {
156  return _thickness[0];
157  }
158 
160  inline const float getThicknessL() const
161  {
162  return _thickness[1];
163  }
164 
167  inline Vec2f getThicknessRL() const
168  {
169  return Vec2f(_thickness[0], _thickness[1]);
170  }
171 
173  inline bool isVisible() const
174  {
175  return _visible;
176  }
177 
182  float getAttributeReal(const char *iName) const;
183 
188  Vec2f getAttributeVec2f(const char *iName) const;
189 
194  Vec3f getAttributeVec3f(const char *iName) const;
195 
197  bool isAttributeAvailableReal(const char *iName) const;
198 
200  bool isAttributeAvailableVec2f(const char *iName) const;
201 
203  bool isAttributeAvailableVec3f(const char *iName) const;
204 
205  /* modifiers */
214  inline void setColor(float r, float g, float b)
215  {
216  _color[0] = r;
217  _color[1] = g;
218  _color[2] = b;
219  }
220 
225  inline void setColor(const Vec3f &iRGB)
226  {
227  _color[0] = iRGB[0];
228  _color[1] = iRGB[1];
229  _color[2] = iRGB[2];
230  }
231 
236  inline void setAlpha(float alpha)
237  {
238  _alpha = alpha;
239  }
240 
247  inline void setThickness(float tr, float tl)
248  {
249  _thickness[0] = tr;
250  _thickness[1] = tl;
251  }
252 
257  inline void setThickness(const Vec2f &tRL)
258  {
259  _thickness[0] = tRL[0];
260  _thickness[1] = tRL[1];
261  }
262 
264  inline void setVisible(bool iVisible)
265  {
266  _visible = iVisible;
267  }
268 
277  void setAttributeReal(const char *iName, float att);
278 
287  void setAttributeVec2f(const char *iName, const Vec2f &att);
288 
297  void setAttributeVec3f(const char *iName, const Vec3f &att);
298 
299  private:
300  typedef std::map<const char *, float, StringUtils::ltstr> realMap;
301  typedef std::map<const char *, Vec2f, StringUtils::ltstr> Vec2fMap;
302  typedef std::map<const char *, Vec3f, StringUtils::ltstr> Vec3fMap;
303 
305  float _color[3];
307  float _alpha;
309  float _thickness[2];
310  bool _visible;
311  realMap *_userAttributesReal;
312  Vec2fMap *_userAttributesVec2f;
313  Vec3fMap *_userAttributesVec3f;
314 
315 #ifdef WITH_CXX_GUARDEDALLOC
316  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeAttribute")
317 #endif
318 };
319 
320 //
321 // StrokeVertex
322 //
324 
326 class StrokeVertex : public CurvePoint {
327  public: // Implementation of Interface0D
329  virtual string getExactTypeName() const
330  {
331  return "StrokeVertex";
332  }
333 
334  private:
335  StrokeAttribute _Attribute;
336  float _CurvilignAbscissa;
337  float _StrokeLength; // stroke length
338 
339  public:
341  StrokeVertex();
342 
344  StrokeVertex(const StrokeVertex &iBrother);
345 
347  StrokeVertex(SVertex *iSVertex);
348 
350  StrokeVertex(CurvePoint *iPoint);
351 
353  StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3);
354 
356  StrokeVertex(SVertex *iSVertex, const StrokeAttribute &iAttribute);
357 
358  /* operators */
360  StrokeVertex &operator=(const StrokeVertex &iBrother);
361 
362  /* accessors */
364  inline real x() const
365  {
366  return _Point2d[0];
367  }
368 
370  inline real y() const
371  {
372  return _Point2d[1];
373  }
374 
376  inline Vec2r getPoint() const
377  {
378  return getPoint2D();
379  }
380 
382  inline real operator[](const int i) const
383  {
384  return _Point2d[i];
385  }
386 
388  inline const StrokeAttribute &attribute() const
389  {
390  return _Attribute;
391  }
392 
395  {
396  return _Attribute;
397  }
398 
400  inline float curvilinearAbscissa() const
401  {
402  return _CurvilignAbscissa;
403  }
404 
406  inline float strokeLength() const
407  {
408  return _StrokeLength;
409  }
410 
412  inline float u() const
413  {
414  return _CurvilignAbscissa / _StrokeLength;
415  }
416 
417  /* modifiers */
419  inline void setX(real x)
420  {
421  _Point2d[0] = x;
422  }
423 
425  inline void setY(real y)
426  {
427  _Point2d[1] = y;
428  }
429 
431  inline void setPoint(real x, real y)
432  {
433  _Point2d[0] = x;
434  _Point2d[1] = y;
435  }
436 
438  inline void setPoint(const Vec2r &p)
439  {
440  _Point2d[0] = p[0];
441  _Point2d[1] = p[1];
442  }
443 
445  inline real &operator[](const int i)
446  {
447  return _Point2d[i];
448  }
449 
451  inline void setAttribute(const StrokeAttribute &iAttribute)
452  {
453  _Attribute = iAttribute;
454  }
455 
457  inline void setCurvilinearAbscissa(float iAbscissa)
458  {
459  _CurvilignAbscissa = iAbscissa;
460  }
461 
465  inline void setStrokeLength(float iLength)
466  {
467  _StrokeLength = iLength;
468  }
469 
470  /* interface definition */
471  /* inherited */
472 
473 #ifdef WITH_CXX_GUARDEDALLOC
474  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeVertex")
475 #endif
476 };
477 
478 //
479 // Stroke
480 //
482 
483 class StrokeRenderer;
484 class StrokeRep;
485 
486 namespace StrokeInternal {
487 
488 class vertex_const_traits;
490 template<class Traits> class vertex_iterator_base;
492 
493 } // end of namespace StrokeInternal
494 
501 class Stroke : public Interface1D {
502  public: // Implementation of Interface1D
504  virtual string getExactTypeName() const
505  {
506  return "Stroke";
507  }
508 
509  // Data access methods
510 
512  virtual Id getId() const
513  {
514  return _id;
515  }
516 
518  typedef enum {
522  } MediumType;
523 
524  public:
525  typedef std::deque<StrokeVertex *> vertex_container; // the vertices container
526  typedef std::vector<ViewEdge *> viewedge_container; // the viewedges container
531 
532  public:
533  // typedef StrokeVertex vertex_type;
534 
535  private:
536  vertex_container _Vertices;
537  Id _id;
538  float _Length; // The stroke length
539  viewedge_container _ViewEdges;
540  float _sampling;
541  float _textureStep;
542  // StrokeRenderer *_renderer; // mark implementation OpenGL renderer
543  MediumType _mediumType;
544  unsigned int _textureId;
545  MTex *_mtex[MAX_MTEX];
546  bNodeTree *_nodeTree;
547  bool _tips;
548  StrokeRep *_rep;
549  Vec2r _extremityOrientations[2]; // the orientations of the first and last extermity
550 
551  public:
553  Stroke();
554 
556  Stroke(const Stroke &iBrother);
557 
566  template<class InputVertexIterator> Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd);
567 
569  virtual ~Stroke();
570 
571  /* operators */
573  Stroke &operator=(const Stroke &iBrother);
574 
584  float ComputeSampling(int iNVertices);
585 
593  int Resample(int iNPoints);
594 
601  int Resample(float iSampling);
602 
605  void RemoveAllVertices();
606 
612  void RemoveVertex(StrokeVertex *iVertex);
613 
622 
624  void UpdateLength();
625 
626  /* Render method */
627  void ScaleThickness(float iFactor);
628  void Render(const StrokeRenderer *iRenderer);
629  void RenderBasic(const StrokeRenderer *iRenderer);
630 
631  /* Iterator definition */
632 
633  /* accessors */
635  inline real getLength2D() const
636  {
637  return _Length;
638  }
639 
642  inline MediumType getMediumType() const
643  {
644  return _mediumType;
645  }
646 
648  inline unsigned int getTextureId()
649  {
650  return _textureId;
651  }
652 
654  inline float getTextureStep()
655  {
656  return _textureStep;
657  }
658 
660  inline MTex *getMTex(int idx)
661  {
662  return _mtex[idx];
663  }
664 
667  {
668  return _nodeTree;
669  }
670 
672  inline bool hasTex() const
673  {
674  return (_mtex[0] != NULL) || _nodeTree;
675  }
676 
678  inline bool hasTips() const
679  {
680  return _tips;
681  }
682 
683  /* these advanced iterators are used only in C++ */
684  inline int vertices_size() const
685  {
686  return _Vertices.size();
687  }
688 
689  inline viewedge_container::const_iterator viewedges_begin() const
690  {
691  return _ViewEdges.begin();
692  }
693 
694  inline viewedge_container::iterator viewedges_begin()
695  {
696  return _ViewEdges.begin();
697  }
698 
699  inline viewedge_container::const_iterator viewedges_end() const
700  {
701  return _ViewEdges.end();
702  }
703 
704  inline viewedge_container::iterator viewedges_end()
705  {
706  return _ViewEdges.end();
707  }
708 
709  inline int viewedges_size() const
710  {
711  return _ViewEdges.size();
712  }
713 
715  {
716  return _extremityOrientations[0];
717  }
718 
720  {
721  return _extremityOrientations[0].x();
722  }
723 
725  {
726  return _extremityOrientations[0].y();
727  }
728 
730  {
731  return _extremityOrientations[1];
732  }
733 
735  {
736  return _extremityOrientations[1].x();
737  }
738 
740  {
741  return _extremityOrientations[1].y();
742  }
743 
744  /* modifiers */
746  inline void setId(const Id &id)
747  {
748  _id = id;
749  }
750 
752  void setLength(float iLength);
753 
755  inline void setMediumType(MediumType iType)
756  {
757  _mediumType = iType;
758  }
759 
761  inline void setTextureId(unsigned int id)
762  {
763  _textureId = id;
764  }
765 
767  inline void setTextureStep(float step)
768  {
769  _textureStep = step;
770  }
771 
773  inline int setMTex(MTex *mtex)
774  {
775  for (int a = 0; a < MAX_MTEX; a++) {
776  if (!_mtex[a]) {
777  _mtex[a] = mtex;
778  return 0;
779  }
780  }
781  return -1; /* no free slots */
782  }
783 
785  inline void setNodeTree(bNodeTree *iNodeTree)
786  {
787  _nodeTree = iNodeTree;
788  }
789 
791  inline void setTips(bool iTips)
792  {
793  _tips = iTips;
794  }
795 
796  inline void push_back(StrokeVertex *iVertex)
797  {
798  _Vertices.push_back(iVertex);
799  }
800 
801  inline void push_front(StrokeVertex *iVertex)
802  {
803  _Vertices.push_front(iVertex);
804  }
805 
806  inline void AddViewEdge(ViewEdge *iViewEdge)
807  {
808  _ViewEdges.push_back(iViewEdge);
809  }
810 
811  inline void setBeginningOrientation(const Vec2r &iOrientation)
812  {
813  _extremityOrientations[0] = iOrientation;
814  }
815 
817  {
818  _extremityOrientations[0] = Vec2r(x, y);
819  }
820 
821  inline void setEndingOrientation(const Vec2r &iOrientation)
822  {
823  _extremityOrientations[1] = iOrientation;
824  }
825 
827  {
828  _extremityOrientations[1] = Vec2r(x, y);
829  }
830 
831  /* Information access interface */
832 
833  // embedding vertex iterator
835  vertex_iterator vertices_begin(float sampling = 0.0f);
838 
846 
849 
851  inline unsigned int strokeVerticesSize() const
852  {
853  return _Vertices.size();
854  }
855 
857  inline StrokeVertex &strokeVerticeAt(unsigned int i)
858  {
859  return *(_Vertices.at(i));
860  }
861 
862  // Iterator access (Interface1D)
865 
868 
869  virtual Interface0DIterator pointsBegin(float t = 0.0f);
870  virtual Interface0DIterator pointsEnd(float t = 0.0f);
871 
872 #ifdef WITH_CXX_GUARDEDALLOC
873  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Stroke")
874 #endif
875 };
876 
877 //
878 // Implementation
879 //
881 
882 template<class InputVertexIterator>
883 Stroke::Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd)
884 {
885  for (InputVertexIterator v = iBegin, vend = iEnd; v != vend; v++) {
886  _Vertices.push_back(*v);
887  }
888  _Length = 0;
889  _id = 0;
890 }
891 
892 } /* 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:45
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual Vec2r getPoint2D() const
Definition: Curve.h:114
void setThickness(const Vec2f &tRL)
Definition: Stroke.h:257
void setVisible(bool iVisible)
Definition: Stroke.h:264
bool isAttributeAvailableVec3f(const char *iName) const
Definition: Stroke.cpp:301
Vec2f getThicknessRL() const
Definition: Stroke.h:167
void setThickness(float tr, float tl)
Definition: Stroke.h:247
Vec3f getAttributeVec3f(const char *iName) const
Definition: Stroke.cpp:258
void setAttributeReal(const char *iName, float att)
Definition: Stroke.cpp:313
const float getThicknessR() const
Definition: Stroke.h:154
const float getColorR() const
Definition: Stroke.h:115
void setAttributeVec3f(const char *iName, const Vec3f &att)
Definition: Stroke.cpp:329
const float getColorB() const
Definition: Stroke.h:127
bool isVisible() const
Definition: Stroke.h:173
const float getThicknessL() const
Definition: Stroke.h:160
Vec3f getColorRGB() const
Definition: Stroke.h:133
float getAlpha() const
Definition: Stroke.h:139
void setColor(float r, float g, float b)
Definition: Stroke.h:214
const float getColorG() const
Definition: Stroke.h:121
const float * getThickness() const
Definition: Stroke.h:148
bool isAttributeAvailableVec2f(const char *iName) const
Definition: Stroke.cpp:289
void setAlpha(float alpha)
Definition: Stroke.h:236
void setColor(const Vec3f &iRGB)
Definition: Stroke.h:225
const float * getColor() const
Definition: Stroke.h:109
Vec2f getAttributeVec2f(const char *iName) const
Definition: Stroke.cpp:239
void setAttributeVec2f(const char *iName, const Vec2f &att)
Definition: Stroke.cpp:321
StrokeAttribute & operator=(const StrokeAttribute &iBrother)
Definition: Stroke.cpp:180
bool isAttributeAvailableReal(const char *iName) const
Definition: Stroke.cpp:277
float getAttributeReal(const char *iName) const
Definition: Stroke.cpp:220
float curvilinearAbscissa() const
Definition: Stroke.h:400
Vec2r getPoint() const
Definition: Stroke.h:376
void setCurvilinearAbscissa(float iAbscissa)
Definition: Stroke.h:457
const StrokeAttribute & attribute() const
Definition: Stroke.h:388
real operator[](const int i) const
Definition: Stroke.h:382
void setY(real y)
Definition: Stroke.h:425
void setAttribute(const StrokeAttribute &iAttribute)
Definition: Stroke.h:451
float u() const
Definition: Stroke.h:412
float strokeLength() const
Definition: Stroke.h:406
void setX(real x)
Definition: Stroke.h:419
void setPoint(real x, real y)
Definition: Stroke.h:431
StrokeAttribute & attribute()
Definition: Stroke.h:394
void setPoint(const Vec2r &p)
Definition: Stroke.h:438
StrokeVertex & operator=(const StrokeVertex &iBrother)
Definition: Stroke.cpp:386
real x() const
Definition: Stroke.h:364
void setStrokeLength(float iLength)
Definition: Stroke.h:465
real & operator[](const int i)
Definition: Stroke.h:445
real y() const
Definition: Stroke.h:370
virtual string getExactTypeName() const
Definition: Stroke.h:329
virtual Interface0DIterator pointsEnd(float t=0.0f)
Definition: Stroke.cpp:798
viewedge_container::iterator viewedges_end()
Definition: Stroke.h:704
const_vertex_iterator vertices_begin() const
embedding vertex iterator
Definition: Stroke.cpp:749
bool hasTex() const
Definition: Stroke.h:672
viewedge_container::const_iterator viewedges_end() const
Definition: Stroke.h:699
void push_back(StrokeVertex *iVertex)
Definition: Stroke.h:796
void setId(const Id &id)
Definition: Stroke.h:746
void setBeginningOrientation(const Vec2r &iOrientation)
Definition: Stroke.h:811
bNodeTree * getNodeTree()
Definition: Stroke.h:666
virtual Id getId() const
Definition: Stroke.h:512
int viewedges_size() const
Definition: Stroke.h:709
void setTextureStep(float step)
Definition: Stroke.h:767
void ScaleThickness(float iFactor)
Definition: Stroke.cpp:803
void setBeginningOrientation(real x, real y)
Definition: Stroke.h:816
virtual Interface0DIterator verticesBegin()
Definition: Stroke.cpp:779
StrokeInternal::vertex_iterator_base< StrokeInternal::vertex_nonconst_traits > vertex_iterator
Definition: Stroke.h:528
std::vector< ViewEdge * > viewedge_container
Definition: Stroke.h:526
StrokeInternal::vertex_iterator_base< StrokeInternal::vertex_const_traits > const_vertex_iterator
Definition: Stroke.h:530
void RemoveAllVertices()
Definition: Stroke.cpp:701
StrokeVertex & strokeVerticeAt(unsigned int i)
Definition: Stroke.h:857
void setEndingOrientation(real x, real y)
Definition: Stroke.h:826
void AddViewEdge(ViewEdge *iViewEdge)
Definition: Stroke.h:806
virtual ~Stroke()
Definition: Stroke.cpp:450
void RemoveVertex(StrokeVertex *iVertex)
Definition: Stroke.cpp:711
void push_front(StrokeVertex *iVertex)
Definition: Stroke.h:801
void setTextureId(unsigned int id)
Definition: Stroke.h:761
void InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next)
Definition: Stroke.cpp:724
real getEndingOrientationX() const
Definition: Stroke.h:734
int vertices_size() const
Definition: Stroke.h:684
const_vertex_iterator vertices_end() const
Definition: Stroke.cpp:754
std::deque< StrokeVertex * > vertex_container
Definition: Stroke.h:525
bool hasTips() const
Definition: Stroke.h:678
virtual Interface0DIterator verticesEnd()
Definition: Stroke.cpp:786
real getBeginningOrientationY() const
Definition: Stroke.h:724
float getTextureStep()
Definition: Stroke.h:654
void UpdateLength()
Definition: Stroke.cpp:731
int setMTex(MTex *mtex)
Definition: Stroke.h:773
void Render(const StrokeRenderer *iRenderer)
Definition: Stroke.cpp:812
void setEndingOrientation(const Vec2r &iOrientation)
Definition: Stroke.h:821
MTex * getMTex(int idx)
Definition: Stroke.h:660
void setTips(bool iTips)
Definition: Stroke.h:791
MediumType getMediumType() const
Definition: Stroke.h:642
virtual Interface0DIterator pointsBegin(float t=0.0f)
Definition: Stroke.cpp:793
Vec2r getBeginningOrientation() const
Definition: Stroke.h:714
void RenderBasic(const StrokeRenderer *iRenderer)
Definition: Stroke.cpp:820
Stroke & operator=(const Stroke &iBrother)
Definition: Stroke.cpp:467
void setLength(float iLength)
Definition: Stroke.cpp:493
float ComputeSampling(int iNVertices)
Definition: Stroke.cpp:501
viewedge_container::const_iterator viewedges_begin() const
Definition: Stroke.h:689
StrokeInternal::StrokeVertexIterator strokeVerticesEnd()
Definition: Stroke.cpp:773
Vec2r getEndingOrientation() const
Definition: Stroke.h:729
viewedge_container::iterator viewedges_begin()
Definition: Stroke.h:694
StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t=0.0f)
Definition: Stroke.cpp:764
virtual string getExactTypeName() const
Definition: Stroke.h:504
real getEndingOrientationY() const
Definition: Stroke.h:739
void setNodeTree(bNodeTree *iNodeTree)
Definition: Stroke.h:785
real getLength2D() const
Definition: Stroke.h:635
int Resample(int iNPoints)
Definition: Stroke.cpp:535
real getBeginningOrientationX() const
Definition: Stroke.h:719
unsigned int getTextureId()
Definition: Stroke.h:648
void setMediumType(MediumType iType)
Definition: Stroke.h:755
unsigned int strokeVerticesSize() const
Definition: Stroke.h:851
value_type x() const
Definition: VecMat.h:319
value_type y() const
Definition: VecMat.h:329
static CCL_NAMESPACE_BEGIN const double alpha
struct Vec3f Vec3f
static ulong * next
VecMat::Vec2< real > Vec2r
Definition: Geom.h:36
VecMat::Vec2< float > Vec2f
Definition: Geom.h:34
inherits from class Rep
Definition: AppCanvas.cpp:32
static unsigned x[3]
Definition: RandGen.cpp:87
static unsigned a[3]
Definition: RandGen.cpp:92
double real
Definition: Precision.h:26