Blender  V2.93
ViewMap.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 
26 #include "Interface0D.h"
27 #include "Interface1D.h"
28 #include "Silhouette.h" // defines the embedding
29 
30 #include "../geometry/GeomUtils.h"
31 
32 #include "../system/BaseIterator.h"
33 #include "../system/FreestyleConfig.h"
34 
35 #ifdef WITH_CXX_GUARDEDALLOC
36 # include "MEM_guardedalloc.h"
37 #endif
38 
39 namespace Freestyle {
40 
41 /**********************************/
42 /* */
43 /* */
44 /* ViewMap */
45 /* */
46 /* */
47 /**********************************/
48 
49 /* Density
50  * Mean area depth value
51  * distance to a point
52  */
53 
54 class ViewVertex;
55 class ViewEdge;
56 class ViewShape;
57 class TVertex;
58 
60 class ViewMap {
61  public:
62  typedef vector<ViewEdge *> viewedges_container;
63  typedef vector<ViewVertex *> viewvertices_container;
64  typedef vector<ViewShape *> viewshapes_container;
65  typedef vector<SVertex *> svertices_container;
66  typedef vector<FEdge *> fedges_container;
67  typedef map<int, int> id_to_index_map;
68 
69  private:
70  static ViewMap *_pInstance;
71  viewshapes_container _VShapes; // view shapes
72  viewedges_container _VEdges; // view edges
73  viewvertices_container _VVertices; // view vertices
74  fedges_container _FEdges; // feature edges (embedded edges)
75  svertices_container _SVertices; // embedded vertices
76  BBox<Vec3r> _scene3DBBox;
77  // Mapping between the WShape or VShape id to the VShape index in the _VShapes vector. Used in
78  // the method viewShape(int id) to access a shape from its id.
79  id_to_index_map _shapeIdToIndex;
80 
81  public:
85  void *userdata;
86 
89  {
90  _pInstance = this;
91  userdata = NULL;
92  }
93 
95  virtual ~ViewMap();
96 
98  const ViewEdge *getClosestViewEdge(real x, real y) const;
99 
101  const FEdge *getClosestFEdge(real x, real y) const;
102 
103  /* accessors */
105  static inline ViewMap *getInstance()
106  {
107  return _pInstance;
108  }
109 
110  /* Returns the list of ViewShapes of the scene. */
112  {
113  return _VShapes;
114  }
115 
116  /* Returns the list of ViewEdges of the scene. */
118  {
119  return _VEdges;
120  }
121 
122  /* Returns the list of ViewVertices of the scene. */
124  {
125  return _VVertices;
126  }
127 
128  /* Returns the list of FEdges of the scene. */
130  {
131  return _FEdges;
132  }
133 
134  /* Returns the list of SVertices of the scene. */
136  {
137  return _SVertices;
138  }
139 
140  /* Returns an iterator pointing onto the first ViewEdge of the list. */
141  inline viewedges_container::iterator viewedges_begin()
142  {
143  return _VEdges.begin();
144  }
145 
146  inline viewedges_container::iterator viewedges_end()
147  {
148  return _VEdges.end();
149  }
150 
151  inline int viewedges_size()
152  {
153  return _VEdges.size();
154  }
155 
156  ViewShape *viewShape(unsigned id);
157 
159  {
160  return _shapeIdToIndex;
161  }
162 
165  {
166  return _scene3DBBox;
167  }
168 
169  /* modifiers */
170  void AddViewShape(ViewShape *iVShape);
171 
172  inline void AddViewEdge(ViewEdge *iVEdge)
173  {
174  _VEdges.push_back(iVEdge);
175  }
176 
177  inline void AddViewVertex(ViewVertex *iVVertex)
178  {
179  _VVertices.push_back(iVVertex);
180  }
181 
182  inline void AddFEdge(FEdge *iFEdge)
183  {
184  _FEdges.push_back(iFEdge);
185  }
186 
187  inline void AddSVertex(SVertex *iSVertex)
188  {
189  _SVertices.push_back(iSVertex);
190  }
191 
193  inline void setScene3dBBox(const BBox<Vec3r> &bbox)
194  {
195  _scene3DBBox = bbox;
196  }
197 
198  /* Creates a T vertex in the view map.
199  * A T vertex is the intersection between 2 FEdges (before these ones are splitted).
200  * The TVertex is a 2D intersection but it corresponds to a 3D point on each of the 2 FEdges.
201  * iA3D
202  * The 3D coordinates of the point corresponding to the intersection on the first edge.
203  * iA2D
204  * The x,y,z 2D coordinates of the projection of iA3D
205  * iFEdgeA
206  * The first FEdge
207  * iB3D
208  * The 3D coordinates of the point corresponding to the intersection on the second edge.
209  * iB2D
210  * The x,y,z 2D coordinates of the projection of iB3D
211  * iFEdgeB
212  * The second FEdge
213  * id
214  * The id that must be given to that TVertex
215  */
216  TVertex *CreateTVertex(const Vec3r &iA3D,
217  const Vec3r &iA2D,
218  FEdge *iFEdgeA,
219  const Vec3r &iB3D,
220  const Vec3r &iB2D,
221  FEdge *iFEdgeB,
222  const Id &id);
223 
224  /* Updates the structures to take into account the fact that a SVertex must now be considered as
225  * a ViewVertex iVertex The SVertex on top of which the ViewVertex is built (it is necessarily a
226  * NonTVertex because it is a SVertex) newViewEdges The new ViewEdges that must be add to the
227  * ViewMap
228  */
229  ViewVertex *InsertViewVertex(SVertex *iVertex, vector<ViewEdge *> &newViewEdges);
230 
231  /* connects a FEdge to the graph through a SVertex */
232  // FEdge *Connect(FEdge *ioEdge, SVertex *ioVertex);
233 
234  /* Clean temporary FEdges created by chaining */
235  virtual void Clean();
236 
237 #ifdef WITH_CXX_GUARDEDALLOC
238  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewMap")
239 #endif
240 };
241 
242 /**********************************/
243 /* */
244 /* */
245 /* ViewVertex */
246 /* */
247 /* */
248 /**********************************/
249 
250 class ViewEdge;
251 class SShape;
252 
253 namespace ViewVertexInternal {
254 
255 class edge_const_traits;
257 template<class Traits> class edge_iterator_base;
259 
260 } // namespace ViewVertexInternal
261 
270 class ViewVertex : public Interface0D {
271  public: // Implementation of Interface0D
273  virtual string getExactTypeName() const
274  {
275  return "ViewVertex";
276  }
277 
278  public:
279  friend class ViewShape;
280  typedef pair<ViewEdge *, bool> directedViewEdge; // if bool = true, the ViewEdge is incoming
281 
282  typedef vector<directedViewEdge> edges_container;
283 
288 
289  private:
290  Nature::VertexNature _Nature;
291 
292  public:
296  void *userdata;
297 
299  inline ViewVertex()
300  {
301  userdata = NULL;
302  _Nature = Nature::VIEW_VERTEX;
303  }
304 
306  {
307  userdata = NULL;
308  _Nature = Nature::VIEW_VERTEX | nature;
309  }
310 
311  protected:
313  inline ViewVertex(ViewVertex &iBrother)
314  {
315  _Nature = iBrother._Nature;
316  iBrother.userdata = this;
317  userdata = NULL;
318  }
319 
321  virtual ViewVertex *duplicate() = 0;
322 
323  public:
325  virtual ~ViewVertex()
326  {
327  }
328 
329  /* accessors */
332  {
333  return _Nature;
334  }
335 
336  /* modifiers */
338  inline void setNature(Nature::VertexNature iNature)
339  {
340  _Nature = iNature;
341  }
342 
343  /* Replaces old edge by new edge */
344  virtual void Replace(ViewEdge *, ViewEdge *)
345  {
346  }
347 
348  public:
349  /* iterators access */
350  // allows iteration on the edges that comes from/goes to this vertex in CCW order (order defined
351  // in 2D in the image plan)
352  virtual edge_iterator edges_begin() = 0;
353  virtual const_edge_iterator edges_begin() const = 0;
354  virtual edge_iterator edges_end() = 0;
355  virtual const_edge_iterator edges_end() const = 0;
356  virtual edge_iterator edges_iterator(ViewEdge *iEdge) = 0;
357  virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const = 0;
358 
359  // Iterator access
365 
370 
373 
374 #ifdef WITH_CXX_GUARDEDALLOC
375  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewVertex")
376 #endif
377 };
378 
379 /**********************************/
380 /* */
381 /* */
382 /* TVertex */
383 /* */
384 /* */
385 /**********************************/
386 
393 class TVertex : public ViewVertex {
394  public:
395  typedef vector<directedViewEdge *> edge_pointers_container;
396 
397  public: // Implementation of Interface0D
399  virtual string getExactTypeName() const
400  {
401  return "TVertex";
402  }
403 
404  // Data access methods
405  /* Returns the 3D x coordinate of the vertex. Ambiguous in this case. */
406  virtual real getX() const
407  {
408  cerr << "Warning: getX() undefined for this point" << endl;
409  return _FrontSVertex->point3D().x();
410  }
411 
412  virtual real getY() const
413  {
414  cerr << "Warning: getX() undefined for this point" << endl;
415  return _FrontSVertex->point3D().y();
416  }
417 
418  virtual real getZ() const
419  {
420  cerr << "Warning: getX() undefined for this point" << endl;
421  return _FrontSVertex->point3D().z();
422  }
423 
425  virtual Vec3r getPoint3D() const
426  {
427  cerr << "Warning: getPoint3D() undefined for this point" << endl;
428  return _FrontSVertex->getPoint3D();
429  }
430 
432  virtual real getProjectedX() const
433  {
434  return _FrontSVertex->point2D().x();
435  }
436 
438  virtual real getProjectedY() const
439  {
440  return _FrontSVertex->point2D().y();
441  }
442 
443  virtual real getProjectedZ() const
444  {
445  return _FrontSVertex->point2D().z();
446  }
447 
449  virtual Vec2r getPoint2D() const
450  {
451  return _FrontSVertex->getPoint2D();
452  }
453 
455  virtual Id getId() const
456  {
457  return _Id;
458  }
459 
461  // it can't
463  {
464  return this;
465  }
466 
469  {
470  return this;
471  }
472 
473  private:
474  SVertex *_FrontSVertex;
475  SVertex *_BackSVertex;
476  directedViewEdge _FrontEdgeA;
477  directedViewEdge _FrontEdgeB;
478  directedViewEdge _BackEdgeA;
479  directedViewEdge _BackEdgeB;
480  Id _Id; // id to identify t vertices . these id will be negative in order not to be mixed with
481  // NonTVertex ids.
483  _sortedEdges; // the list of the four ViewEdges, ordered in CCW order (in the image plan)
484 
485  public:
487  inline TVertex() : ViewVertex(Nature::T_VERTEX)
488  {
489  _FrontSVertex = NULL;
490  _BackSVertex = NULL;
491  _FrontEdgeA.first = 0;
492  _FrontEdgeB.first = 0;
493  _BackEdgeA.first = 0;
494  _BackEdgeB.first = 0;
495  }
496 
497  inline TVertex(SVertex *svFront, SVertex *svBack) : ViewVertex(Nature::T_VERTEX)
498  {
499  _FrontSVertex = svFront;
500  _BackSVertex = svBack;
501  _FrontEdgeA.first = 0;
502  _FrontEdgeB.first = 0;
503  _BackEdgeA.first = 0;
504  _BackEdgeB.first = 0;
505  svFront->setViewVertex(this);
506  svBack->setViewVertex(this);
507  }
508 
509  protected:
511  inline TVertex(TVertex &iBrother) : ViewVertex(iBrother)
512  {
513  _FrontSVertex = iBrother._FrontSVertex;
514  _BackSVertex = iBrother._BackSVertex;
515  _FrontEdgeA = iBrother._FrontEdgeA;
516  _FrontEdgeB = iBrother._FrontEdgeB;
517  _BackEdgeA = iBrother._BackEdgeA;
518  _BackEdgeB = iBrother._BackEdgeB;
519  _sortedEdges = iBrother._sortedEdges;
520  }
521 
524  {
525  TVertex *clone = new TVertex(*this);
526  return clone;
527  }
528 
529  public:
530  /* accessors */
533  {
534  return _FrontSVertex;
535  }
536 
539  {
540  return _BackSVertex;
541  }
542 
544  {
545  return _FrontEdgeA;
546  }
547 
549  {
550  return _FrontEdgeB;
551  }
552 
554  {
555  return _BackEdgeA;
556  }
557 
559  {
560  return _BackEdgeB;
561  }
562 
563  /* modifiers */
565  inline void setFrontSVertex(SVertex *iFrontSVertex)
566  {
567  _FrontSVertex = iFrontSVertex;
568  _FrontSVertex->setViewVertex(this);
569  }
570 
572  inline void setBackSVertex(SVertex *iBackSVertex)
573  {
574  _BackSVertex = iBackSVertex;
575  _BackSVertex->setViewVertex(this);
576  }
577 
578  void setFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming = true);
579  void setFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming = true);
580  void setBackEdgeA(ViewEdge *iBackEdgeA, bool incoming = true);
581  void setBackEdgeB(ViewEdge *iBackEdgeB, bool incoming = true);
582 
584  inline void setId(const Id &iId)
585  {
586  _Id = iId;
587  }
588 
590  inline SVertex *getSVertex(FEdge *iFEdge)
591  {
592  const vector<FEdge *> &vfEdges = _FrontSVertex->fedges();
593  vector<FEdge *>::const_iterator fe, fend;
594  for (fe = vfEdges.begin(), fend = vfEdges.end(); fe != fend; fe++) {
595  if ((*fe) == iFEdge) {
596  return _FrontSVertex;
597  }
598  }
599 
600  const vector<FEdge *> &vbEdges = _BackSVertex->fedges();
601  for (fe = vbEdges.begin(), fend = vbEdges.end(); fe != fend; fe++) {
602  if ((*fe) == iFEdge) {
603  return _BackSVertex;
604  }
605  }
606  return NULL;
607  }
608 
609  virtual void Replace(ViewEdge *iOld, ViewEdge *iNew);
610 
615  virtual ViewEdge *mate(ViewEdge *iEdgeA)
616  {
617  if (iEdgeA == _FrontEdgeA.first) {
618  return _FrontEdgeB.first;
619  }
620  if (iEdgeA == _FrontEdgeB.first) {
621  return _FrontEdgeA.first;
622  }
623  if (iEdgeA == _BackEdgeA.first) {
624  return _BackEdgeB.first;
625  }
626  if (iEdgeA == _BackEdgeB.first) {
627  return _BackEdgeA.first;
628  }
629  return NULL;
630  }
631 
632  /* iterators access */
633  virtual edge_iterator edges_begin();
634  virtual const_edge_iterator edges_begin() const;
635  virtual edge_iterator edges_end();
636  virtual const_edge_iterator edges_end() const;
637  virtual edge_iterator edges_iterator(ViewEdge *iEdge);
638  virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const;
639 
645 
650 
653 
654 #ifdef WITH_CXX_GUARDEDALLOC
655  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:TVertex")
656 #endif
657 };
658 
659 /**********************************/
660 /* */
661 /* */
662 /* NonTVertex */
663 /* */
664 /* */
665 /**********************************/
666 
667 // (non T vertex)
672 class NonTVertex : public ViewVertex {
673  public:
674  typedef vector<directedViewEdge> edges_container;
675 
676  public: // Implementation of Interface0D
678  virtual string getExactTypeName() const
679  {
680  return "NonTVertex";
681  }
682 
683  // Data access methods
685  virtual real getX() const
686  {
687  return _SVertex->point3D().x();
688  }
689 
691  virtual real getY() const
692  {
693  return _SVertex->point3D().y();
694  }
695 
697  virtual real getZ() const
698  {
699  return _SVertex->point3D().z();
700  }
701 
703  virtual Vec3r getPoint3D() const
704  {
705  return _SVertex->getPoint3D();
706  }
707 
709  virtual real getProjectedX() const
710  {
711  return _SVertex->point2D().x();
712  }
713 
715  virtual real getProjectedY() const
716  {
717  return _SVertex->point2D().y();
718  }
719 
721  virtual real getProjectedZ() const
722  {
723  return _SVertex->point2D().z();
724  }
725 
727  virtual Vec2r getPoint2D() const
728  {
729  return _SVertex->getPoint2D();
730  }
731 
733  virtual Id getId() const
734  {
735  return _SVertex->getId();
736  }
737 
740  {
741  return _SVertex;
742  }
743 
746  {
747  return this;
748  }
749 
752  {
753  return this;
754  }
755 
756  private:
757  SVertex *_SVertex;
758  edges_container _ViewEdges;
759 
760  public:
762  inline NonTVertex() : ViewVertex(Nature::NON_T_VERTEX)
763  {
764  _SVertex = NULL;
765  }
766 
768  inline NonTVertex(SVertex *iSVertex) : ViewVertex(Nature::NON_T_VERTEX)
769  {
770  _SVertex = iSVertex;
771  _SVertex->setViewVertex(this);
772  }
773 
774  protected:
776  inline NonTVertex(NonTVertex &iBrother) : ViewVertex(iBrother)
777  {
778  _SVertex = iBrother._SVertex;
779  _SVertex->setViewVertex(this);
780  _ViewEdges = iBrother._ViewEdges;
781  }
782 
785  {
786  NonTVertex *clone = new NonTVertex(*this);
787  return clone;
788  }
789 
790  public:
792  virtual ~NonTVertex()
793  {
794  }
795 
796  /* accessors */
798  inline SVertex *svertex()
799  {
800  return _SVertex;
801  }
802 
804  {
805  return _ViewEdges;
806  }
807 
808  /* modifiers */
810  inline void setSVertex(SVertex *iSVertex)
811  {
812  _SVertex = iSVertex;
813  _SVertex->setViewVertex(this);
814  }
815 
816  inline void setViewEdges(const vector<directedViewEdge> &iViewEdges)
817  {
818  _ViewEdges = iViewEdges;
819  }
820 
821  void AddIncomingViewEdge(ViewEdge *iVEdge);
822  void AddOutgoingViewEdge(ViewEdge *iVEdge);
823 
824  inline void AddViewEdge(ViewEdge *iVEdge, bool incoming = true)
825  {
826  if (incoming) {
827  AddIncomingViewEdge(iVEdge);
828  }
829  else {
830  AddOutgoingViewEdge(iVEdge);
831  }
832  }
833 
834  /* Replaces old edge by new edge */
835  virtual void Replace(ViewEdge *iOld, ViewEdge *iNew)
836  {
837  edges_container::iterator insertedve;
838  for (edges_container::iterator ve = _ViewEdges.begin(), vend = _ViewEdges.end(); ve != vend;
839  ve++) {
840  if ((ve)->first == iOld) {
841  insertedve = _ViewEdges.insert(
842  ve, directedViewEdge(iNew, ve->second)); // inserts e2 before ve.
843  // returns an iterator pointing toward e2. ve is invalidated.
844  // we want to remove e1, but we can't use ve anymore:
845  insertedve++; // insertedve points now to e1
846  _ViewEdges.erase(insertedve);
847  return;
848  }
849  }
850  }
851 
852  /* iterators access */
853  virtual edge_iterator edges_begin();
854  virtual const_edge_iterator edges_begin() const;
855  virtual edge_iterator edges_end();
856  virtual const_edge_iterator edges_end() const;
857  virtual edge_iterator edges_iterator(ViewEdge *iEdge);
858  virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const;
859 
865 
870 
873 
874 #ifdef WITH_CXX_GUARDEDALLOC
875  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:NonTVertex")
876 #endif
877 };
878 
879 /**********************************/
880 /* */
881 /* */
882 /* ViewEdge */
883 /* */
884 /* */
885 /**********************************/
886 
887 /* Geometry(normals...)
888  * Nature of edges
889  * 2D spaces (1or2, material, z...)
890  * Parent Shape
891  * 3D Shading, material
892  * Importance
893  * Occluders
894  */
895 class ViewShape;
896 
897 namespace ViewEdgeInternal {
898 
899 template<class Traits> class edge_iterator_base;
900 template<class Traits> class fedge_iterator_base;
901 template<class Traits> class vertex_iterator_base;
902 
903 } // end of namespace ViewEdgeInternal
904 
908 class ViewEdge : public Interface1D {
909  public: // Implementation of Interface0D
911  virtual string getExactTypeName() const
912  {
913  return "ViewEdge";
914  }
915 
916  // Data access methods
918  virtual Id getId() const
919  {
920  return _Id;
921  }
922 
925  {
926  return _Nature;
927  }
928 
929  public:
931  friend class ViewShape;
932  // for ViewEdge iterator
935  // for fedge iterator
938  // for svertex iterator
941 
942  private:
943  ViewVertex *__A; // edge starting vertex
944  ViewVertex *__B; // edge ending vertex
945  Nature::EdgeNature _Nature; // nature of view edge
946  ViewShape *_Shape; // shape to which the view edge belongs
947  FEdge *_FEdgeA; // first edge of the embedded fedges chain
948  FEdge *_FEdgeB; // last edge of the embedded fedges chain
949  Id _Id;
950  unsigned _ChainingTimeStamp;
951  // The silhouette view edge separates 2 2D spaces. The one on the left is necessarly the Shape
952  // _Shape (the one to which this edge belongs to) and _aShape is the one on its right NOT HANDLED
953  // BY THE COPY CONSTRUCTOR
954  ViewShape *_aShape;
955  int _qi;
956  vector<ViewShape *> _Occluders;
957  bool _isInImage;
958 
959  // tmp
960  Id *_splittingId;
961 
962  public:
966  void *userdata;
967 
969  inline ViewEdge()
970  {
971  __A = NULL;
972  __B = NULL;
973  _FEdgeA = NULL;
974  _FEdgeB = NULL;
975  _ChainingTimeStamp = 0;
976  _qi = 0;
977  _aShape = NULL;
978  userdata = NULL;
979  _splittingId = NULL;
980  _isInImage = true;
981  }
982 
983  inline ViewEdge(ViewVertex *iA, ViewVertex *iB)
984  {
985  __A = iA;
986  __B = iB;
987  _FEdgeA = NULL;
988  _FEdgeB = NULL;
989  _Shape = 0;
990  _ChainingTimeStamp = 0;
991  _qi = 0;
992  _aShape = NULL;
993  userdata = NULL;
994  _splittingId = NULL;
995  _isInImage = true;
996  }
997 
998  inline ViewEdge(ViewVertex *iA, ViewVertex *iB, FEdge *iFEdgeA)
999  {
1000  __A = iA;
1001  __B = iB;
1002  _FEdgeA = iFEdgeA;
1003  _FEdgeB = NULL;
1004  _Shape = NULL;
1005  _ChainingTimeStamp = 0;
1006  _qi = 0;
1007  _aShape = NULL;
1008  userdata = NULL;
1009  _splittingId = NULL;
1010  _isInImage = true;
1011  }
1012 
1013  inline ViewEdge(
1014  ViewVertex *iA, ViewVertex *iB, FEdge *iFEdgeA, FEdge *iFEdgeB, ViewShape *iShape)
1015  {
1016  __A = iA;
1017  __B = iB;
1018  _FEdgeA = iFEdgeA;
1019  _FEdgeB = iFEdgeB;
1020  _Shape = iShape;
1021  _ChainingTimeStamp = 0;
1022  _qi = 0;
1023  _aShape = NULL;
1024  userdata = NULL;
1025  _splittingId = NULL;
1026  _isInImage = true;
1027  UpdateFEdges(); // tells every FEdge between iFEdgeA and iFEdgeB that this is theit ViewEdge
1028  }
1029 
1030  // soc protected:
1032  inline ViewEdge(ViewEdge &iBrother)
1033  {
1034  __A = iBrother.__A;
1035  __B = iBrother.__B;
1036  _FEdgeA = iBrother._FEdgeA;
1037  _FEdgeB = iBrother._FEdgeB;
1038  _Nature = iBrother._Nature;
1039  _Shape = NULL;
1040  _Id = iBrother._Id;
1041  _ChainingTimeStamp = iBrother._ChainingTimeStamp;
1042  _aShape = iBrother._aShape;
1043  _qi = iBrother._qi;
1044  _splittingId = NULL;
1045  _isInImage = iBrother._isInImage;
1046  iBrother.userdata = this;
1047  userdata = NULL;
1048  }
1049 
1051  virtual ViewEdge *duplicate()
1052  {
1053  ViewEdge *clone = new ViewEdge(*this);
1054  return clone;
1055  }
1056 
1057  public:
1059  virtual ~ViewEdge()
1060  {
1061 #if 0
1062  if (_aFace) {
1063  delete _aFace;
1064  _aFace = NULL;
1065  }
1066 #endif
1067  // only the last splitted deletes this id
1068  if (_splittingId) {
1069  if (*_splittingId == _Id) {
1070  delete _splittingId;
1071  }
1072  }
1073  }
1074 
1075  /* accessors */
1077  inline ViewVertex *A()
1078  {
1079  return __A;
1080  }
1081 
1083  inline ViewVertex *B()
1084  {
1085  return __B;
1086  }
1087 
1089  inline FEdge *fedgeA()
1090  {
1091  return _FEdgeA;
1092  }
1093 
1095  inline FEdge *fedgeB()
1096  {
1097  return _FEdgeB;
1098  }
1099 
1102  {
1103  return _Shape;
1104  }
1105 
1109  inline ViewShape *aShape()
1110  {
1111  return _aShape;
1112  }
1113 
1115  inline bool isClosed()
1116  {
1117  if (!__B) {
1118  return true;
1119  }
1120  return false;
1121  }
1122 
1124  inline unsigned getChainingTimeStamp()
1125  {
1126  return _ChainingTimeStamp;
1127  }
1128 
1129  inline const ViewShape *aShape() const
1130  {
1131  return _aShape;
1132  }
1133 
1134  inline const ViewShape *bShape() const
1135  {
1136  return _Shape;
1137  }
1138 
1139  inline vector<ViewShape *> &occluders()
1140  {
1141  return _Occluders;
1142  }
1143 
1144  inline Id *splittingId()
1145  {
1146  return _splittingId;
1147  }
1148 
1149  inline bool isInImage() const
1150  {
1151  return _isInImage;
1152  }
1153 
1154  /* modifiers */
1156  inline void setA(ViewVertex *iA)
1157  {
1158  __A = iA;
1159  }
1160 
1162  inline void setB(ViewVertex *iB)
1163  {
1164  __B = iB;
1165  }
1166 
1168  inline void setNature(Nature::EdgeNature iNature)
1169  {
1170  _Nature = iNature;
1171  }
1172 
1174  inline void setFEdgeA(FEdge *iFEdge)
1175  {
1176  _FEdgeA = iFEdge;
1177  }
1178 
1180  inline void setFEdgeB(FEdge *iFEdge)
1181  {
1182  _FEdgeB = iFEdge;
1183  }
1184 
1186  inline void setShape(ViewShape *iVShape)
1187  {
1188  _Shape = iVShape;
1189  }
1190 
1192  inline void setId(const Id &id)
1193  {
1194  _Id = id;
1195  }
1196 
1198  void UpdateFEdges();
1199 
1201  inline void setaShape(ViewShape *iShape)
1202  {
1203  _aShape = iShape;
1204  }
1205 
1207  inline void setQI(int qi)
1208  {
1209  _qi = qi;
1210  }
1211 
1213  inline void setChainingTimeStamp(unsigned ts)
1214  {
1215  _ChainingTimeStamp = ts;
1216  }
1217 
1218  inline void AddOccluder(ViewShape *iShape)
1219  {
1220  _Occluders.push_back(iShape);
1221  }
1222 
1223  inline void setSplittingId(Id *id)
1224  {
1225  _splittingId = id;
1226  }
1227 
1228  inline void setIsInImage(bool iFlag)
1229  {
1230  _isInImage = iFlag;
1231  }
1232 
1233  /* stroke interface definition */
1234  inline bool intersect_2d_area(const Vec2r &iMin, const Vec2r &iMax) const
1235  {
1236  // parse edges to check if one of them is intersection the region:
1237  FEdge *current = _FEdgeA;
1238  do {
1240  iMin,
1241  iMax,
1242  Vec2r(current->vertexA()->point2D()[0], current->vertexA()->point2D()[1]),
1243  Vec2r(current->vertexB()->point2D()[0], current->vertexB()->point2D()[1]))) {
1244  return true;
1245  }
1246  current = current->nextEdge();
1247  } while ((current != 0) && (current != _FEdgeA));
1248 
1249  return false;
1250  }
1251 
1252  inline bool include_in_2d_area(const Vec2r &iMin, const Vec2r &iMax) const
1253  {
1254  // parse edges to check if all of them are intersection the region:
1255  FEdge *current = _FEdgeA;
1256 
1257  do {
1259  iMin,
1260  iMax,
1261  Vec2r(current->vertexA()->point2D()[0], current->vertexA()->point2D()[1]),
1262  Vec2r(current->vertexB()->point2D()[0], current->vertexB()->point2D()[1]))) {
1263  return false;
1264  }
1265  current = current->nextEdge();
1266  } while ((current != 0) && (current != _FEdgeA));
1267 
1268  return true;
1269  }
1270 
1271  /* Information access interface */
1272 
1273 #if 0
1274  inline Nature::EdgeNature viewedge_nature() const
1275  {
1276  return getNature();
1277  }
1278 
1279  float viewedge_length() const;
1280 #endif
1281 
1283  real getLength2D() const;
1284 
1285 #if 0
1286  inline Material material() const
1287  {
1288  return _FEdgeA->vertexA()->shape()->material();
1289  }
1290 #endif
1291 
1292  inline int qi() const
1293  {
1294  return _qi;
1295  }
1296 
1297  inline occluder_container::const_iterator occluders_begin() const
1298  {
1299  return _Occluders.begin();
1300  }
1301 
1302  inline occluder_container::const_iterator occluders_end() const
1303  {
1304  return _Occluders.end();
1305  }
1306 
1307  inline int occluders_size() const
1308  {
1309  return _Occluders.size();
1310  }
1311 
1312  inline bool occluders_empty() const
1313  {
1314  return _Occluders.empty();
1315  }
1316 
1317  inline const Polygon3r &occludee() const
1318  {
1319  return (_FEdgeA->aFace());
1320  }
1321 
1322  inline const SShape *occluded_shape() const;
1323 
1324  inline const bool occludee_empty() const
1325  {
1326  if (_aShape == 0) {
1327  return true;
1328  }
1329  return false;
1330  }
1331 
1332  // inline real z_discontinuity(int iCombination = 0) const;
1333 
1334  inline Id shape_id() const
1335  {
1336  return _FEdgeA->vertexA()->shape()->getId();
1337  }
1338 
1339  inline const SShape *shape() const
1340  {
1341  return _FEdgeA->vertexA()->shape();
1342  }
1343 
1344  inline float shape_importance() const
1345  {
1346  return _FEdgeA->shape_importance();
1347  }
1348 
1349  /* iterators access */
1350  // view edge iterator
1353  // feature edge iterator
1360  // embedding vertex iterator
1367 
1368  // Iterator access (Interface1D)
1373 
1377  virtual Interface0DIterator verticesEnd();
1378 
1384  virtual Interface0DIterator pointsBegin(float t = 0.0f);
1385 
1391  virtual Interface0DIterator pointsEnd(float t = 0.0f);
1392 
1393 #ifdef WITH_CXX_GUARDEDALLOC
1394  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewEdge")
1395 #endif
1396 };
1397 
1398 /**********************************/
1399 /* */
1400 /* */
1401 /* ViewShape */
1402 /* */
1403 /* */
1404 /**********************************/
1405 
1408 class ViewShape {
1409  private:
1410  vector<ViewVertex *> _Vertices;
1411  vector<ViewEdge *> _Edges;
1412  SShape *_SShape;
1413 
1414  public:
1418  void *userdata;
1419 
1421  inline ViewShape()
1422  {
1423  userdata = NULL;
1424  _SShape = NULL;
1425  }
1426 
1428  inline ViewShape(SShape *iSShape)
1429  {
1430  userdata = NULL;
1431  _SShape = iSShape;
1432  //_SShape->setViewShape(this);
1433  }
1434 
1436  inline ViewShape(ViewShape &iBrother)
1437  {
1438  userdata = NULL;
1439  vector<ViewVertex *>::iterator vv, vvend;
1440  vector<ViewEdge *>::iterator ve, veend;
1441 
1442  _SShape = iBrother._SShape;
1443 
1444  vector<ViewVertex *> &vvertices = iBrother.vertices();
1445  // duplicate vertices
1446  for (vv = vvertices.begin(), vvend = vvertices.end(); vv != vvend; vv++) {
1447  ViewVertex *newVertex = (*vv)->duplicate();
1448  AddVertex(newVertex);
1449  }
1450 
1451  vector<ViewEdge *> &vvedges = iBrother.edges();
1452  // duplicate edges
1453  for (ve = vvedges.begin(), veend = vvedges.end(); ve != veend; ve++) {
1454  ViewEdge *newEdge = (*ve)->duplicate();
1455  AddEdge(newEdge); // here the shape is set as the edge's shape
1456  }
1457 
1458  //-------------------------
1459  // remap edges in vertices:
1460  //-------------------------
1461  for (vv = _Vertices.begin(), vvend = _Vertices.end(); vv != vvend; vv++) {
1462  switch ((*vv)->getNature()) {
1463  case Nature::T_VERTEX: {
1464  TVertex *v = (TVertex *)(*vv);
1465  ViewEdge *veFrontA = (ViewEdge *)(v)->frontEdgeA().first->userdata;
1466  ViewEdge *veFrontB = (ViewEdge *)(v)->frontEdgeB().first->userdata;
1467  ViewEdge *veBackA = (ViewEdge *)(v)->backEdgeA().first->userdata;
1468  ViewEdge *veBackB = (ViewEdge *)(v)->backEdgeB().first->userdata;
1469 
1470  v->setFrontEdgeA(veFrontA, v->frontEdgeA().second);
1471  v->setFrontEdgeB(veFrontB, v->frontEdgeB().second);
1472  v->setBackEdgeA(veBackA, v->backEdgeA().second);
1473  v->setBackEdgeB(veBackB, v->backEdgeB().second);
1474  } break;
1475  case Nature::NON_T_VERTEX: {
1476  NonTVertex *v = (NonTVertex *)(*vv);
1477  vector<ViewVertex::directedViewEdge> &vedges = (v)->viewedges();
1478  vector<ViewVertex::directedViewEdge> newEdges;
1479  for (vector<ViewVertex::directedViewEdge>::iterator ve = vedges.begin(),
1480  veend = vedges.end();
1481  ve != veend;
1482  ve++) {
1483  ViewEdge *current = (ViewEdge *)((ve)->first)->userdata;
1484  newEdges.push_back(ViewVertex::directedViewEdge(current, ve->second));
1485  }
1486  (v)->setViewEdges(newEdges);
1487  } break;
1488  default:
1489  break;
1490  }
1491  }
1492 
1493  //-------------------------------------
1494  // remap vertices in edges:
1495  //-------------------------------------
1496  for (ve = _Edges.begin(), veend = _Edges.end(); ve != veend; ve++) {
1497  (*ve)->setA((ViewVertex *)((*ve)->A()->userdata));
1498  (*ve)->setB((ViewVertex *)((*ve)->B()->userdata));
1499  //---------------------------------------
1500  // Update all embedded FEdges
1501  //---------------------------------------
1502  (*ve)->UpdateFEdges();
1503  }
1504 
1505  // reset all brothers userdata to NULL:
1506  //-------------------------------------
1507  //---------
1508  // vertices
1509  //---------
1510  for (vv = vvertices.begin(), vvend = vvertices.end(); vv != vvend; vv++) {
1511  (*vv)->userdata = NULL;
1512  }
1513 
1514  //------
1515  // edges
1516  //------
1517  for (ve = vvedges.begin(), veend = vvedges.end(); ve != veend; ve++) {
1518  (*ve)->userdata = NULL;
1519  }
1520  }
1521 
1524  {
1525  ViewShape *clone = new ViewShape(*this);
1526  return clone;
1527  }
1528 
1530  virtual ~ViewShape();
1531 
1532  /* splits a view edge into several view edges.
1533  * fe
1534  * The FEdge that gets splitted
1535  * iViewVertices
1536  * The view vertices corresponding to the different intersections for the edge fe.
1537  * This list need to be sorted such as the first view vertex is the farther away from
1538  * fe->vertexA. ioNewEdges The feature edges that are newly created (the initial edges are not
1539  * included) are added to this list. ioNewViewEdges The view edges that are newly created (the
1540  * initial edges are not included) are added to this list.
1541  */
1542  inline void SplitEdge(FEdge *fe,
1543  const vector<TVertex *> &iViewVertices,
1544  vector<FEdge *> &ioNewEdges,
1545  vector<ViewEdge *> &ioNewViewEdges);
1546 
1547  /* accessors */
1549  inline SShape *sshape()
1550  {
1551  return _SShape;
1552  }
1553 
1555  inline const SShape *sshape() const
1556  {
1557  return _SShape;
1558  }
1559 
1561  inline vector<ViewVertex *> &vertices()
1562  {
1563  return _Vertices;
1564  }
1565 
1567  inline vector<ViewEdge *> &edges()
1568  {
1569  return _Edges;
1570  }
1571 
1573  inline Id getId() const
1574  {
1575  return _SShape->getId();
1576  }
1577 
1579  inline const string &getName() const
1580  {
1581  return _SShape->getName();
1582  }
1583 
1585  inline const string &getLibraryPath() const
1586  {
1587  return _SShape->getLibraryPath();
1588  }
1589 
1590  /* modifiers */
1592  inline void setSShape(SShape *iSShape)
1593  {
1594  _SShape = iSShape;
1595  }
1596 
1598  inline void setVertices(const vector<ViewVertex *> &iVertices)
1599  {
1600  _Vertices = iVertices;
1601  }
1602 
1604  inline void setEdges(const vector<ViewEdge *> &iEdges)
1605  {
1606  _Edges = iEdges;
1607  }
1608 
1610  inline void AddVertex(ViewVertex *iVertex)
1611  {
1612  _Vertices.push_back(iVertex);
1613  //_SShape->AddNewVertex(iVertex->svertex());
1614  }
1615 
1617  inline void AddEdge(ViewEdge *iEdge)
1618  {
1619  _Edges.push_back(iEdge);
1620  iEdge->setShape(this);
1621  //_SShape->AddNewEdge(iEdge->fedge());
1622  }
1623 
1624  /* removes the view edge iViewEdge in the View Shape and the associated FEdge chain entry in the
1625  * underlying SShape
1626  */
1627  void RemoveEdge(ViewEdge *iViewEdge);
1628 
1629  /* removes the view vertex iViewVertex in the View Shape. */
1630  void RemoveVertex(ViewVertex *iViewVertex);
1631 
1632 #ifdef WITH_CXX_GUARDEDALLOC
1633  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewShape")
1634 #endif
1635 };
1636 
1637 /*
1638  * #############################################
1639  * #############################################
1640  * #############################################
1641  * ###### ######
1642  * ###### I M P L E M E N T A T I O N ######
1643  * ###### ######
1644  * #############################################
1645  * #############################################
1646  * #############################################
1647  */
1648 /* for inline functions */
1649 
1651  const vector<TVertex *> &iViewVertices,
1652  vector<FEdge *> &ioNewEdges,
1653  vector<ViewEdge *> &ioNewViewEdges)
1654 {
1655  ViewEdge *vEdge = fe->viewedge();
1656 
1657  // We first need to sort the view vertices from farther to closer to fe->vertexA
1658  SVertex *sv, *sv2;
1659  ViewVertex *vva, *vvb;
1660  vector<TVertex *>::const_iterator vv, vvend;
1661  for (vv = iViewVertices.begin(), vvend = iViewVertices.end(); vv != vvend; vv++) {
1662  // Add the viewvertices to the ViewShape
1663  AddVertex((*vv));
1664 
1665  // retrieve the correct SVertex from the view vertex
1666  //--------------------------------------------------
1667  sv = (*vv)->frontSVertex();
1668  sv2 = (*vv)->backSVertex();
1669 
1670  if (sv->shape() != sv2->shape()) {
1671  if (sv->shape() != _SShape) {
1672  sv = sv2;
1673  }
1674  }
1675  else {
1676  // if the shape is the same we can safely differ the two vertices using their ids:
1677  if (sv->getId() != fe->vertexA()->getId()) {
1678  sv = sv2;
1679  }
1680  }
1681 
1682  vva = vEdge->A();
1683  vvb = vEdge->B();
1684 
1685  // We split Fedge AB into AA' and A'B. A' and A'B are created.
1686  // AB becomes (address speaking) AA'. B is updated.
1687  //--------------------------------------------------
1688  SShape *shape = fe->shape();
1689 
1690  // a new edge, A'B is created.
1691  FEdge *newEdge = shape->SplitEdgeIn2(fe, sv);
1692  /* One of the two FEdges (fe and newEdge) may have a 2D length less than M_EPSILON.
1693  * (22 Feb 2011, T.K.)
1694  */
1695 
1696  ioNewEdges.push_back(newEdge);
1697  ViewEdge *newVEdge;
1698 
1699  if ((vva == 0) || (vvb == 0)) { // that means we're dealing with a closed viewedge (loop)
1700  // remove the chain that was starting by the fedge A of vEdge (which is different from fe
1701  // !!!!)
1702  shape->RemoveEdgeFromChain(vEdge->fedgeA());
1703  // we set
1704  vEdge->setA(*vv);
1705  vEdge->setB(*vv);
1706  vEdge->setFEdgeA(newEdge);
1707  // FEdge *previousEdge = newEdge->previousEdge();
1708  vEdge->setFEdgeB(fe);
1709  newVEdge = vEdge;
1710  vEdge->fedgeA()->setViewEdge(newVEdge);
1711  }
1712  else {
1713  // while we create the view edge, it updates the "ViewEdge" pointer of every underlying
1714  // FEdges to this.
1715  newVEdge = new ViewEdge((*vv), vvb); //, newEdge, vEdge->fedgeB());
1716  newVEdge->setNature((fe)->getNature());
1717  newVEdge->setFEdgeA(newEdge);
1718  // newVEdge->setFEdgeB(fe);
1719  // If our original viewedge is made of one FEdge, then
1720  if ((vEdge->fedgeA() == vEdge->fedgeB()) || (fe == vEdge->fedgeB())) {
1721  newVEdge->setFEdgeB(newEdge);
1722  }
1723  else {
1724  newVEdge->setFEdgeB(vEdge->fedgeB()); // MODIF
1725  }
1726 
1727  Id *newId = vEdge->splittingId();
1728  if (newId == 0) {
1729  newId = new Id(vEdge->getId());
1730  vEdge->setSplittingId(newId);
1731  }
1732  newId->setSecond(newId->getSecond() + 1);
1733  newVEdge->setId(*newId);
1734  newVEdge->setSplittingId(newId);
1735 #if 0
1736  Id id(vEdge->getId().getFirst(), vEdge->getId().getSecond() + 1);
1737  newVEdge->setId(vEdge->getId());
1738  vEdge->setId(id);
1739 #endif
1740 
1741  AddEdge(newVEdge); // here this shape is set as the edge's shape
1742 
1743  // add new edge to the list of new edges passed as argument:
1744  ioNewViewEdges.push_back(newVEdge);
1745 
1746  if (0 != vvb) {
1747  vvb->Replace((vEdge), newVEdge);
1748  }
1749 
1750  // we split the view edge:
1751  vEdge->setB((*vv));
1752  vEdge->setFEdgeB(fe); // MODIF
1753 
1754  // Update fedges so that they point to the new viewedge:
1755  newVEdge->UpdateFEdges();
1756  }
1757  // check whether this vertex is a front vertex or a back one
1758  if (sv == (*vv)->frontSVertex()) {
1759  // -- View Vertex A' --
1760  (*vv)->setFrontEdgeA(vEdge, true);
1761  (*vv)->setFrontEdgeB(newVEdge, false);
1762  }
1763  else {
1764  // -- View Vertex A' --
1765  (*vv)->setBackEdgeA(vEdge, true);
1766  (*vv)->setBackEdgeB(newVEdge, false);
1767  }
1768  }
1769 }
1770 
1771 /**********************************/
1772 /* */
1773 /* */
1774 /* ViewEdge */
1775 /* */
1776 /* */
1777 /**********************************/
1778 
1779 #if 0
1780 inline Vec3r ViewEdge::orientation2d(int iCombination) const
1781 {
1782  return edge_orientation2d_function<ViewEdge>(*this, iCombination);
1783 }
1784 
1785 inline Vec3r ViewEdge::orientation3d(int iCombination) const
1786 {
1787  return edge_orientation3d_function<ViewEdge>(*this, iCombination);
1788 }
1789 
1790 inline real ViewEdge::z_discontinuity(int iCombination) const
1791 {
1792  return z_discontinuity_edge_function<ViewEdge>(*this, iCombination);
1793 }
1794 
1795 inline float ViewEdge::local_average_depth(int iCombination) const
1796 {
1797  return local_average_depth_edge_function<ViewEdge>(*this, iCombination);
1798 }
1799 
1800 inline float ViewEdge::local_depth_variance(int iCombination) const
1801 {
1802  return local_depth_variance_edge_function<ViewEdge>(*this, iCombination);
1803 }
1804 
1805 inline real ViewEdge::local_average_density(float sigma, int iCombination) const
1806 {
1807  return density_edge_function<ViewEdge>(*this, iCombination);
1808 }
1809 #endif
1810 
1811 inline const SShape *ViewEdge::occluded_shape() const
1812 {
1813  if (0 == _aShape) {
1814  return 0;
1815  }
1816  return _aShape->sshape();
1817 }
1818 
1819 #if 0
1820 inline Vec3r ViewEdge::curvature2d_as_vector(int iCombination) const
1821 {
1822  return curvature2d_as_vector_edge_function<ViewEdge>(*this, iCombination);
1823 }
1824 
1825 inline real ViewEdge::curvature2d_as_angle(int iCombination) const
1826 {
1827  return curvature2d_as_angle_edge_function<ViewEdge>(*this, iCombination);
1828 }
1829 #endif
1830 
1831 } /* 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 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.
Classes to define a silhouette structure.
ATTR_WARN_UNUSED_RESULT const BMVert * v
const Polygon3r & aFace() const
Definition: Silhouette.h:704
SVertex * vertexA()
Definition: Silhouette.h:611
ViewEdge * viewedge() const
Definition: Silhouette.h:672
void setViewEdge(ViewEdge *iViewEdge)
Definition: Silhouette.h:780
SVertex * vertexB()
Definition: Silhouette.h:617
SShape * shape()
Definition: Silhouette.h:650
float shape_importance() const
Definition: Silhouette.cpp:248
FEdge * nextEdge()
Definition: Silhouette.h:637
id_type getFirst() const
Definition: Id.h:76
id_type getSecond() const
Definition: Id.h:82
void setSecond(id_type second)
Definition: Id.h:94
virtual void Replace(ViewEdge *iOld, ViewEdge *iNew)
Definition: ViewMap.h:835
void AddIncomingViewEdge(ViewEdge *iVEdge)
Definition: ViewMap.cpp:571
virtual Vec3r getPoint3D() const
Definition: ViewMap.h:703
virtual real getProjectedX() const
Definition: ViewMap.h:709
virtual string getExactTypeName() const
Definition: ViewMap.h:678
vector< directedViewEdge > edges_container
Definition: ViewMap.h:674
virtual ~NonTVertex()
Definition: ViewMap.h:792
virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin()
Definition: ViewMap.cpp:631
NonTVertex(NonTVertex &iBrother)
Definition: ViewMap.h:776
virtual edge_iterator edges_iterator(ViewEdge *iEdge)
Definition: ViewMap.cpp:608
virtual real getZ() const
Definition: ViewMap.h:697
SVertex * svertex()
Definition: ViewMap.h:798
edges_container & viewedges()
Definition: ViewMap.h:803
virtual Id getId() const
Definition: ViewMap.h:733
virtual edge_iterator edges_begin()
Definition: ViewMap.cpp:588
virtual real getProjectedY() const
Definition: ViewMap.h:715
void AddViewEdge(ViewEdge *iVEdge, bool incoming=true)
Definition: ViewMap.h:824
void AddOutgoingViewEdge(ViewEdge *iVEdge)
Definition: ViewMap.cpp:555
virtual real getProjectedZ() const
Definition: ViewMap.h:721
virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd()
Definition: ViewMap.cpp:637
void setViewEdges(const vector< directedViewEdge > &iViewEdges)
Definition: ViewMap.h:816
virtual Vec2r getPoint2D() const
Definition: ViewMap.h:727
void setSVertex(SVertex *iSVertex)
Definition: ViewMap.h:810
virtual real getY() const
Definition: ViewMap.h:691
virtual ViewVertex * castToViewVertex()
Definition: ViewMap.h:745
virtual real getX() const
Definition: ViewMap.h:685
virtual NonTVertex * castToNonTVertex()
Definition: ViewMap.h:751
virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge)
Definition: ViewMap.cpp:643
virtual edge_iterator edges_end()
Definition: ViewMap.cpp:598
NonTVertex(SVertex *iSVertex)
Definition: ViewMap.h:768
virtual SVertex * castToSVertex()
Definition: ViewMap.h:739
virtual ViewVertex * duplicate()
Definition: ViewMap.h:784
void RemoveEdgeFromChain(FEdge *iEdge)
Definition: Silhouette.h:1833
const string & getName() const
Definition: Silhouette.h:1908
FEdge * SplitEdgeIn2(FEdge *ioEdge, SVertex *ioNewVertex)
Definition: Silhouette.h:1709
const string & getLibraryPath() const
Definition: Silhouette.h:1914
Id getId() const
Definition: Silhouette.h:1902
const vector< FEdge * > & fedges()
Definition: Silhouette.h:262
SShape * shape()
Definition: Silhouette.h:277
void setViewVertex(ViewVertex *iViewVertex)
Definition: Silhouette.h:367
virtual Vec3r getPoint3D() const
Definition: Silhouette.h:98
virtual Vec2r getPoint2D() const
Definition: Silhouette.h:122
const Vec3r & point3D() const
Definition: Silhouette.h:237
virtual Id getId() const
Definition: Silhouette.h:131
const Vec3r & point2D() const
Definition: Silhouette.h:242
virtual real getProjectedY() const
Definition: ViewMap.h:438
void setId(const Id &iId)
Definition: ViewMap.h:584
directedViewEdge & frontEdgeB()
Definition: ViewMap.h:548
directedViewEdge & frontEdgeA()
Definition: ViewMap.h:543
void setBackEdgeA(ViewEdge *iBackEdgeA, bool incoming=true)
Definition: ViewMap.cpp:375
virtual edge_iterator edges_iterator(ViewEdge *iEdge)
Definition: ViewMap.cpp:462
directedViewEdge & backEdgeB()
Definition: ViewMap.h:558
virtual string getExactTypeName() const
Definition: ViewMap.h:399
virtual Vec2r getPoint2D() const
Definition: ViewMap.h:449
virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge)
Definition: ViewMap.cpp:533
virtual edge_iterator edges_begin()
Definition: ViewMap.cpp:436
void setBackEdgeB(ViewEdge *iBackEdgeB, bool incoming=true)
Definition: ViewMap.cpp:394
virtual Vec3r getPoint3D() const
Definition: ViewMap.h:425
SVertex * frontSVertex()
Definition: ViewMap.h:532
virtual real getProjectedZ() const
Definition: ViewMap.h:443
void setBackSVertex(SVertex *iBackSVertex)
Definition: ViewMap.h:572
virtual real getX() const
Definition: ViewMap.h:406
virtual edge_iterator edges_end()
Definition: ViewMap.cpp:448
void setFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming=true)
Definition: ViewMap.cpp:356
SVertex * backSVertex()
Definition: ViewMap.h:538
virtual ViewEdge * mate(ViewEdge *iEdgeA)
Definition: ViewMap.h:615
virtual real getProjectedX() const
Definition: ViewMap.h:432
TVertex(TVertex &iBrother)
Definition: ViewMap.h:511
virtual void Replace(ViewEdge *iOld, ViewEdge *iNew)
Definition: ViewMap.cpp:413
virtual ViewVertex * duplicate()
Definition: ViewMap.h:523
directedViewEdge & backEdgeA()
Definition: ViewMap.h:553
virtual real getZ() const
Definition: ViewMap.h:418
virtual ViewVertex * castToViewVertex()
Definition: ViewMap.h:462
virtual TVertex * castToTVertex()
Definition: ViewMap.h:468
void setFrontSVertex(SVertex *iFrontSVertex)
Definition: ViewMap.h:565
void setFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming=true)
Definition: ViewMap.cpp:337
TVertex(SVertex *svFront, SVertex *svBack)
Definition: ViewMap.h:497
virtual Id getId() const
Definition: ViewMap.h:455
virtual real getY() const
Definition: ViewMap.h:412
SVertex * getSVertex(FEdge *iFEdge)
Definition: ViewMap.h:590
virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin()
Definition: ViewMap.cpp:521
virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd()
Definition: ViewMap.cpp:527
vector< directedViewEdge * > edge_pointers_container
Definition: ViewMap.h:395
value_type x() const
Definition: VecMat.h:532
value_type z() const
Definition: VecMat.h:552
value_type y() const
Definition: VecMat.h:542
const_vertex_iterator vertices_end() const
Definition: ViewMap.cpp:741
int qi() const
Definition: ViewMap.h:1292
virtual string getExactTypeName() const
Definition: ViewMap.h:911
ViewShape * viewShape()
Definition: ViewMap.h:1101
FEdge * fedgeB()
Definition: ViewMap.h:1095
bool isInImage() const
Definition: ViewMap.h:1149
void setId(const Id &id)
Definition: ViewMap.h:1192
void setaShape(ViewShape *iShape)
Definition: ViewMap.h:1201
virtual Nature::EdgeNature getNature() const
Definition: ViewMap.h:924
ViewEdge(ViewVertex *iA, ViewVertex *iB, FEdge *iFEdgeA, FEdge *iFEdgeB, ViewShape *iShape)
Definition: ViewMap.h:1013
vector< ViewShape * > & occluders()
Definition: ViewMap.h:1139
ViewEdge(ViewVertex *iA, ViewVertex *iB)
Definition: ViewMap.h:983
FEdge * fedgeA()
Definition: ViewMap.h:1089
ViewVertex * B()
Definition: ViewMap.h:1083
ViewEdge(ViewVertex *iA, ViewVertex *iB, FEdge *iFEdgeA)
Definition: ViewMap.h:998
void setFEdgeB(FEdge *iFEdge)
Definition: ViewMap.h:1180
Id shape_id() const
Definition: ViewMap.h:1334
fedge_iterator fedge_iterator_last()
Definition: ViewMap.cpp:700
fedge_iterator fedge_iterator_end()
Definition: ViewMap.cpp:710
ViewEdgeInternal::edge_iterator_base< Const_traits< ViewEdge * > > const_edge_iterator
Definition: ViewMap.h:934
void setA(ViewVertex *iA)
Definition: ViewMap.h:1156
occluder_container::const_iterator occluders_begin() const
Definition: ViewMap.h:1297
const ViewShape * bShape() const
Definition: ViewMap.h:1134
virtual Id getId() const
Definition: ViewMap.h:918
bool include_in_2d_area(const Vec2r &iMin, const Vec2r &iMax) const
Definition: ViewMap.h:1252
edge_iterator ViewEdge_iterator()
view edge iterator
Definition: ViewMap.cpp:679
float shape_importance() const
Definition: ViewMap.h:1344
bool intersect_2d_area(const Vec2r &iMin, const Vec2r &iMax) const
Definition: ViewMap.h:1234
ViewEdgeInternal::fedge_iterator_base< Const_traits< FEdge * > > const_fedge_iterator
Definition: ViewMap.h:937
void setFEdgeA(FEdge *iFEdge)
Definition: ViewMap.h:1174
const_vertex_iterator vertices_last() const
Definition: ViewMap.cpp:731
void setShape(ViewShape *iVShape)
Definition: ViewMap.h:1186
virtual Interface0DIterator pointsBegin(float t=0.0f)
Definition: ViewMap.cpp:765
const bool occludee_empty() const
Definition: ViewMap.h:1324
ViewVertex * A()
Definition: ViewMap.h:1077
ViewEdgeInternal::vertex_iterator_base< Nonconst_traits< SVertex * > > vertex_iterator
Definition: ViewMap.h:939
virtual Interface0DIterator pointsEnd(float t=0.0f)
Definition: ViewMap.cpp:770
bool occluders_empty() const
Definition: ViewMap.h:1312
int occluders_size() const
Definition: ViewMap.h:1307
SVertex vertex_type
Definition: ViewMap.h:930
ViewEdgeInternal::edge_iterator_base< Nonconst_traits< ViewEdge * > > edge_iterator
Definition: ViewMap.h:933
const_vertex_iterator vertices_begin() const
embedding vertex iterator
Definition: ViewMap.cpp:721
fedge_iterator fedge_iterator_begin()
feature edge iterator
Definition: ViewMap.cpp:690
void setChainingTimeStamp(unsigned ts)
Definition: ViewMap.h:1213
void setSplittingId(Id *id)
Definition: ViewMap.h:1223
virtual ViewEdge * duplicate()
Definition: ViewMap.h:1051
real getLength2D() const
Definition: ViewMap.cpp:664
virtual Interface0DIterator verticesBegin()
Definition: ViewMap.cpp:751
const SShape * shape() const
Definition: ViewMap.h:1339
void AddOccluder(ViewShape *iShape)
Definition: ViewMap.h:1218
ViewEdgeInternal::vertex_iterator_base< Const_traits< SVertex * > > const_vertex_iterator
Definition: ViewMap.h:940
void setIsInImage(bool iFlag)
Definition: ViewMap.h:1228
virtual Interface0DIterator verticesEnd()
Definition: ViewMap.cpp:758
void setNature(Nature::EdgeNature iNature)
Definition: ViewMap.h:1168
const SShape * occluded_shape() const
Definition: ViewMap.h:1811
ViewShape * aShape()
Definition: ViewMap.h:1109
const Polygon3r & occludee() const
Definition: ViewMap.h:1317
void setQI(int qi)
Definition: ViewMap.h:1207
unsigned getChainingTimeStamp()
Definition: ViewMap.h:1124
occluder_container::const_iterator occluders_end() const
Definition: ViewMap.h:1302
ViewEdgeInternal::fedge_iterator_base< Nonconst_traits< FEdge * > > fedge_iterator
Definition: ViewMap.h:936
ViewEdge(ViewEdge &iBrother)
Definition: ViewMap.h:1032
void setB(ViewVertex *iB)
Definition: ViewMap.h:1162
virtual ~ViewEdge()
Definition: ViewMap.h:1059
const ViewShape * aShape() const
Definition: ViewMap.h:1129
vector< FEdge * > fedges_container
Definition: ViewMap.h:66
ViewShape * viewShape(unsigned id)
Definition: ViewMap.cpp:90
vector< SVertex * > svertices_container
Definition: ViewMap.h:65
const FEdge * getClosestFEdge(real x, real y) const
Definition: ViewMap.cpp:102
void AddViewShape(ViewShape *iVShape)
Definition: ViewMap.cpp:96
vector< ViewVertex * > viewvertices_container
Definition: ViewMap.h:63
viewedges_container::iterator viewedges_begin()
Definition: ViewMap.h:141
vector< ViewShape * > viewshapes_container
Definition: ViewMap.h:64
const ViewEdge * getClosestViewEdge(real x, real y) const
Definition: ViewMap.cpp:121
void * userdata
Definition: ViewMap.h:85
void AddSVertex(SVertex *iSVertex)
Definition: ViewMap.h:187
vector< ViewEdge * > viewedges_container
Definition: ViewMap.h:62
viewshapes_container & ViewShapes()
Definition: ViewMap.h:111
virtual void Clean()
Definition: ViewMap.cpp:63
int viewedges_size()
Definition: ViewMap.h:151
TVertex * CreateTVertex(const Vec3r &iA3D, const Vec3r &iA2D, FEdge *iFEdgeA, const Vec3r &iB3D, const Vec3r &iB2D, FEdge *iFEdgeB, const Id &id)
Definition: ViewMap.cpp:143
svertices_container & SVertices()
Definition: ViewMap.h:135
viewedges_container::iterator viewedges_end()
Definition: ViewMap.h:146
BBox< Vec3r > getScene3dBBox() const
Definition: ViewMap.h:164
viewvertices_container & ViewVertices()
Definition: ViewMap.h:123
void setScene3dBBox(const BBox< Vec3r > &bbox)
Definition: ViewMap.h:193
fedges_container & FEdges()
Definition: ViewMap.h:129
void AddFEdge(FEdge *iFEdge)
Definition: ViewMap.h:182
virtual ~ViewMap()
Definition: ViewMap.cpp:42
id_to_index_map & shapeIdToIndexMap()
Definition: ViewMap.h:158
ViewVertex * InsertViewVertex(SVertex *iVertex, vector< ViewEdge * > &newViewEdges)
Definition: ViewMap.cpp:186
void AddViewVertex(ViewVertex *iVVertex)
Definition: ViewMap.h:177
void AddViewEdge(ViewEdge *iVEdge)
Definition: ViewMap.h:172
static ViewMap * getInstance()
Definition: ViewMap.h:105
map< int, int > id_to_index_map
Definition: ViewMap.h:67
viewedges_container & ViewEdges()
Definition: ViewMap.h:117
const string & getName() const
Definition: ViewMap.h:1579
SShape * sshape()
Definition: ViewMap.h:1549
vector< ViewEdge * > & edges()
Definition: ViewMap.h:1567
void setVertices(const vector< ViewVertex * > &iVertices)
Definition: ViewMap.h:1598
ViewShape(SShape *iSShape)
Definition: ViewMap.h:1428
const SShape * sshape() const
Definition: ViewMap.h:1555
void AddVertex(ViewVertex *iVertex)
Definition: ViewMap.h:1610
vector< ViewVertex * > & vertices()
Definition: ViewMap.h:1561
void SplitEdge(FEdge *fe, const vector< TVertex * > &iViewVertices, vector< FEdge * > &ioNewEdges, vector< ViewEdge * > &ioNewViewEdges)
Definition: ViewMap.h:1650
void setSShape(SShape *iSShape)
Definition: ViewMap.h:1592
const string & getLibraryPath() const
Definition: ViewMap.h:1585
void RemoveVertex(ViewVertex *iViewVertex)
Definition: ViewMap.cpp:812
void setEdges(const vector< ViewEdge * > &iEdges)
Definition: ViewMap.h:1604
void RemoveEdge(ViewEdge *iViewEdge)
Definition: ViewMap.cpp:800
Id getId() const
Definition: ViewMap.h:1573
void AddEdge(ViewEdge *iEdge)
Definition: ViewMap.h:1617
ViewShape(ViewShape &iBrother)
Definition: ViewMap.h:1436
virtual ViewShape * duplicate()
Definition: ViewMap.h:1523
virtual ~ViewShape()
Definition: ViewMap.cpp:783
ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > const_edge_iterator
Definition: ViewMap.h:287
virtual ~ViewVertex()
Definition: ViewMap.h:325
pair< ViewEdge *, bool > directedViewEdge
Definition: ViewMap.h:280
virtual Nature::VertexNature getNature() const
Definition: ViewMap.h:331
virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin()=0
virtual const_edge_iterator edges_begin() const =0
virtual const_edge_iterator edges_end() const =0
virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const =0
ViewVertex(ViewVertex &iBrother)
Definition: ViewMap.h:313
virtual edge_iterator edges_end()=0
virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge)=0
virtual string getExactTypeName() const
Definition: ViewMap.h:273
ViewVertex(Nature::VertexNature nature)
Definition: ViewMap.h:305
virtual ViewVertex * duplicate()=0
virtual edge_iterator edges_begin()=0
virtual edge_iterator edges_iterator(ViewEdge *iEdge)=0
vector< directedViewEdge > edges_container
Definition: ViewMap.h:282
virtual void Replace(ViewEdge *, ViewEdge *)
Definition: ViewMap.h:344
virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd()=0
ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > edge_iterator
Definition: ViewMap.h:285
void setNature(Nature::VertexNature iNature)
Definition: ViewMap.h:338
Material material
bool intersect2dSeg2dArea(const Vec2r &min, const Vec2r &max, const Vec2r &A, const Vec2r &B)
Definition: GeomUtils.cpp:29
bool include2dSeg2dArea(const Vec2r &min, const Vec2r &max, const Vec2r &A, const Vec2r &B)
Definition: GeomUtils.cpp:50
VecMat::Vec2< real > Vec2r
Definition: Geom.h:36
VecMat::Vec3< real > Vec3r
Definition: Geom.h:42
unsigned short VertexNature
Definition: Nature.h:32
unsigned short EdgeNature
Definition: Nature.h:46
static const VertexNature VIEW_VERTEX
Definition: Nature.h:38
static const VertexNature T_VERTEX
Definition: Nature.h:42
static const VertexNature NON_T_VERTEX
Definition: Nature.h:40
inherits from class Rep
Definition: AppCanvas.cpp:32
static unsigned x[3]
Definition: RandGen.cpp:87
double real
Definition: Precision.h:26