DGtal  1.3.beta
SurfaceMesh.h
1 
17 #pragma once
18 
31 #if defined(SurfaceMesh_RECURSES)
32 #error Recursive header files inclusion detected in SurfaceMesh.h
33 #else // defined(SurfaceMesh_RECURSES)
34 
35 #define SurfaceMesh_RECURSES
36 
37 #if !defined SurfaceMesh_h
38 
39 #define SurfaceMesh_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <sstream>
45 #include <string>
46 #include "DGtal/base/Common.h"
47 #include "DGtal/base/IntegerSequenceIterator.h"
48 #include "DGtal/helpers/StdDefs.h"
49 
50 namespace DGtal
51 {
53  // template class SurfaceMesh
90  template < typename TRealPoint, typename TRealVector >
91  struct SurfaceMesh
92  {
93  typedef TRealPoint RealPoint;
94  typedef TRealVector RealVector;
96 
98  BOOST_STATIC_ASSERT( ( dimension == 3 ) );
99 
100  typedef typename RealVector::Component Scalar;
101  typedef std::vector<Scalar> Scalars;
103  typedef std::size_t Size;
105  typedef std::size_t Index;
106  typedef Index Face;
107  typedef Index Edge;
108  typedef Index Vertex;
109  typedef std::pair< Edge, Scalar > WeightedEdge;
110  typedef std::pair< Face, Scalar > WeightedFace;
112  typedef std::vector< Vertex > Vertices;
114  typedef std::vector< Edge > Edges;
115  typedef std::vector< WeightedEdge > WeightedEdges;
116  typedef std::vector< Face > Faces;
117  typedef std::vector< WeightedFace > WeightedFaces;
118  typedef std::pair< Vertex, Vertex > VertexPair;
119 
120  // Required by CUndirectedSimpleLocalGraph
121  typedef std::set<Vertex> VertexSet;
122  template <typename Value> struct VertexMap {
123  typedef typename std::map<Vertex, Value> Type;
124  };
125 
126  // Required by CUndirectedSimpleGraph
127 
130 
131  //---------------------------------------------------------------------------
132  public:
135 
137  ~SurfaceMesh() = default;
147  SurfaceMesh() = default;
150  SurfaceMesh( const Self& other ) = default;
153  SurfaceMesh( Self&& other ) = default;
157  Self& operator=( const Self& other ) = default;
158 
178  template <typename RealPointIterator, typename VerticesIterator>
179  SurfaceMesh( RealPointIterator itPos, RealPointIterator itPosEnd,
180  VerticesIterator itVertices, VerticesIterator itVerticesEnd );
181 
203  template <typename RealPointIterator, typename VerticesIterator>
204  bool init( RealPointIterator itPos, RealPointIterator itPosEnd,
205  VerticesIterator itVertices, VerticesIterator itVerticesEnd );
206 
208  void clear();
209 
211 
212  //---------------------------------------------------------------------------
213  public:
216 
219  template <typename RealVectorIterator>
220  bool setVertexNormals( RealVectorIterator itN, RealVectorIterator itNEnd );
221 
224  template <typename RealVectorIterator>
225  bool setFaceNormals( RealVectorIterator itN, RealVectorIterator itNEnd );
226 
231 
236 
241 
247 
251  template <typename AnyRing>
252  std::vector<AnyRing> computeFaceValuesFromVertexValues
253  ( const std::vector<AnyRing>& vvalues ) const;
254 
258  template <typename AnyRing>
259  std::vector<AnyRing> computeVertexValuesFromFaceValues
260  ( const std::vector<AnyRing>& fvalues ) const;
261 
264  std::vector<RealVector> computeFaceUnitVectorsFromVertexUnitVectors
265  ( const std::vector<RealVector>& vuvectors ) const;
266 
269  std::vector<RealVector> computeVertexUnitVectorsFromFaceUnitVectors
270  ( const std::vector<RealVector>& fuvectors ) const;
271 
273 
274  //---------------------------------------------------------------------------
275  public:
278 
280  Size nbVertices() const
281  { return myIncidentFaces.size(); }
282 
284  Size nbEdges() const
285  { return myEdgeVertices.size(); }
286 
288  Size nbFaces() const
289  { return myIncidentVertices.size(); }
290 
294  long Euler() const
295  { return nbVertices() - nbEdges() + nbFaces(); }
296 
302  Edge makeEdge( Vertex i, Vertex j ) const;
303 
307  const Vertices& incidentVertices( Face f ) const
308  { return myIncidentVertices[ f ]; }
309 
313  const Faces& incidentFaces( Vertex v ) const
314  { return myIncidentFaces[ v ]; }
315 
318  const Faces& neighborFaces( Face f ) const
319  { return myNeighborFaces[ f ]; }
320 
323  const Vertices& neighborVertices( Vertex v ) const
324  { return myNeighborVertices[ v ]; }
325 
329  const VertexPair& edgeVertices( Edge e ) const
330  { return myEdgeVertices[ e ]; }
331 
335  const Faces& edgeFaces( Edge e ) const
336  { return myEdgeFaces[ e ]; }
337 
346  const Faces& edgeRightFaces( Edge e ) const
347  { return myEdgeRightFaces[ e ]; }
348 
357  const Faces& edgeLeftFaces( Edge e ) const
358  { return myEdgeLeftFaces[ e ]; }
359 
362  const std::vector< Vertices >& allIncidentVertices() const
363  { return myIncidentVertices; }
364 
367  const std::vector< Faces >& allIncidentFaces() const
368  { return myIncidentFaces; }
369 
371  const std::vector< Faces >& allNeighborFaces() const
372  { return myNeighborFaces; }
373 
375  const std::vector< Vertices >& allNeighborVertices() const
376  { return myNeighborVertices; }
377 
381  const std::vector< VertexPair >& allEdgeVertices() const
382  { return myEdgeVertices; }
383 
386  const std::vector< Faces >& allEdgeFaces() const
387  { return myEdgeFaces; }
388 
396  const std::vector< Faces >& allEdgeRightFaces() const
397  { return myEdgeRightFaces; }
398 
406  const std::vector< Faces >& allEdgeLeftFaces() const
407  { return myEdgeLeftFaces; }
408 
410 
411  //---------------------------------------------------------------------------
412  public:
415 
438 
440 
441  // ----------------------- Undirected simple graph services ----------------------
442  public:
445 
449  Size size() const
450  { return nbVertices(); }
451 
459  { return 8; }
460 
466  Size degree( const Vertex & v ) const
467  { return myNeighborVertices[ v ].size(); }
468 
479  template <typename OutputIterator>
480  void
481  writeNeighbors( OutputIterator &it ,
482  const Vertex & v ) const
483  {
484  for ( auto&& nv : myNeighborVertices[ v ] )
485  *it++ = nv;
486  }
487 
504  template <typename OutputIterator, typename VertexPredicate>
505  void
506  writeNeighbors( OutputIterator &it ,
507  const Vertex & v,
508  const VertexPredicate & pred) const
509  {
510  for ( auto&& nv : myNeighborVertices[ v ] )
511  if ( pred( nv ) ) *it++ = nv;
512  }
513 
516  { return ConstIterator( 0 ); }
517 
520  { return ConstIterator( nbVertices() ); }
521 
523 
524  //---------------------------------------------------------------------------
525  public:
528 
530  const std::vector< RealPoint >& positions() const
531  { return myPositions; }
532 
537  { return myPositions[ v ]; }
538 
542  const RealPoint& position( Vertex v ) const
543  { return myPositions[ v ]; }
544 
546  const std::vector< RealVector >& vertexNormals() const
547  { return myVertexNormals; }
548 
550  std::vector< RealVector >& vertexNormals()
551  { return myVertexNormals; }
552 
557  { return myVertexNormals[ v ]; }
558 
562  const RealVector& vertexNormal( Vertex v ) const
563  { return myVertexNormals[ v ]; }
564 
566  const std::vector< RealVector >& faceNormals() const
567  { return myFaceNormals; }
568 
570  std::vector< RealVector >& faceNormals()
571  { return myFaceNormals; }
572 
577  { return myFaceNormals[ f ]; }
578 
582  const RealVector& faceNormal( Face f ) const
583  { return myFaceNormals[ f ]; }
584 
586  Scalar averageEdgeLength() const;
587 
591  Scalar localWindow( Face f ) const;
592 
597 
602 
605  RealPoint edgeCentroid( Index e ) const;
606 
609  RealPoint faceCentroid( Index f ) const;
610 
613  Scalar faceArea( Index f ) const;
614 
618  Scalars getMaxWeights( Index v ) const;
619 
641 
664 
680  std::tuple< Vertices, WeightedEdges, WeightedFaces >
682 
699  std::tuple< Vertices, WeightedEdges, WeightedFaces >
701 
716 
731 
742 
744 
745  // ----------------------- Interface --------------------------------------
746  public:
747 
752  void selfDisplay ( std::ostream & out ) const;
753 
758  bool isValid() const;
759 
760  // ------------------------- Protected Datas ------------------------------
761  protected:
763  std::vector< Vertices > myIncidentVertices;
765  std::vector< Faces > myIncidentFaces;
767  std::vector< RealPoint > myPositions;
769  std::vector< RealVector > myVertexNormals;
771  std::vector< RealVector > myFaceNormals;
773  std::vector< Faces > myNeighborFaces;
775  std::vector< Vertices > myNeighborVertices;
777  std::vector< VertexPair > myEdgeVertices;
779  std::vector< Faces > myEdgeFaces;
785  std::vector< Faces > myEdgeRightFaces;
791  std::vector< Faces > myEdgeLeftFaces;
792 
793  // ------------------------- Private Datas --------------------------------
794  private:
795 
796 
797  // ------------------------- Internals ------------------------------------
798  protected:
799 
801  void computeNeighbors();
803  void computeEdges();
804 
806  static Scalar rand01()
807  { return (Scalar) rand() / (Scalar) RAND_MAX; }
808 
809  }; // end of class SurfaceMesh
810 
817  template < typename TRealPoint, typename TRealVector >
818  std::ostream&
819  operator<< ( std::ostream & out,
820  const SurfaceMesh<TRealPoint, TRealVector> & object );
821 
822 } // namespace DGtal
823 
825 // Includes inline functions.
826 #include "SurfaceMesh.ih"
827 // //
829 
830 #endif // !defined SurfaceMesh_h
831 
832 #undef SurfaceMesh_RECURSES
833 #endif // else defined(SurfaceMesh_RECURSES)
DGtal::SurfaceMesh::Vertex
Index Vertex
Definition: SurfaceMesh.h:108
DGtal::SurfaceMesh::getMaxWeights
Scalars getMaxWeights(Index v) const
DGtal::SurfaceMesh::computeFaceUnitVectorsFromVertexUnitVectors
std::vector< RealVector > computeFaceUnitVectorsFromVertexUnitVectors(const std::vector< RealVector > &vuvectors) const
DGtal::SurfaceMesh::Scalar
RealVector::Component Scalar
Definition: SurfaceMesh.h:100
DGtal::SurfaceMesh::Self
SurfaceMesh< RealPoint, RealVector > Self
Definition: SurfaceMesh.h:95
DGtal::SurfaceMesh::vertexNormal
RealVector & vertexNormal(Vertex v)
Definition: SurfaceMesh.h:556
DGtal::SurfaceMesh::writeNeighbors
void writeNeighbors(OutputIterator &it, const Vertex &v, const VertexPredicate &pred) const
Definition: SurfaceMesh.h:506
DGtal::SurfaceMesh::clear
void clear()
Clears everything. The object is empty.
DGtal::SurfaceMesh::position
RealPoint & position(Vertex v)
Definition: SurfaceMesh.h:536
DGtal::SurfaceMesh::computeNeighbors
void computeNeighbors()
Computes neighboring information.
DGtal::SurfaceMesh::RealVector
TRealVector RealVector
Definition: SurfaceMesh.h:94
DGtal::SurfaceMesh::WeightedFaces
std::vector< WeightedFace > WeightedFaces
Definition: SurfaceMesh.h:117
DGtal::SurfaceMesh::faceNormals
const std::vector< RealVector > & faceNormals() const
Definition: SurfaceMesh.h:566
Face
TriMesh::Face Face
Definition: testTriangulatedSurface.cpp:56
DGtal::SurfaceMesh::degree
Size degree(const Vertex &v) const
Definition: SurfaceMesh.h:466
DGtal::SurfaceMesh::allEdgeFaces
const std::vector< Faces > & allEdgeFaces() const
Definition: SurfaceMesh.h:386
DGtal::SurfaceMesh::Euler
long Euler() const
Definition: SurfaceMesh.h:294
DGtal::SurfaceMesh::computeFaceNormalsFromVertexNormals
void computeFaceNormalsFromVertexNormals()
DGtal::SurfaceMesh::WeightedFace
std::pair< Face, Scalar > WeightedFace
Definition: SurfaceMesh.h:110
DGtal::SurfaceMesh::computeVertexValuesFromFaceValues
std::vector< AnyRing > computeVertexValuesFromFaceValues(const std::vector< AnyRing > &fvalues) const
DGtal::SurfaceMesh::allNeighborVertices
const std::vector< Vertices > & allNeighborVertices() const
Definition: SurfaceMesh.h:375
Index
SMesh::Index Index
Definition: fullConvexitySphereGeodesics.cpp:117
DGtal::SurfaceMesh::VertexPair
std::pair< Vertex, Vertex > VertexPair
Definition: SurfaceMesh.h:118
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::SurfaceMesh::allIncidentFaces
const std::vector< Faces > & allIncidentFaces() const
Definition: SurfaceMesh.h:367
DGtal::SurfaceMesh
Aim: Represents an embedded mesh as faces and a list of vertices. Vertices may be shared among faces ...
Definition: SurfaceMesh.h:91
DGtal::SurfaceMesh::computeManifoldBoundaryEdges
Edges computeManifoldBoundaryEdges() const
DGtal::SurfaceMesh::edgeInclusionRatio
Scalar edgeInclusionRatio(RealPoint p, Scalar r, Index e) const
DGtal::IntegerSequenceIterator
Aim: It is a simple class that mimics a (non mutable) iterator over integers. You can increment it,...
Definition: IntegerSequenceIterator.h:65
DGtal::SurfaceMesh::myFaceNormals
std::vector< RealVector > myFaceNormals
For each face, its normal vector.
Definition: SurfaceMesh.h:771
DGtal::SurfaceMesh::myNeighborVertices
std::vector< Vertices > myNeighborVertices
For each vertex, its range of neighbor vertices (no particular order)
Definition: SurfaceMesh.h:775
DGtal::SurfaceMesh::myEdgeVertices
std::vector< VertexPair > myEdgeVertices
For each edge, its two vertices.
Definition: SurfaceMesh.h:777
DGtal::SurfaceMesh::end
ConstIterator end() const
Definition: SurfaceMesh.h:519
DGtal::SurfaceMesh::computeManifoldInnerEdges
Edges computeManifoldInnerEdges() const
DGtal::SurfaceMesh::vertexInclusionRatio
Scalar vertexInclusionRatio(RealPoint p, Scalar r, Index v) const
Vertex
TriMesh::Vertex Vertex
Definition: testTriangulatedSurface.cpp:57
DGtal::SurfaceMesh::begin
ConstIterator begin() const
Definition: SurfaceMesh.h:515
DGtal::SurfaceMesh::positions
const std::vector< RealPoint > & positions() const
Definition: SurfaceMesh.h:530
DGtal::SurfaceMesh::nbVertices
Size nbVertices() const
Definition: SurfaceMesh.h:280
DGtal::SurfaceMesh::averageEdgeLength
Scalar averageEdgeLength() const
DGtal::SurfaceMesh::makeEdge
Edge makeEdge(Vertex i, Vertex j) const
DGtal::PointVector::Component
TEuclideanRing Component
Type for Vector elements.
Definition: PointVector.h:614
DGtal::SurfaceMesh::computeFacesInclusionsInBall
WeightedFaces computeFacesInclusionsInBall(Scalar r, Index f) const
DGtal::SurfaceMesh::ConstIterator
IntegerSequenceIterator< Vertex > ConstIterator
Non mutable iterator for visiting vertices.
Definition: SurfaceMesh.h:129
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::SurfaceMesh::size
Size size() const
Definition: SurfaceMesh.h:449
DGtal::SurfaceMesh::myEdgeFaces
std::vector< Faces > myEdgeFaces
For each edge, its faces (one, two, or more if non manifold)
Definition: SurfaceMesh.h:779
DGtal::SurfaceMesh::Faces
std::vector< Face > Faces
Definition: SurfaceMesh.h:116
DGtal::SurfaceMesh::Vertices
std::vector< Vertex > Vertices
The type that defines a list/range of vertices (e.g. to define faces)
Definition: SurfaceMesh.h:112
DGtal::SurfaceMesh::incidentFaces
const Faces & incidentFaces(Vertex v) const
Definition: SurfaceMesh.h:313
DGtal::SurfaceMesh::computeNonManifoldEdges
Edges computeNonManifoldEdges() const
DGtal::SurfaceMesh::edgeLeftFaces
const Faces & edgeLeftFaces(Edge e) const
Definition: SurfaceMesh.h:357
DGtal::SurfaceMesh::faceNormal
RealVector & faceNormal(Face f)
Definition: SurfaceMesh.h:576
DGtal::SurfaceMesh::computeVertexNormalsFromFaceNormals
void computeVertexNormalsFromFaceNormals()
DGtal::SurfaceMesh::myIncidentFaces
std::vector< Faces > myIncidentFaces
For each vertex, its range of incident faces.
Definition: SurfaceMesh.h:765
DGtal::SurfaceMesh::Edge
Index Edge
Definition: SurfaceMesh.h:107
DGtal::SurfaceMesh::VertexSet
std::set< Vertex > VertexSet
Definition: SurfaceMesh.h:121
DGtal::SurfaceMesh::~SurfaceMesh
~SurfaceMesh()=default
Default destructor.
DGtal::SurfaceMesh::nbEdges
Size nbEdges() const
Definition: SurfaceMesh.h:284
DGtal::SurfaceMesh::SurfaceMesh
SurfaceMesh()=default
DGtal::SurfaceMesh::setFaceNormals
bool setFaceNormals(RealVectorIterator itN, RealVectorIterator itNEnd)
DGtal::SurfaceMesh::neighborFaces
const Faces & neighborFaces(Face f) const
Definition: SurfaceMesh.h:318
DGtal::SurfaceMesh::myIncidentVertices
std::vector< Vertices > myIncidentVertices
For each face, its range of incident vertices.
Definition: SurfaceMesh.h:763
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::SurfaceMesh::Edges
std::vector< Edge > Edges
The type that defines a list/range of faces.
Definition: SurfaceMesh.h:114
DGtal::SurfaceMesh::isValid
bool isValid() const
DGtal::SurfaceMesh::computeVertexNormalsFromFaceNormalsWithMaxWeights
void computeVertexNormalsFromFaceNormalsWithMaxWeights()
DGtal::SurfaceMesh::edgeVertices
const VertexPair & edgeVertices(Edge e) const
Definition: SurfaceMesh.h:329
DGtal::SurfaceMesh::faceCentroid
RealPoint faceCentroid(Index f) const
DGtal::SurfaceMesh::faceInclusionRatio
Scalar faceInclusionRatio(RealPoint p, Scalar r, Index f) const
DGtal::SurfaceMesh::setVertexNormals
bool setVertexNormals(RealVectorIterator itN, RealVectorIterator itNEnd)
DGtal::SurfaceMesh::faceArea
Scalar faceArea(Index f) const
DGtal::SurfaceMesh::rand01
static Scalar rand01()
Definition: SurfaceMesh.h:806
DGtal::SurfaceMesh::computeVertexUnitVectorsFromFaceUnitVectors
std::vector< RealVector > computeVertexUnitVectorsFromFaceUnitVectors(const std::vector< RealVector > &fuvectors) const
DGtal::SurfaceMesh::computeCellsInclusionsInBall
std::tuple< Vertices, WeightedEdges, WeightedFaces > computeCellsInclusionsInBall(Scalar r, Index f) const
DGtal::SurfaceMesh::perturbateWithAdaptiveUniformRandomNoise
void perturbateWithAdaptiveUniformRandomNoise(Scalar p)
DGtal::SurfaceMesh::WeightedEdge
std::pair< Edge, Scalar > WeightedEdge
Definition: SurfaceMesh.h:109
DGtal::SurfaceMesh::writeNeighbors
void writeNeighbors(OutputIterator &it, const Vertex &v) const
Definition: SurfaceMesh.h:481
DGtal::SurfaceMesh::computeEdges
void computeEdges()
Computes edge information.
DGtal::SurfaceMesh::Scalars
std::vector< Scalar > Scalars
Definition: SurfaceMesh.h:101
DGtal::SurfaceMesh::computeManifoldInnerUnconsistentEdges
Edges computeManifoldInnerUnconsistentEdges() const
DGtal::SurfaceMesh::Face
Index Face
Definition: SurfaceMesh.h:106
DGtal::PointVector::dimension
static const Dimension dimension
Copy of the static dimension of the Point/Vector.
Definition: PointVector.h:626
DGtal::SurfaceMesh::faceNormals
std::vector< RealVector > & faceNormals()
Definition: SurfaceMesh.h:570
DGtal::SurfaceMesh::allEdgeVertices
const std::vector< VertexPair > & allEdgeVertices() const
Definition: SurfaceMesh.h:381
DGtal::SurfaceMesh::computeManifoldInnerConsistentEdges
Edges computeManifoldInnerConsistentEdges() const
DGtal::SurfaceMesh::computeFaceValuesFromVertexValues
std::vector< AnyRing > computeFaceValuesFromVertexValues(const std::vector< AnyRing > &vvalues) const
DGtal::SurfaceMesh::allNeighborFaces
const std::vector< Faces > & allNeighborFaces() const
Definition: SurfaceMesh.h:371
DGtal::SurfaceMesh::perturbateWithUniformRandomNoise
void perturbateWithUniformRandomNoise(Scalar p)
DGtal::SurfaceMesh::dimension
static const Dimension dimension
Definition: SurfaceMesh.h:97
DGtal::SurfaceMesh::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::SurfaceMesh::localWindow
Scalar localWindow(Face f) const
Edge
HalfEdgeDataStructure::Edge Edge
Definition: testHalfEdgeDataStructure.cpp:47
DGtal::SurfaceMesh::neighborVertices
const Vertices & neighborVertices(Vertex v) const
Definition: SurfaceMesh.h:323
DGtal::SurfaceMesh::computeFaceNormalsFromPositions
void computeFaceNormalsFromPositions()
DGtal::SurfaceMesh::bestCapacity
Size bestCapacity() const
Definition: SurfaceMesh.h:458
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
DGtal::SurfaceMesh::allEdgeLeftFaces
const std::vector< Faces > & allEdgeLeftFaces() const
Definition: SurfaceMesh.h:406
DGtal::SurfaceMesh::VertexMap
Definition: SurfaceMesh.h:122
DGtal::SurfaceMesh::vertexNormals
const std::vector< RealVector > & vertexNormals() const
Definition: SurfaceMesh.h:546
DGtal::SurfaceMesh::VertexMap::Type
std::map< Vertex, Value > Type
Definition: SurfaceMesh.h:123
DGtal::SurfaceMesh::myEdgeLeftFaces
std::vector< Faces > myEdgeLeftFaces
Definition: SurfaceMesh.h:791
DGtal::SurfaceMesh::RealPoint
TRealPoint RealPoint
Definition: SurfaceMesh.h:93
DGtal::SurfaceMesh::Size
std::size_t Size
The type for counting elements.
Definition: SurfaceMesh.h:103
DGtal::SurfaceMesh::myPositions
std::vector< RealPoint > myPositions
For each vertex, its position.
Definition: SurfaceMesh.h:767
DGtal::SurfaceMesh::operator=
Self & operator=(const Self &other)=default
DGtal::SurfaceMesh::edgeRightFaces
const Faces & edgeRightFaces(Edge e) const
Definition: SurfaceMesh.h:346
DGtal::SurfaceMesh::edgeFaces
const Faces & edgeFaces(Edge e) const
Definition: SurfaceMesh.h:335
DGtal::SurfaceMesh::position
const RealPoint & position(Vertex v) const
Definition: SurfaceMesh.h:542
DGtal::SurfaceMesh::allIncidentVertices
const std::vector< Vertices > & allIncidentVertices() const
Definition: SurfaceMesh.h:362
DGtal::SurfaceMesh::vertexNormals
std::vector< RealVector > & vertexNormals()
Definition: SurfaceMesh.h:550
DGtal::SurfaceMesh::vertexNormal
const RealVector & vertexNormal(Vertex v) const
Definition: SurfaceMesh.h:562
DGtal::SurfaceMesh::edgeCentroid
RealPoint edgeCentroid(Index e) const
DGtal::SurfaceMesh::myEdgeRightFaces
std::vector< Faces > myEdgeRightFaces
Definition: SurfaceMesh.h:785
DGtal::SurfaceMesh::faceNormal
const RealVector & faceNormal(Face f) const
Definition: SurfaceMesh.h:582
DGtal::SurfaceMesh::allEdgeRightFaces
const std::vector< Faces > & allEdgeRightFaces() const
Definition: SurfaceMesh.h:396
DGtal::SurfaceMesh::incidentVertices
const Vertices & incidentVertices(Face f) const
Definition: SurfaceMesh.h:307
DGtal::SurfaceMesh::WeightedEdges
std::vector< WeightedEdge > WeightedEdges
Definition: SurfaceMesh.h:115
DGtal::SurfaceMesh::init
bool init(RealPointIterator itPos, RealPointIterator itPosEnd, VerticesIterator itVertices, VerticesIterator itVerticesEnd)
DGtal::SurfaceMesh::nbFaces
Size nbFaces() const
Definition: SurfaceMesh.h:288
DGtal::SurfaceMesh::myVertexNormals
std::vector< RealVector > myVertexNormals
For each vertex, its normal vector.
Definition: SurfaceMesh.h:769
DGtal::SurfaceMesh::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((dimension==3))
DGtal::SurfaceMesh::myNeighborFaces
std::vector< Faces > myNeighborFaces
For each face, its range of neighbor faces (no particular order)
Definition: SurfaceMesh.h:773
DGtal::SurfaceMesh::Index
std::size_t Index
The type used for numbering vertices and faces.
Definition: SurfaceMesh.h:105