Blender  V2.93
Silhouette.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 <float.h>
25 #include <iostream>
26 #include <set>
27 #include <string>
28 #include <vector>
29 
30 #include "Interface0D.h"
31 #include "Interface1D.h"
32 
33 #include "../geometry/BBox.h"
34 #include "../geometry/Geom.h"
35 #include "../geometry/Polygon.h"
36 
37 #include "../scene_graph/FrsMaterial.h"
38 
39 #include "../system/Exception.h"
40 #include "../system/FreestyleConfig.h"
41 
42 #include "../winged_edge/Curvature.h"
43 
44 #ifdef WITH_CXX_GUARDEDALLOC
45 # include "MEM_guardedalloc.h"
46 #endif
47 
48 using namespace std;
49 
50 namespace Freestyle {
51 
52 using namespace Geometry;
53 
54 class ViewShape;
55 typedef vector<ViewShape *> occluder_container;
56 
57 /**********************************/
58 /* */
59 /* */
60 /* SVertex */
61 /* */
62 /* */
63 /**********************************/
64 
65 class FEdge;
66 class ViewVertex;
67 class SShape;
68 
70 class SVertex : public Interface0D {
71  public: // Implementation of Interface0D
73  virtual string getExactTypeName() const
74  {
75  return "SVertex";
76  }
77 
78  // Data access methods
80  virtual real getX() const
81  {
82  return _Point3D.x();
83  }
84 
86  virtual real getY() const
87  {
88  return _Point3D.y();
89  }
90 
92  virtual real getZ() const
93  {
94  return _Point3D.z();
95  }
96 
98  virtual Vec3r getPoint3D() const
99  {
100  return _Point3D;
101  }
102 
104  virtual real getProjectedX() const
105  {
106  return _Point2D.x();
107  }
108 
110  virtual real getProjectedY() const
111  {
112  return _Point2D.y();
113  }
114 
116  virtual real getProjectedZ() const
117  {
118  return _Point2D.z();
119  }
120 
122  virtual Vec2r getPoint2D() const
123  {
124  return Vec2r(_Point2D.x(), _Point2D.y());
125  }
126 
128  virtual FEdge *getFEdge(Interface0D &);
129 
131  virtual Id getId() const
132  {
133  return _Id;
134  }
135 
137  virtual Nature::VertexNature getNature() const;
138 
140  virtual SVertex *castToSVertex();
141 
143  virtual ViewVertex *castToViewVertex();
144 
146  virtual NonTVertex *castToNonTVertex();
147 
149  virtual TVertex *castToTVertex();
150 
151  public:
152  typedef vector<FEdge *> fedges_container;
153 
154  private:
155  Id _Id;
156  Vec3r _Point3D;
157  Vec3r _Point2D;
158  set<Vec3r> _Normals;
159  vector<FEdge *> _FEdges; // the edges containing this vertex
160  SShape *_Shape; // the shape to which belongs the vertex
161  ViewVertex *_pViewVertex; // The associated viewvertex, in case there is one.
162 #if 0
163  real _curvatureFredo;
164  Vec2r _directionFredo;
165 #endif
166  CurvatureInfo *_curvature_info;
167 
168  public:
172  void *userdata;
173 
175  inline SVertex()
176  {
177  _Id = 0;
178  userdata = NULL;
179  _Shape = NULL;
180  _pViewVertex = 0;
181  _curvature_info = 0;
182  }
183 
185  inline SVertex(const Vec3r &iPoint3D, const Id &id)
186  {
187  _Point3D = iPoint3D;
188  _Id = id;
189  userdata = NULL;
190  _Shape = NULL;
191  _pViewVertex = 0;
192  _curvature_info = 0;
193  }
194 
196  inline SVertex(SVertex &iBrother)
197  {
198  _Id = iBrother._Id;
199  _Point3D = iBrother.point3D();
200  _Point2D = iBrother.point2D();
201  _Normals = iBrother._Normals;
202  _FEdges = iBrother.fedges();
203  _Shape = iBrother.shape();
204  _pViewVertex = iBrother._pViewVertex;
205  if (!(iBrother._curvature_info)) {
206  _curvature_info = 0;
207  }
208  else {
209  _curvature_info = new CurvatureInfo(*(iBrother._curvature_info));
210  }
211  iBrother.userdata = this;
212  userdata = 0;
213  }
214 
216  virtual ~SVertex()
217  {
218  if (_curvature_info) {
219  delete _curvature_info;
220  }
221  }
222 
224  virtual SVertex *duplicate()
225  {
226  SVertex *clone = new SVertex(*this);
227  return clone;
228  }
229 
231  virtual bool operator==(const SVertex &iBrother)
232  {
233  return ((_Point2D == iBrother._Point2D) && (_Point3D == iBrother._Point3D));
234  }
235 
236  /* accessors */
237  inline const Vec3r &point3D() const
238  {
239  return _Point3D;
240  }
241 
242  inline const Vec3r &point2D() const
243  {
244  return _Point2D;
245  }
246 
251  inline set<Vec3r> normals()
252  {
253  return _Normals;
254  }
255 
257  inline unsigned normalsSize() const
258  {
259  return _Normals.size();
260  }
261 
262  inline const vector<FEdge *> &fedges()
263  {
264  return _FEdges;
265  }
266 
267  inline fedges_container::iterator fedges_begin()
268  {
269  return _FEdges.begin();
270  }
271 
272  inline fedges_container::iterator fedges_end()
273  {
274  return _FEdges.end();
275  }
276 
277  inline SShape *shape()
278  {
279  return _Shape;
280  }
281 
282  inline real z() const
283  {
284  return _Point2D[2];
285  }
286 
291  {
292  return _pViewVertex;
293  }
294 
297  inline void setPoint3D(const Vec3r &iPoint3D)
298  {
299  _Point3D = iPoint3D;
300  }
301 
303  inline void setPoint2D(const Vec3r &iPoint2D)
304  {
305  _Point2D = iPoint2D;
306  }
307 
310  inline void AddNormal(const Vec3r &iNormal)
311  {
312  _Normals.insert(iNormal); // if iNormal in the set already exists, nothing is done
313  }
314 
316  {
317  if (_curvature_info) { // Q. is this an error condition? (T.K. 02-May-2011)
318  delete _curvature_info;
319  }
320  _curvature_info = ci;
321  }
322 
324  {
325  return _curvature_info;
326  }
327 
328 #if 0
329  /* Fredo's normal and curvature*/
330  void setCurvatureFredo(real c)
331  {
332  _curvatureFredo = c;
333  }
334 
335  void setDirectionFredo(Vec2r d)
336  {
337  _directionFredo = d;
338  }
339 
340  real curvatureFredo()
341  {
342  return _curvatureFredo;
343  }
344 
345  const Vec2r directionFredo()
346  {
347  return _directionFredo;
348  }
349 #endif
350 
352  inline void setId(const Id &id)
353  {
354  _Id = id;
355  }
356 
357  inline void setFEdges(const vector<FEdge *> &iFEdges)
358  {
359  _FEdges = iFEdges;
360  }
361 
362  inline void setShape(SShape *iShape)
363  {
364  _Shape = iShape;
365  }
366 
367  inline void setViewVertex(ViewVertex *iViewVertex)
368  {
369  _pViewVertex = iViewVertex;
370  }
371 
373  inline void AddFEdge(FEdge *iFEdge)
374  {
375  _FEdges.push_back(iFEdge);
376  }
377 
379  inline void RemoveFEdge(FEdge *iFEdge)
380  {
381  for (vector<FEdge *>::iterator fe = _FEdges.begin(), fend = _FEdges.end(); fe != fend; fe++) {
382  if (iFEdge == (*fe)) {
383  _FEdges.erase(fe);
384  break;
385  }
386  }
387  }
388 
389  /* replaces edge 1 by edge 2 in the list of edges */
390  inline void Replace(FEdge *e1, FEdge *e2)
391  {
392  vector<FEdge *>::iterator insertedfe;
393  for (vector<FEdge *>::iterator fe = _FEdges.begin(), fend = _FEdges.end(); fe != fend; fe++) {
394  if ((*fe) == e1) {
395  insertedfe = _FEdges.insert(fe, e2); // inserts e2 before fe.
396  // returns an iterator pointing toward e2. fe is invalidated.
397  // we want to remove e1, but we can't use fe anymore:
398  ++insertedfe; // insertedfe points now to e1
399  _FEdges.erase(insertedfe);
400  return;
401  }
402  }
403  }
404 
405  public:
406  /* Information access interface */
407  FEdge *fedge(); // for non T vertex
408 
409  inline const Vec3r &point2d() const
410  {
411  return point2D();
412  }
413 
414  inline const Vec3r &point3d() const
415  {
416  return point3D();
417  }
418 
419  inline Vec3r normal() const
420  {
421  if (_Normals.size() == 1) {
422  return (*(_Normals.begin()));
423  }
424  Exception::raiseException();
425  return *(_Normals.begin());
426  }
427 
428  // Material material() const ;
429  Id shape_id() const;
430  const SShape *shape() const;
431  float shape_importance() const;
432 
433  int qi() const;
434  occluder_container::const_iterator occluders_begin() const;
435  occluder_container::const_iterator occluders_end() const;
436  bool occluders_empty() const;
437  int occluders_size() const;
438  const Polygon3r &occludee() const;
439  const SShape *occluded_shape() const;
440  bool occludee_empty() const;
441  real z_discontinuity() const;
442 #if 0
443  inline float local_average_depth() const;
444  inline float local_depth_variance() const;
445  inline real local_average_density(float sigma = 2.3f) const;
446  inline Vec3r shaded_color() const;
447  inline Vec3r orientation2d() const;
448  inline Vec3r orientation3d() const;
449  inline Vec3r curvature2d_as_vector() const;
451  inline real curvature2d_as_angle() const;
452 #endif
453 
454 #ifdef WITH_CXX_GUARDEDALLOC
455  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SVertex")
456 #endif
457 };
458 
459 /**********************************/
460 /* */
461 /* */
462 /* FEdge */
463 /* */
464 /* */
465 /**********************************/
466 
467 class ViewEdge;
468 
477 class FEdge : public Interface1D {
478  public: // Implementation of Interface0D
480  virtual string getExactTypeName() const
481  {
482  return "FEdge";
483  }
484 
485  // Data access methods
486 
488  virtual real getLength2D() const
489  {
490  if (!_VertexA || !_VertexB) {
491  return 0;
492  }
493  return (_VertexB->getPoint2D() - _VertexA->getPoint2D()).norm();
494  }
495 
497  virtual Id getId() const
498  {
499  return _Id;
500  }
501 
502  public:
503  // An edge can only be of one kind (SILHOUETTE or BORDER, etc...)
504  // For an multi-nature edge there must be several different FEdge.
505  // DEBUG:
506  // Vec3r A;
507  // Vec3r u;
508  // vector<Polygon3r> _Occludees;
509  // Vec3r intersection;
510  // vector<Vec3i> _Cells;
511 
512  protected:
517  // vector<Polygon3r> _Occluders; // visibility // NOT HANDLED BY THE COPY CONSTRUCTOR!!
518 
519  FEdge *_NextEdge; // next edge on the chain
522  // Sometimes we need to deport the visibility computation onto another edge. For example the
523  // exact edges use edges of the mesh to compute their visibility
524 
525  Polygon3r _aFace; // The occluded face which lies on the right of a silhouette edge
528 
529  bool _isSmooth;
530 
532 
534 
535  public:
539  void *userdata;
540 
542  inline FEdge()
543  {
544  userdata = NULL;
545  _VertexA = NULL;
546  _VertexB = NULL;
547  _Nature = Nature::NO_FEATURE;
548  _NextEdge = NULL;
549  _PreviousEdge = NULL;
550  _ViewEdge = NULL;
551  //_hasVisibilityPoint = false;
552  _occludeeEmpty = true;
553  _isSmooth = false;
554  _isInImage = true;
555  _isTemporary = false;
556  }
557 
559  inline FEdge(SVertex *vA, SVertex *vB)
560  {
561  userdata = NULL;
562  _VertexA = vA;
563  _VertexB = vB;
564  _Nature = Nature::NO_FEATURE;
565  _NextEdge = NULL;
566  _PreviousEdge = NULL;
567  _ViewEdge = NULL;
568  //_hasVisibilityPoint = false;
569  _occludeeEmpty = true;
570  _isSmooth = false;
571  _isInImage = true;
572  _isTemporary = false;
573  }
574 
576  inline FEdge(FEdge &iBrother)
577  {
578  _VertexA = iBrother.vertexA();
579  _VertexB = iBrother.vertexB();
580  _NextEdge = iBrother.nextEdge();
581  _PreviousEdge = iBrother._PreviousEdge;
582  _Nature = iBrother.getNature();
583  _Id = iBrother._Id;
584  _ViewEdge = iBrother._ViewEdge;
585  //_hasVisibilityPoint = iBrother._hasVisibilityPoint;
586  //_VisibilityPointA = iBrother._VisibilityPointA;
587  //_VisibilityPointB = iBrother._VisibilityPointB;
588  _aFace = iBrother._aFace;
589  _occludeeEmpty = iBrother._occludeeEmpty;
590  _isSmooth = iBrother._isSmooth;
591  _isInImage = iBrother._isInImage;
592  _isTemporary = iBrother._isTemporary;
593  iBrother.userdata = this;
594  userdata = 0;
595  }
596 
598  virtual ~FEdge()
599  {
600  }
601 
603  virtual FEdge *duplicate()
604  {
605  FEdge *clone = new FEdge(*this);
606  return clone;
607  }
608 
609  /* accessors */
611  inline SVertex *vertexA()
612  {
613  return _VertexA;
614  }
615 
617  inline SVertex *vertexB()
618  {
619  return _VertexB;
620  }
621 
623  inline SVertex *operator[](const unsigned short int &i) const
624  {
625  return (i % 2 == 0) ? _VertexA : _VertexB;
626  }
627 
630  {
631  return _Nature;
632  }
633 
637  inline FEdge *nextEdge()
638  {
639  return _NextEdge;
640  }
641 
645  inline FEdge *previousEdge()
646  {
647  return _PreviousEdge;
648  }
649 
650  inline SShape *shape()
651  {
652  return _VertexA->shape();
653  }
654 
655 #if 0
656  inline int invisibility() const
657  {
658  return _Occluders.size();
659  }
660 #endif
661 
662  int invisibility() const;
663 
664 #if 0
665  inline const vector<Polygon3r> &occluders() const
666  {
667  return _Occluders;
668  }
669 #endif
670 
672  inline ViewEdge *viewedge() const
673  {
674  return _ViewEdge;
675  }
676 
677  inline Vec3r center3d()
678  {
679  return Vec3r((_VertexA->point3D() + _VertexB->point3D()) / 2.0);
680  }
681 
682  inline Vec3r center2d()
683  {
684  return Vec3r((_VertexA->point2D() + _VertexB->point2D()) / 2.0);
685  }
686 
687 #if 0
688  inline bool hasVisibilityPoint() const
689  {
690  return _hasVisibilityPoint;
691  }
692 
693  inline Vec3r visibilityPointA() const
694  {
695  return _VisibilityPointA;
696  }
697 
698  inline Vec3r visibilityPointB() const
699  {
700  return _VisibilityPointB;
701  }
702 #endif
703 
704  inline const Polygon3r &aFace() const
705  {
706  return _aFace;
707  }
708 
710  {
711  return _occludeeIntersection;
712  }
713 
714  inline bool getOccludeeEmpty()
715  {
716  return _occludeeEmpty;
717  }
718 
720  inline bool isSmooth() const
721  {
722  return _isSmooth;
723  }
724 
725  inline bool isInImage() const
726  {
727  return _isInImage;
728  }
729 
730  inline bool isTemporary() const
731  {
732  return _isTemporary;
733  }
734 
735  /* modifiers */
737  inline void setVertexA(SVertex *vA)
738  {
739  _VertexA = vA;
740  }
741 
743  inline void setVertexB(SVertex *vB)
744  {
745  _VertexB = vB;
746  }
747 
749  inline void setId(const Id &id)
750  {
751  _Id = id;
752  }
753 
755  inline void setNextEdge(FEdge *iEdge)
756  {
757  _NextEdge = iEdge;
758  }
759 
761  inline void setPreviousEdge(FEdge *iEdge)
762  {
763  _PreviousEdge = iEdge;
764  }
765 
767  inline void setNature(Nature::EdgeNature iNature)
768  {
769  _Nature = iNature;
770  }
771 
772 #if 0
773  inline void AddOccluder(Polygon3r &iPolygon)
774  {
775  _Occluders.push_back(iPolygon);
776  }
777 #endif
778 
780  inline void setViewEdge(ViewEdge *iViewEdge)
781  {
782  _ViewEdge = iViewEdge;
783  }
784 
785 #if 0
786  inline void setHasVisibilityPoint(bool iBool)
787  {
788  _hasVisibilityPoint = iBool;
789  }
790 
791  inline void setVisibilityPointA(const Vec3r &iPoint)
792  {
793  _VisibilityPointA = iPoint;
794  }
795 
796  inline void setVisibilityPointB(const Vec3r &iPoint)
797  {
798  _VisibilityPointB = iPoint;
799  }
800 #endif
801 
802  inline void setaFace(Polygon3r &iFace)
803  {
804  _aFace = iFace;
805  }
806 
807  inline void setOccludeeIntersection(const Vec3r &iPoint)
808  {
809  _occludeeIntersection = iPoint;
810  }
811 
812  inline void setOccludeeEmpty(bool iempty)
813  {
814  _occludeeEmpty = iempty;
815  }
816 
820  inline void setSmooth(bool iFlag)
821  {
822  _isSmooth = iFlag;
823  }
824 
825  inline void setIsInImage(bool iFlag)
826  {
827  _isInImage = iFlag;
828  }
829 
830  inline void setTemporary(bool iFlag)
831  {
832  _isTemporary = iFlag;
833  }
834 
835  /* checks whether two FEdge have a common vertex.
836  * Returns a pointer on the common vertex if it exists, NULL otherwise.
837  */
838  static inline SVertex *CommonVertex(FEdge *iEdge1, FEdge *iEdge2)
839  {
840  if ((NULL == iEdge1) || (NULL == iEdge2)) {
841  return NULL;
842  }
843 
844  SVertex *sv1 = iEdge1->vertexA();
845  SVertex *sv2 = iEdge1->vertexB();
846  SVertex *sv3 = iEdge2->vertexA();
847  SVertex *sv4 = iEdge2->vertexB();
848 
849  if ((sv1 == sv3) || (sv1 == sv4)) {
850  return sv1;
851  }
852  else if ((sv2 == sv3) || (sv2 == sv4)) {
853  return sv2;
854  }
855 
856  return NULL;
857  }
858 
859  inline const SVertex *min2d() const
860  {
861  if (_VertexA->point2D() < _VertexB->point2D()) {
862  return _VertexA;
863  }
864  else {
865  return _VertexB;
866  }
867  }
868 
869  inline const SVertex *max2d() const
870  {
871  if (_VertexA->point2D() < _VertexB->point2D()) {
872  return _VertexB;
873  }
874  else {
875  return _VertexA;
876  }
877  }
878 
879  /* Information access interface */
880 
881  // Material material() const;
882  Id shape_id() const;
883  const SShape *shape() const;
884  float shape_importance() const;
885 
886  inline const int qi() const
887  {
888  return invisibility();
889  }
890 
891  occluder_container::const_iterator occluders_begin() const;
892  occluder_container::const_iterator occluders_end() const;
893  bool occluders_empty() const;
894  int occluders_size() const;
895 
896  inline const Polygon3r &occludee() const
897  {
898  return aFace();
899  }
900 
901  const SShape *occluded_shape() const;
902 
903 #if 0
904  inline const bool occludee_empty() const
905  {
906  return _occludeeEmpty;
907  }
908 #endif
909 
910  bool occludee_empty() const;
911  real z_discontinuity() const;
912 
913 #if 0
914  inline float local_average_depth(int iCombination = 0) const;
915  inline float local_depth_variance(int iCombination = 0) const;
916  inline real local_average_density(float sigma = 2.3f, int iCombination = 0) const;
917  inline Vec3r shaded_color(int iCombination = 0) const
918  {
919  }
920 #endif
921 
922  int viewedge_nature() const;
923 
924  // float viewedge_length() const;
925 
926  inline Vec3r orientation2d() const
927  {
928  return Vec3r(_VertexB->point2d() - _VertexA->point2d());
929  }
930 
931  inline Vec3r orientation3d() const
932  {
933  return Vec3r(_VertexB->point3d() - _VertexA->point3d());
934  }
935 
936 #if 0
937  inline real curvature2d() const
938  {
939  return viewedge()->curvature2d((_VertexA->point2d() + _VertexB->point2d()) / 2.0);
940  }
941 
942  inline Vec3r curvature2d_as_vector(int iCombination = 0) const;
943 
944  /* angle in degrees*/
945  inline real curvature2d_as_angle(int iCombination = 0) const;
946 #endif
947 
948  // Iterator access (Interface1D)
950  virtual inline Interface0DIterator verticesBegin();
951 
953  virtual inline Interface0DIterator verticesEnd();
954 
961  virtual inline Interface0DIterator pointsBegin(float t = 0.0f);
962 
969  virtual inline Interface0DIterator pointsEnd(float t = 0.0f);
970 
971 #ifdef WITH_CXX_GUARDEDALLOC
972  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FEdge")
973 #endif
974 };
975 
976 //
977 // SVertexIterator
978 //
980 
981 namespace FEdgeInternal {
982 
984  public:
986  {
987  _vertex = NULL;
988  _edge = NULL;
989  }
990 
992  {
993  _vertex = vi._vertex;
994  _edge = vi._edge;
995  }
996 
998  {
999  _vertex = v;
1000  _edge = edge;
1001  }
1002 
1004  {
1005  _vertex = vi._vertex;
1006  _edge = vi._edge;
1007  return *this;
1008  }
1009 
1010  virtual string getExactTypeName() const
1011  {
1012  return "SVertexIterator";
1013  }
1014 
1015  virtual SVertex &operator*()
1016  {
1017  return *_vertex;
1018  }
1019 
1020  virtual SVertex *operator->()
1021  {
1022  return &(operator*());
1023  }
1024 
1026  {
1027  increment();
1028  return *this;
1029  }
1030 
1032  {
1033  SVertexIterator ret(*this);
1034  increment();
1035  return ret;
1036  }
1037 
1039  {
1040  decrement();
1041  return *this;
1042  }
1043 
1045  {
1046  SVertexIterator ret(*this);
1047  decrement();
1048  return ret;
1049  }
1050 
1051  virtual int increment()
1052  {
1053  if (_vertex == _edge->vertexB()) {
1054  _vertex = 0;
1055  return 0;
1056  }
1057  _vertex = _edge->vertexB();
1058  return 0;
1059  }
1060 
1061  virtual int decrement()
1062  {
1063  if (_vertex == _edge->vertexA()) {
1064  _vertex = 0;
1065  return 0;
1066  }
1067  _vertex = _edge->vertexA();
1068  return 0;
1069  }
1070 
1071  virtual bool isBegin() const
1072  {
1073  return _vertex == _edge->vertexA();
1074  }
1075 
1076  virtual bool isEnd() const
1077  {
1078  return _vertex == _edge->vertexB();
1079  }
1080 
1081  virtual bool operator==(const Interface0DIteratorNested &it) const
1082  {
1083  const SVertexIterator *it_exact = dynamic_cast<const SVertexIterator *>(&it);
1084  if (!it_exact) {
1085  return false;
1086  }
1087  return ((_vertex == it_exact->_vertex) && (_edge == it_exact->_edge));
1088  }
1089 
1090  virtual float t() const
1091  {
1092  if (_vertex == _edge->vertexA()) {
1093  return 0.0f;
1094  }
1095  return ((float)_edge->getLength2D());
1096  }
1097  virtual float u() const
1098  {
1099  if (_vertex == _edge->vertexA()) {
1100  return 0.0f;
1101  }
1102  return 1.0f;
1103  }
1104 
1105  virtual SVertexIterator *copy() const
1106  {
1107  return new SVertexIterator(*this);
1108  }
1109 
1110  private:
1111  SVertex *_vertex;
1112  FEdge *_edge;
1113 };
1114 
1115 } // end of namespace FEdgeInternal
1116 
1117 // Iterator access (implementation)
1118 
1119 Interface0DIterator FEdge::verticesBegin()
1120 {
1122  return ret;
1123 }
1124 
1125 Interface0DIterator FEdge::verticesEnd()
1126 {
1128  return ret;
1129 }
1130 
1131 Interface0DIterator FEdge::pointsBegin(float /*t*/)
1132 {
1133  return verticesBegin();
1134 }
1135 
1136 Interface0DIterator FEdge::pointsEnd(float /*t*/)
1137 {
1138  return verticesEnd();
1139 }
1140 
1146 class FEdgeSharp : public FEdge {
1147  protected:
1148  Vec3r _aNormal; // When following the edge, normal of the right face
1149  Vec3r _bNormal; // When following the edge, normal of the left face
1154 
1155  public:
1157  virtual string getExactTypeName() const
1158  {
1159  return "FEdgeSharp";
1160  }
1161 
1163  inline FEdgeSharp() : FEdge()
1164  {
1165  _aFrsMaterialIndex = _bFrsMaterialIndex = 0;
1166  _aFaceMark = _bFaceMark = false;
1167  }
1168 
1170  inline FEdgeSharp(SVertex *vA, SVertex *vB) : FEdge(vA, vB)
1171  {
1172  _aFrsMaterialIndex = _bFrsMaterialIndex = 0;
1173  _aFaceMark = _bFaceMark = false;
1174  }
1175 
1177  inline FEdgeSharp(FEdgeSharp &iBrother) : FEdge(iBrother)
1178  {
1179  _aNormal = iBrother._aNormal;
1180  _bNormal = iBrother._bNormal;
1181  _aFrsMaterialIndex = iBrother._aFrsMaterialIndex;
1182  _bFrsMaterialIndex = iBrother._bFrsMaterialIndex;
1183  _aFaceMark = iBrother._aFaceMark;
1184  _bFaceMark = iBrother._bFaceMark;
1185  }
1186 
1188  virtual ~FEdgeSharp()
1189  {
1190  }
1191 
1193  virtual FEdge *duplicate()
1194  {
1195  FEdge *clone = new FEdgeSharp(*this);
1196  return clone;
1197  }
1198 
1202  inline const Vec3r &normalA()
1203  {
1204  return _aNormal;
1205  }
1206 
1208  inline const Vec3r &normalB()
1209  {
1210  return _bNormal;
1211  }
1212 
1217  inline unsigned aFrsMaterialIndex() const
1218  {
1219  return _aFrsMaterialIndex;
1220  }
1221 
1225  const FrsMaterial &aFrsMaterial() const;
1226 
1228  inline unsigned bFrsMaterialIndex() const
1229  {
1230  return _bFrsMaterialIndex;
1231  }
1232 
1234  const FrsMaterial &bFrsMaterial() const;
1235 
1239  inline bool aFaceMark() const
1240  {
1241  return _aFaceMark;
1242  }
1243 
1245  inline bool bFaceMark() const
1246  {
1247  return _bFaceMark;
1248  }
1249 
1251  inline void setNormalA(const Vec3r &iNormal)
1252  {
1253  _aNormal = iNormal;
1254  }
1255 
1257  inline void setNormalB(const Vec3r &iNormal)
1258  {
1259  _bNormal = iNormal;
1260  }
1261 
1263  inline void setaFrsMaterialIndex(unsigned i)
1264  {
1265  _aFrsMaterialIndex = i;
1266  }
1267 
1269  inline void setbFrsMaterialIndex(unsigned i)
1270  {
1271  _bFrsMaterialIndex = i;
1272  }
1273 
1275  inline void setaFaceMark(bool iFaceMark)
1276  {
1277  _aFaceMark = iFaceMark;
1278  }
1279 
1281  inline void setbFaceMark(bool iFaceMark)
1282  {
1283  _bFaceMark = iFaceMark;
1284  }
1285 
1286 #ifdef WITH_CXX_GUARDEDALLOC
1287  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FEdgeSharp")
1288 #endif
1289 };
1290 
1294 class FEdgeSmooth : public FEdge {
1295  protected:
1298 #if 0
1299  bool _hasVisibilityPoint;
1300  Vec3r _VisibilityPointA; // The edge on which the visibility will be computed represented
1301  Vec3r _VisibilityPointB; // using its 2 extremity points A and B
1302 #endif
1303  void *_Face; // In case of exact silhouette, Face is the WFace crossed by Fedge
1304  // NOT HANDLED BY THE COPY CONSTRUCTEUR
1306 
1307  public:
1309  virtual string getExactTypeName() const
1310  {
1311  return "FEdgeSmooth";
1312  }
1313 
1315  inline FEdgeSmooth() : FEdge()
1316  {
1317  _Face = NULL;
1318  _FaceMark = false;
1319  _FrsMaterialIndex = 0;
1320  _isSmooth = true;
1321  }
1322 
1324  inline FEdgeSmooth(SVertex *vA, SVertex *vB) : FEdge(vA, vB)
1325  {
1326  _Face = NULL;
1327  _FaceMark = false;
1328  _FrsMaterialIndex = 0;
1329  _isSmooth = true;
1330  }
1331 
1333  inline FEdgeSmooth(FEdgeSmooth &iBrother) : FEdge(iBrother)
1334  {
1335  _Normal = iBrother._Normal;
1336  _Face = iBrother._Face;
1337  _FaceMark = iBrother._FaceMark;
1338  _FrsMaterialIndex = iBrother._FrsMaterialIndex;
1339  _isSmooth = true;
1340  }
1341 
1343  virtual ~FEdgeSmooth()
1344  {
1345  }
1346 
1348  virtual FEdge *duplicate()
1349  {
1350  FEdge *clone = new FEdgeSmooth(*this);
1351  return clone;
1352  }
1353 
1354  inline void *face() const
1355  {
1356  return _Face;
1357  }
1358 
1360  inline bool faceMark() const
1361  {
1362  return _FaceMark;
1363  }
1364 
1366  inline const Vec3r &normal()
1367  {
1368  return _Normal;
1369  }
1370 
1372  inline unsigned frs_materialIndex() const
1373  {
1374  return _FrsMaterialIndex;
1375  }
1376 
1378  const FrsMaterial &frs_material() const;
1379 
1380  inline void setFace(void *iFace)
1381  {
1382  _Face = iFace;
1383  }
1384 
1386  inline void setFaceMark(bool iFaceMark)
1387  {
1388  _FaceMark = iFaceMark;
1389  }
1390 
1392  inline void setNormal(const Vec3r &iNormal)
1393  {
1394  _Normal = iNormal;
1395  }
1396 
1398  inline void setFrsMaterialIndex(unsigned i)
1399  {
1400  _FrsMaterialIndex = i;
1401  }
1402 
1403 #ifdef WITH_CXX_GUARDEDALLOC
1404  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FEdgeSmooth")
1405 #endif
1406 };
1407 
1408 /**********************************/
1409 /* */
1410 /* */
1411 /* SShape */
1412 /* */
1413 /* */
1414 /**********************************/
1415 
1418 class SShape {
1419  private:
1420  vector<FEdge *> _chains; // list of fedges that are chains starting points.
1421  vector<SVertex *> _verticesList; // list of all vertices
1422  vector<FEdge *> _edgesList; // list of all edges
1423  Id _Id;
1424  string _Name;
1425  string _LibraryPath;
1426  BBox<Vec3r> _BBox;
1427  vector<FrsMaterial> _FrsMaterials;
1428 
1429  float _importance;
1430 
1431  ViewShape *_ViewShape;
1432 
1433  public:
1437  void *userdata; // added by E.T.
1438 
1440  inline SShape()
1441  {
1442  userdata = NULL;
1443  _importance = 0.0f;
1444  _ViewShape = NULL;
1445  }
1446 
1448  inline SShape(SShape &iBrother)
1449  {
1450  userdata = NULL;
1451  _Id = iBrother._Id;
1452  _Name = iBrother._Name;
1453  _LibraryPath = iBrother._LibraryPath;
1454  _BBox = iBrother.bbox();
1455  _FrsMaterials = iBrother._FrsMaterials;
1456  _importance = iBrother._importance;
1457  _ViewShape = iBrother._ViewShape;
1458 
1459  //---------
1460  // vertices
1461  //---------
1462  vector<SVertex *>::iterator sv, svend;
1463  vector<SVertex *> &verticesList = iBrother.getVertexList();
1464  for (sv = verticesList.begin(), svend = verticesList.end(); sv != svend; sv++) {
1465  SVertex *newv = new SVertex(*(*sv));
1466  newv->setShape(this);
1467  _verticesList.push_back(newv);
1468  }
1469 
1470  //------
1471  // edges
1472  //------
1473  vector<FEdge *>::iterator e, eend;
1474  vector<FEdge *> &edgesList = iBrother.getEdgeList();
1475  for (e = edgesList.begin(), eend = edgesList.end(); e != eend; e++) {
1476  FEdge *newe = (*e)->duplicate();
1477  _edgesList.push_back(newe);
1478  }
1479 
1480  //-------------------------
1481  // starting chain edges
1482  //-------------------------
1483  vector<FEdge *>::iterator fe, fend;
1484  vector<FEdge *> &fedges = iBrother.getChains();
1485  for (fe = fedges.begin(), fend = fedges.end(); fe != fend; fe++) {
1486  _chains.push_back((FEdge *)((*fe)->userdata));
1487  }
1488 
1489  //-------------------------
1490  // remap edges in vertices:
1491  //-------------------------
1492  for (sv = _verticesList.begin(), svend = _verticesList.end(); sv != svend; sv++) {
1493  const vector<FEdge *> &fedgeList = (*sv)->fedges();
1494  vector<FEdge *> newfedgelist;
1495  for (vector<FEdge *>::const_iterator fed = fedgeList.begin(), fedend = fedgeList.end();
1496  fed != fedend;
1497  fed++) {
1498  FEdge *current = *fed;
1499  newfedgelist.push_back((FEdge *)current->userdata);
1500  }
1501  (*sv)->setFEdges(newfedgelist);
1502  }
1503 
1504  //-------------------------------------
1505  // remap vertices and nextedge in edges:
1506  //-------------------------------------
1507  for (e = _edgesList.begin(), eend = _edgesList.end(); e != eend; e++) {
1508  (*e)->setVertexA((SVertex *)((*e)->vertexA()->userdata));
1509  (*e)->setVertexB((SVertex *)((*e)->vertexB()->userdata));
1510  (*e)->setNextEdge((FEdge *)((*e)->nextEdge()->userdata));
1511  (*e)->setPreviousEdge((FEdge *)((*e)->previousEdge()->userdata));
1512  }
1513 
1514  // reset all brothers userdata to NULL:
1515  //-------------------------------------
1516  //---------
1517  // vertices
1518  //---------
1519  for (sv = _verticesList.begin(), svend = _verticesList.end(); sv != svend; sv++) {
1520  (*sv)->userdata = NULL;
1521  }
1522 
1523  //------
1524  // edges
1525  //------
1526  for (e = _edgesList.begin(), eend = _edgesList.end(); e != eend; e++) {
1527  (*e)->userdata = NULL;
1528  }
1529  }
1530 
1532  virtual SShape *duplicate()
1533  {
1534  SShape *clone = new SShape(*this);
1535  return clone;
1536  }
1537 
1539  virtual inline ~SShape()
1540  {
1541  vector<SVertex *>::iterator sv, svend;
1542  vector<FEdge *>::iterator e, eend;
1543  if (0 != _verticesList.size()) {
1544  for (sv = _verticesList.begin(), svend = _verticesList.end(); sv != svend; sv++) {
1545  delete (*sv);
1546  }
1547  _verticesList.clear();
1548  }
1549 
1550  if (0 != _edgesList.size()) {
1551  for (e = _edgesList.begin(), eend = _edgesList.end(); e != eend; e++) {
1552  delete (*e);
1553  }
1554  _edgesList.clear();
1555  }
1556 
1558  //-----------------------
1559  if (0 != _chains.size()) {
1560  _chains.clear();
1561  }
1562  }
1563 
1565  inline void AddEdge(FEdge *iEdge)
1566  {
1567  _edgesList.push_back(iEdge);
1568  }
1569 
1573  inline void AddNewVertex(SVertex *iv)
1574  {
1575  iv->setShape(this);
1576  _verticesList.push_back(iv);
1577  }
1578 
1579  inline void AddChain(FEdge *iEdge)
1580  {
1581  _chains.push_back(iEdge);
1582  }
1583 
1584  inline SVertex *CreateSVertex(const Vec3r &P3D, const Vec3r &P2D, const Id &id)
1585  {
1586  SVertex *Ia = new SVertex(P3D, id);
1587  Ia->setPoint2D(P2D);
1588  AddNewVertex(Ia);
1589  return Ia;
1590  }
1591 
1610  inline void SplitEdge(FEdge *fe, const vector<Vec2r> &iParameters, vector<FEdge *> &ioNewEdges)
1611  {
1612  SVertex *ioA = fe->vertexA();
1613  SVertex *ioB = fe->vertexB();
1614  Vec3r A = ioA->point3D();
1615  Vec3r B = ioB->point3D();
1616  Vec3r a = ioA->point2D();
1617  Vec3r b = ioB->point2D();
1618 
1619  Vec3r newpoint3d, newpoint2d;
1620  vector<SVertex *> intersections;
1621  real t, T;
1622  for (vector<Vec2r>::const_iterator p = iParameters.begin(), pend = iParameters.end();
1623  p != pend;
1624  p++) {
1625  T = (*p)[0];
1626  t = (*p)[1];
1627 
1628  if ((t < 0) || (t > 1)) {
1629  cerr << "Warning: Intersection out of range for edge " << ioA->getId() << " - "
1630  << ioB->getId() << endl;
1631  }
1632 
1633  // compute the 3D and 2D coordinates for the intersections points:
1634  newpoint3d = Vec3r(A + T * (B - A));
1635  newpoint2d = Vec3r(a + t * (b - a));
1636 
1637  // create new SVertex:
1638  // (we keep B's id)
1639  SVertex *newVertex = new SVertex(newpoint3d, ioB->getId());
1640  newVertex->setPoint2D(newpoint2d);
1641 
1642  // Add this vertex to the intersections list:
1643  intersections.push_back(newVertex);
1644 
1645  // Add this vertex to this sshape:
1646  AddNewVertex(newVertex);
1647  }
1648 
1649  for (vector<SVertex *>::iterator sv = intersections.begin(), svend = intersections.end();
1650  sv != svend;
1651  sv++) {
1652  // SVertex *svA = fe->vertexA();
1653  SVertex *svB = fe->vertexB();
1654 
1655  // We split edge AB into AA' and A'B. A' and A'B are created.
1656  // AB becomes (address speaking) AA'. B is updated.
1657  //--------------------------------------------------
1658  // The edge AB becomes edge AA'.
1659  (fe)->setVertexB((*sv));
1660  // a new edge, A'B is created.
1661  FEdge *newEdge;
1662  if (fe->isSmooth()) {
1663  newEdge = new FEdgeSmooth((*sv), svB);
1664  FEdgeSmooth *se = dynamic_cast<FEdgeSmooth *>(newEdge);
1665  FEdgeSmooth *fes = dynamic_cast<FEdgeSmooth *>(fe);
1667  }
1668  else {
1669  newEdge = new FEdgeSharp((*sv), svB);
1670  FEdgeSharp *se = dynamic_cast<FEdgeSharp *>(newEdge);
1671  FEdgeSharp *fes = dynamic_cast<FEdgeSharp *>(fe);
1674  }
1675 
1676  newEdge->setNature((fe)->getNature());
1677 
1678  // to build a new chain:
1679  AddChain(newEdge);
1680  // add the new edge to the sshape edges list.
1681  AddEdge(newEdge);
1682  // add new edge to the list of new edges passed as argument:
1683  ioNewEdges.push_back(newEdge);
1684 
1685  // update edge A'B for the next pointing edge
1686  newEdge->setNextEdge((fe)->nextEdge());
1687  fe->nextEdge()->setPreviousEdge(newEdge);
1688  Id id(fe->getId().getFirst(), fe->getId().getSecond() + 1);
1689  newEdge->setId(fe->getId());
1690  fe->setId(id);
1691 
1692  // update edge AA' for the next pointing edge
1693  // ioEdge->setNextEdge(newEdge);
1694  (fe)->setNextEdge(NULL);
1695 
1696  // update vertex pointing edges list:
1697  // -- vertex B --
1698  svB->Replace((fe), newEdge);
1699  // -- vertex A' --
1700  (*sv)->AddFEdge((fe));
1701  (*sv)->AddFEdge(newEdge);
1702  }
1703  }
1704 
1705  /* splits an edge into 2 edges. The new vertex and edge are added to the sshape list of vertices
1706  * and edges a new chain is also created. returns the new edge. ioEdge The edge that gets
1707  * splitted newpoint x,y,z coordinates of the new point.
1708  */
1709  inline FEdge *SplitEdgeIn2(FEdge *ioEdge, SVertex *ioNewVertex)
1710  {
1711  // soc unused - SVertex *A = ioEdge->vertexA();
1712  SVertex *B = ioEdge->vertexB();
1713 
1714  // We split edge AB into AA' and A'B. A' and A'B are created.
1715  // AB becomes (address speaking) AA'. B is updated.
1716  //--------------------------------------------------
1717  // a new edge, A'B is created.
1718  FEdge *newEdge;
1719  if (ioEdge->isSmooth()) {
1720  newEdge = new FEdgeSmooth(ioNewVertex, B);
1721  FEdgeSmooth *se = dynamic_cast<FEdgeSmooth *>(newEdge);
1722  FEdgeSmooth *fes = dynamic_cast<FEdgeSmooth *>(ioEdge);
1723  se->setNormal(fes->normal());
1725  se->setFaceMark(fes->faceMark());
1726  }
1727  else {
1728  newEdge = new FEdgeSharp(ioNewVertex, B);
1729  FEdgeSharp *se = dynamic_cast<FEdgeSharp *>(newEdge);
1730  FEdgeSharp *fes = dynamic_cast<FEdgeSharp *>(ioEdge);
1731  se->setNormalA(fes->normalA());
1732  se->setNormalB(fes->normalB());
1735  se->setaFaceMark(fes->aFaceMark());
1736  se->setbFaceMark(fes->bFaceMark());
1737  }
1738  newEdge->setNature(ioEdge->getNature());
1739 
1740  if (ioEdge->nextEdge() != 0) {
1741  ioEdge->nextEdge()->setPreviousEdge(newEdge);
1742  }
1743 
1744  // update edge A'B for the next pointing edge
1745  newEdge->setNextEdge(ioEdge->nextEdge());
1746  // update edge A'B for the previous pointing edge
1747  newEdge->setPreviousEdge(0); // because it is now a TVertex
1748  Id id(ioEdge->getId().getFirst(), ioEdge->getId().getSecond() + 1);
1749  newEdge->setId(ioEdge->getId());
1750  ioEdge->setId(id);
1751 
1752  // update edge AA' for the next pointing edge
1753  ioEdge->setNextEdge(0); // because it is now a TVertex
1754 
1755  // update vertex pointing edges list:
1756  // -- vertex B --
1757  B->Replace(ioEdge, newEdge);
1758  // -- vertex A' --
1759  ioNewVertex->AddFEdge(ioEdge);
1760  ioNewVertex->AddFEdge(newEdge);
1761 
1762  // to build a new chain:
1763  AddChain(newEdge);
1764  AddEdge(newEdge); // FIXME ??
1765 
1766  // The edge AB becomes edge AA'.
1767  ioEdge->setVertexB(ioNewVertex);
1768 
1769  if (ioEdge->isSmooth()) {
1770  ((FEdgeSmooth *)newEdge)->setFace(((FEdgeSmooth *)ioEdge)->face());
1771  }
1772 
1773  return newEdge;
1774  }
1775 
1777  inline void setBBox(const BBox<Vec3r> &iBBox)
1778  {
1779  _BBox = iBBox;
1780  }
1781 
1783  inline void ComputeBBox()
1784  {
1785  if (0 == _verticesList.size()) {
1786  return;
1787  }
1788 
1789  Vec3r firstVertex = _verticesList[0]->point3D();
1790  real XMax = firstVertex[0];
1791  real YMax = firstVertex[1];
1792  real ZMax = firstVertex[2];
1793 
1794  real XMin = firstVertex[0];
1795  real YMin = firstVertex[1];
1796  real ZMin = firstVertex[2];
1797 
1798  vector<SVertex *>::iterator v, vend;
1799  // parse all the coordinates to find the Xmax, YMax, ZMax
1800  for (v = _verticesList.begin(), vend = _verticesList.end(); v != vend; v++) {
1801  Vec3r vertex = (*v)->point3D();
1802  // X
1803  real x = vertex[0];
1804  if (x > XMax) {
1805  XMax = x;
1806  }
1807  else if (x < XMin) {
1808  XMin = x;
1809  }
1810 
1811  // Y
1812  real y = vertex[1];
1813  if (y > YMax) {
1814  YMax = y;
1815  }
1816  else if (y < YMin) {
1817  YMin = y;
1818  }
1819 
1820  // Z
1821  real z = vertex[2];
1822  if (z > ZMax) {
1823  ZMax = z;
1824  }
1825  else if (z < ZMin) {
1826  ZMin = z;
1827  }
1828  }
1829 
1830  setBBox(BBox<Vec3r>(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax)));
1831  }
1832 
1833  inline void RemoveEdgeFromChain(FEdge *iEdge)
1834  {
1835  for (vector<FEdge *>::iterator fe = _chains.begin(), feend = _chains.end(); fe != feend;
1836  fe++) {
1837  if (iEdge == (*fe)) {
1838  _chains.erase(fe);
1839  break;
1840  }
1841  }
1842  }
1843 
1844  inline void RemoveEdge(FEdge *iEdge)
1845  {
1846  for (vector<FEdge *>::iterator fe = _edgesList.begin(), feend = _edgesList.end(); fe != feend;
1847  fe++) {
1848  if (iEdge == (*fe)) {
1849  _edgesList.erase(fe);
1850  break;
1851  }
1852  }
1853  }
1854 
1855  /* accessors */
1857  inline vector<SVertex *> &getVertexList()
1858  {
1859  return _verticesList;
1860  }
1861 
1863  inline vector<FEdge *> &getEdgeList()
1864  {
1865  return _edgesList;
1866  }
1867 
1868  inline vector<FEdge *> &getChains()
1869  {
1870  return _chains;
1871  }
1872 
1874  inline const BBox<Vec3r> &bbox()
1875  {
1876  return _BBox;
1877  }
1878 
1880  inline const FrsMaterial &frs_material(unsigned i) const
1881  {
1882  return _FrsMaterials[i];
1883  }
1884 
1886  inline const vector<FrsMaterial> &frs_materials() const
1887  {
1888  return _FrsMaterials;
1889  }
1890 
1892  {
1893  return _ViewShape;
1894  }
1895 
1896  inline float importance() const
1897  {
1898  return _importance;
1899  }
1900 
1902  inline Id getId() const
1903  {
1904  return _Id;
1905  }
1906 
1908  inline const string &getName() const
1909  {
1910  return _Name;
1911  }
1912 
1914  inline const string &getLibraryPath() const
1915  {
1916  return _LibraryPath;
1917  }
1918 
1919  /* Modififers */
1921  inline void setId(Id id)
1922  {
1923  _Id = id;
1924  }
1925 
1927  inline void setName(const string &name)
1928  {
1929  _Name = name;
1930  }
1931 
1933  inline void setLibraryPath(const string &path)
1934  {
1935  _LibraryPath = path;
1936  }
1937 
1939  inline void setFrsMaterials(const vector<FrsMaterial> &iMaterials)
1940  {
1941  _FrsMaterials = iMaterials;
1942  }
1943 
1944  inline void setViewShape(ViewShape *iShape)
1945  {
1946  _ViewShape = iShape;
1947  }
1948 
1949  inline void setImportance(float importance)
1950  {
1951  _importance = importance;
1952  }
1953 
1954 #ifdef WITH_CXX_GUARDEDALLOC
1955  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SShape")
1956 #endif
1957 };
1958 
1959 } /* namespace Freestyle */
_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 z
_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
Interface to 0D elts.
Interface 1D and related tools definitions.
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
#define A
virtual SVertexIterator & operator++()
Definition: Silhouette.h:1025
virtual bool operator==(const Interface0DIteratorNested &it) const
Definition: Silhouette.h:1081
virtual string getExactTypeName() const
Definition: Silhouette.h:1010
virtual SVertexIterator & operator--()
Definition: Silhouette.h:1038
SVertexIterator(const SVertexIterator &vi)
Definition: Silhouette.h:991
SVertexIterator & operator=(const SVertexIterator &vi)
Definition: Silhouette.h:1003
virtual SVertexIterator * copy() const
Definition: Silhouette.h:1105
virtual SVertexIterator operator--(int)
Definition: Silhouette.h:1044
SVertexIterator(SVertex *v, FEdge *edge)
Definition: Silhouette.h:997
virtual SVertexIterator operator++(int)
Definition: Silhouette.h:1031
unsigned aFrsMaterialIndex() const
Definition: Silhouette.h:1217
void setbFrsMaterialIndex(unsigned i)
Definition: Silhouette.h:1269
void setaFaceMark(bool iFaceMark)
Definition: Silhouette.h:1275
virtual string getExactTypeName() const
Definition: Silhouette.h:1157
unsigned bFrsMaterialIndex() const
Definition: Silhouette.h:1228
virtual FEdge * duplicate()
Definition: Silhouette.h:1193
unsigned _aFrsMaterialIndex
Definition: Silhouette.h:1150
bool bFaceMark() const
Definition: Silhouette.h:1245
FEdgeSharp(FEdgeSharp &iBrother)
Definition: Silhouette.h:1177
void setNormalB(const Vec3r &iNormal)
Definition: Silhouette.h:1257
void setaFrsMaterialIndex(unsigned i)
Definition: Silhouette.h:1263
bool aFaceMark() const
Definition: Silhouette.h:1239
FEdgeSharp(SVertex *vA, SVertex *vB)
Definition: Silhouette.h:1170
void setbFaceMark(bool iFaceMark)
Definition: Silhouette.h:1281
const Vec3r & normalA()
Definition: Silhouette.h:1202
const Vec3r & normalB()
Definition: Silhouette.h:1208
void setNormalA(const Vec3r &iNormal)
Definition: Silhouette.h:1251
unsigned _bFrsMaterialIndex
Definition: Silhouette.h:1151
virtual string getExactTypeName() const
Definition: Silhouette.h:1309
unsigned frs_materialIndex() const
Definition: Silhouette.h:1372
bool faceMark() const
Definition: Silhouette.h:1360
void setNormal(const Vec3r &iNormal)
Definition: Silhouette.h:1392
virtual FEdge * duplicate()
Definition: Silhouette.h:1348
void * face() const
Definition: Silhouette.h:1354
FEdgeSmooth(FEdgeSmooth &iBrother)
Definition: Silhouette.h:1333
FEdgeSmooth(SVertex *vA, SVertex *vB)
Definition: Silhouette.h:1324
void setFaceMark(bool iFaceMark)
Definition: Silhouette.h:1386
const Vec3r & normal()
Definition: Silhouette.h:1366
void setFrsMaterialIndex(unsigned i)
Definition: Silhouette.h:1398
void setFace(void *iFace)
Definition: Silhouette.h:1380
virtual Id getId() const
Definition: Silhouette.h:497
bool getOccludeeEmpty()
Definition: Silhouette.h:714
void setOccludeeEmpty(bool iempty)
Definition: Silhouette.h:812
Vec3r center2d()
Definition: Silhouette.h:682
void setTemporary(bool iFlag)
Definition: Silhouette.h:830
const Vec3r & getOccludeeIntersection()
Definition: Silhouette.h:709
const int qi() const
Definition: Silhouette.h:886
const Polygon3r & aFace() const
Definition: Silhouette.h:704
void setVertexB(SVertex *vB)
Definition: Silhouette.h:743
static SVertex * CommonVertex(FEdge *iEdge1, FEdge *iEdge2)
Definition: Silhouette.h:838
SVertex * _VertexB
Definition: Silhouette.h:514
SVertex * operator[](const unsigned short int &i) const
Definition: Silhouette.h:623
const SVertex * max2d() const
Definition: Silhouette.h:869
virtual FEdge * duplicate()
Definition: Silhouette.h:603
ViewEdge * _ViewEdge
Definition: Silhouette.h:521
FEdge * _NextEdge
Definition: Silhouette.h:519
void setId(const Id &id)
Definition: Silhouette.h:749
SVertex * vertexA()
Definition: Silhouette.h:611
ViewEdge * viewedge() const
Definition: Silhouette.h:672
FEdge * previousEdge()
Definition: Silhouette.h:645
SVertex * _VertexA
Definition: Silhouette.h:513
Vec3r orientation2d() const
Definition: Silhouette.h:926
const SVertex * min2d() const
Definition: Silhouette.h:859
bool isInImage() const
Definition: Silhouette.h:725
bool isTemporary() const
Definition: Silhouette.h:730
void setViewEdge(ViewEdge *iViewEdge)
Definition: Silhouette.h:780
void setNextEdge(FEdge *iEdge)
Definition: Silhouette.h:755
FEdge(SVertex *vA, SVertex *vB)
Definition: Silhouette.h:559
SVertex * vertexB()
Definition: Silhouette.h:617
SShape * shape()
Definition: Silhouette.h:650
virtual real getLength2D() const
Definition: Silhouette.h:488
void setNature(Nature::EdgeNature iNature)
Definition: Silhouette.h:767
Vec3r _occludeeIntersection
Definition: Silhouette.h:526
Vec3r center3d()
Definition: Silhouette.h:677
const Polygon3r & occludee() const
Definition: Silhouette.h:896
void setSmooth(bool iFlag)
Definition: Silhouette.h:820
void setPreviousEdge(FEdge *iEdge)
Definition: Silhouette.h:761
void setIsInImage(bool iFlag)
Definition: Silhouette.h:825
virtual string getExactTypeName() const
Definition: Silhouette.h:480
bool isSmooth() const
Definition: Silhouette.h:720
void setaFace(Polygon3r &iFace)
Definition: Silhouette.h:802
FEdge * nextEdge()
Definition: Silhouette.h:637
Vec3r orientation3d() const
Definition: Silhouette.h:931
void setVertexA(SVertex *vA)
Definition: Silhouette.h:737
virtual ~FEdge()
Definition: Silhouette.h:598
Polygon3r _aFace
Definition: Silhouette.h:525
Nature::EdgeNature getNature() const
Definition: Silhouette.h:629
void setOccludeeIntersection(const Vec3r &iPoint)
Definition: Silhouette.h:807
FEdge * _PreviousEdge
Definition: Silhouette.h:520
Nature::EdgeNature _Nature
Definition: Silhouette.h:516
FEdge(FEdge &iBrother)
Definition: Silhouette.h:576
id_type getFirst() const
Definition: Id.h:76
id_type getSecond() const
Definition: Id.h:82
void RemoveEdgeFromChain(FEdge *iEdge)
Definition: Silhouette.h:1833
vector< SVertex * > & getVertexList()
Definition: Silhouette.h:1857
void setId(Id id)
Definition: Silhouette.h:1921
const string & getName() const
Definition: Silhouette.h:1908
virtual SShape * duplicate()
Definition: Silhouette.h:1532
ViewShape * viewShape()
Definition: Silhouette.h:1891
SVertex * CreateSVertex(const Vec3r &P3D, const Vec3r &P2D, const Id &id)
Definition: Silhouette.h:1584
void AddChain(FEdge *iEdge)
Definition: Silhouette.h:1579
const vector< FrsMaterial > & frs_materials() const
Definition: Silhouette.h:1886
void setFrsMaterials(const vector< FrsMaterial > &iMaterials)
Definition: Silhouette.h:1939
void setImportance(float importance)
Definition: Silhouette.h:1949
void setViewShape(ViewShape *iShape)
Definition: Silhouette.h:1944
float importance() const
Definition: Silhouette.h:1896
virtual ~SShape()
Definition: Silhouette.h:1539
const BBox< Vec3r > & bbox()
Definition: Silhouette.h:1874
vector< FEdge * > & getEdgeList()
Definition: Silhouette.h:1863
FEdge * SplitEdgeIn2(FEdge *ioEdge, SVertex *ioNewVertex)
Definition: Silhouette.h:1709
void setLibraryPath(const string &path)
Definition: Silhouette.h:1933
void SplitEdge(FEdge *fe, const vector< Vec2r > &iParameters, vector< FEdge * > &ioNewEdges)
Definition: Silhouette.h:1610
const string & getLibraryPath() const
Definition: Silhouette.h:1914
void RemoveEdge(FEdge *iEdge)
Definition: Silhouette.h:1844
void setBBox(const BBox< Vec3r > &iBBox)
Definition: Silhouette.h:1777
const FrsMaterial & frs_material(unsigned i) const
Definition: Silhouette.h:1880
SShape(SShape &iBrother)
Definition: Silhouette.h:1448
void AddNewVertex(SVertex *iv)
Definition: Silhouette.h:1573
Id getId() const
Definition: Silhouette.h:1902
void setName(const string &name)
Definition: Silhouette.h:1927
vector< FEdge * > & getChains()
Definition: Silhouette.h:1868
void AddEdge(FEdge *iEdge)
Definition: Silhouette.h:1565
const vector< FEdge * > & fedges()
Definition: Silhouette.h:262
virtual bool operator==(const SVertex &iBrother)
Definition: Silhouette.h:231
ViewVertex * viewvertex()
Definition: Silhouette.h:290
SShape * shape()
Definition: Silhouette.h:277
const Vec3r & point2d() const
Definition: Silhouette.h:409
virtual real getY() const
Definition: Silhouette.h:86
void setPoint2D(const Vec3r &iPoint2D)
Definition: Silhouette.h:303
void setViewVertex(ViewVertex *iViewVertex)
Definition: Silhouette.h:367
virtual ~SVertex()
Definition: Silhouette.h:216
void setShape(SShape *iShape)
Definition: Silhouette.h:362
Vec3r normal() const
Definition: Silhouette.h:419
fedges_container::iterator fedges_begin()
Definition: Silhouette.h:267
virtual Vec3r getPoint3D() const
Definition: Silhouette.h:98
void setCurvatureInfo(CurvatureInfo *ci)
Definition: Silhouette.h:315
real z() const
Definition: Silhouette.h:282
virtual real getX() const
Definition: Silhouette.h:80
fedges_container::iterator fedges_end()
Definition: Silhouette.h:272
set< Vec3r > normals()
Definition: Silhouette.h:251
void AddNormal(const Vec3r &iNormal)
Definition: Silhouette.h:310
virtual Vec2r getPoint2D() const
Definition: Silhouette.h:122
virtual string getExactTypeName() const
Definition: Silhouette.h:73
const Vec3r & point3D() const
Definition: Silhouette.h:237
void setPoint3D(const Vec3r &iPoint3D)
Definition: Silhouette.h:297
const CurvatureInfo * getCurvatureInfo() const
Definition: Silhouette.h:323
void AddFEdge(FEdge *iFEdge)
Definition: Silhouette.h:373
virtual real getProjectedZ() const
Definition: Silhouette.h:116
unsigned normalsSize() const
Definition: Silhouette.h:257
virtual real getZ() const
Definition: Silhouette.h:92
virtual Id getId() const
Definition: Silhouette.h:131
const Vec3r & point2D() const
Definition: Silhouette.h:242
const Vec3r & point3d() const
Definition: Silhouette.h:414
void RemoveFEdge(FEdge *iFEdge)
Definition: Silhouette.h:379
virtual real getProjectedY() const
Definition: Silhouette.h:110
void setId(const Id &id)
Definition: Silhouette.h:352
vector< FEdge * > fedges_container
Definition: Silhouette.h:152
SVertex(const Vec3r &iPoint3D, const Id &id)
Definition: Silhouette.h:185
void setFEdges(const vector< FEdge * > &iFEdges)
Definition: Silhouette.h:357
virtual real getProjectedX() const
Definition: Silhouette.h:104
virtual SVertex * duplicate()
Definition: Silhouette.h:224
SVertex(SVertex &iBrother)
Definition: Silhouette.h:196
void Replace(FEdge *e1, FEdge *e2)
Definition: Silhouette.h:390
#define T
#define B
FEdge * getFEdge(Interface0D &it1, Interface0D &it2)
Definition: Functions0D.cpp:32
VecMat::Vec2< real > Vec2r
Definition: Geom.h:36
VecMat::Vec3< real > Vec3r
Definition: Geom.h:42
static const EdgeNature NO_FEATURE
Definition: Nature.h:48
unsigned short VertexNature
Definition: Nature.h:32
unsigned short EdgeNature
Definition: Nature.h:46
Vec< T, N > operator*(const typename Vec< T, N >::value_type r, const Vec< T, N > &v)
Definition: VecMat.h:858
inherits from class Rep
Definition: AppCanvas.cpp:32
vector< ViewShape * > occluder_container
Definition: Silhouette.h:54
static unsigned c
Definition: RandGen.cpp:97
static unsigned a[3]
Definition: RandGen.cpp:92
double real
Definition: Precision.h:26
return ret