SFCGAL  1.3.0
Public Types | Public Member Functions | List of all members
SFCGAL::TriangulatedSurface Class Reference

A TriangulatedSurface in SFA modeled as a Triangle soup. More...

#include <TriangulatedSurface.h>

Inheritance diagram for SFCGAL::TriangulatedSurface:
SFCGAL::Surface SFCGAL::Geometry

Public Types

typedef boost::ptr_vector< Triangle >::iterator iterator
 
typedef boost::ptr_vector< Triangle >::const_iterator const_iterator
 

Public Member Functions

 TriangulatedSurface ()
 Empty TriangulatedSurface constructor. More...
 
 TriangulatedSurface (const std::vector< Triangle > &triangle)
 Constructor with a vector of triangles. More...
 
 TriangulatedSurface (const TriangulatedSurface &other)
 Copy constructor. More...
 
TriangulatedSurfaceoperator= (TriangulatedSurface other)
 assign operator More...
 
 ~TriangulatedSurface ()
 destructor More...
 
virtual TriangulatedSurfaceclone () const
 Get a deep copy of the geometry. More...
 
virtual std::string geometryType () const
 [OGC/SFA]returns the geometry type More...
 
virtual GeometryType geometryTypeId () const
 Returns a code corresponding to the type. More...
 
virtual int dimension () const
 [OGC/SFA]Dimension of the Geometry ( 0 : punctual, 1 : curve, ...) More...
 
virtual int coordinateDimension () const
 [OGC/SFA]returns the dimension of the coordinates More...
 
virtual bool isEmpty () const
 [OGC/SFA]test if geometry is empty More...
 
virtual bool is3D () const
 [OGC/SFA]test if geometry is 3d More...
 
virtual bool isMeasured () const
 [OGC/SFA]test if geometry is measured (has an m) More...
 
size_t numTriangles () const
 [SFA/OGC]Returns the number of points More...
 
const TriangletriangleN (size_t const &n) const
 [SFA/OGC]Returns the n-th point More...
 
TriangletriangleN (size_t const &n)
 [SFA/OGC]Returns the n-th point More...
 
void addTriangle (const Triangle &triangle)
 add a Triangle to the TriangulatedSurface More...
 
void addTriangle (Triangle *triangle)
 add a Triangle to the TriangulatedSurface More...
 
void addTriangles (const TriangulatedSurface &other)
 add triangles from an other TriangulatedSurface More...
 
virtual size_t numGeometries () const
 [OGC/SFA]Gets the number of geometries in a collection of geometries More...
 
virtual const TrianglegeometryN (size_t const &n) const
 [OGC/SFA]Returns the n-th geometry More...
 
virtual TrianglegeometryN (size_t const &n)
 [OGC/SFA]Returns the n-th geometry More...
 
void reserve (const size_t &n)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
virtual void accept (GeometryVisitor &visitor)
 [visitor]dispatch visitor

  More...
 
virtual void accept (ConstGeometryVisitor &visitor) const
 [visitor]dispatch visitor

  More...
 
template<typename K , typename Polyhedron >
std::auto_ptr< Polyhedron > toPolyhedron_3 () const
 Converts a TriangulatedSurface to a CGAL::Polyhedron_3. More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer. More...
 
- Public Member Functions inherited from SFCGAL::Surface
virtual ~Surface ()
 destructor More...
 
- Public Member Functions inherited from SFCGAL::Geometry
virtual ~Geometry ()
 
void forceValidityFlag (bool validity)
 Force the state of the validity flag. More...
 
bool hasValidityFlag () const
 Returns the validity flag. More...
 
std::string asText (const int &numDecimals=-1) const
 [OGC/SFA]returns the WKT string More...
 
Envelope envelope () const
 [OGC/SFA]Returns a polygon representing the BBOX of the geometry More...
 
virtual std::auto_ptr< Geometryboundary () const
 [OGC/SFA]Returns the boundary of the geometry More...
 
double distance (const Geometry &other) const
 Computes the distance to an other geometry. More...
 
double distance3D (const Geometry &other) const
 Computes the 3D distance to an other geometry. More...
 
void round (const long &scale=1)
 round the geometry with a corresponding scale factor More...
 
template<typename Derived >
bool is () const
 Tests if geometry is of "Derived" type given as template parameter. More...
 
template<typename Derived >
const Derived & as () const
 Downcast to a "Derived" class. More...
 
template<typename Derived >
Derived & as ()
 Downcast to a "Derived" class. More...
 
template<class Archive >
void serialize (Archive &, const unsigned int)
 Serializer

. More...

 

Additional Inherited Members

- Protected Member Functions inherited from SFCGAL::Surface
 Surface ()
 [OGC/SFS]"The area of this Surface, as measured in the spatial reference system of this Surface" More...
 
 Surface (Surface const &other)
 no copy constructor More...
 
- Protected Member Functions inherited from SFCGAL::Geometry
 Geometry ()
 
 Geometry (const Geometry &)
 
const Geometryoperator= (const Geometry &)
 
- Protected Attributes inherited from SFCGAL::Geometry
bool validityFlag_
 

Detailed Description

A TriangulatedSurface in SFA modeled as a Triangle soup.

Todo:
do better than a "triangle soup" or add topological view?

Member Typedef Documentation

Constructor & Destructor Documentation

SFCGAL::TriangulatedSurface::TriangulatedSurface ( )

Empty TriangulatedSurface constructor.

SFCGAL::TriangulatedSurface::TriangulatedSurface ( const std::vector< Triangle > &  triangle)

Constructor with a vector of triangles.

SFCGAL::TriangulatedSurface::TriangulatedSurface ( const TriangulatedSurface other)

Copy constructor.

SFCGAL::TriangulatedSurface::~TriangulatedSurface ( )

destructor

Member Function Documentation

void SFCGAL::TriangulatedSurface::accept ( GeometryVisitor visitor)
virtual

[visitor]dispatch visitor

 

Implements SFCGAL::Geometry.

void SFCGAL::TriangulatedSurface::accept ( ConstGeometryVisitor visitor) const
virtual

[visitor]dispatch visitor

 

Implements SFCGAL::Geometry.

void SFCGAL::TriangulatedSurface::addTriangle ( const Triangle triangle)
inline
void SFCGAL::TriangulatedSurface::addTriangle ( Triangle triangle)
inline
void SFCGAL::TriangulatedSurface::addTriangles ( const TriangulatedSurface other)

add triangles from an other TriangulatedSurface

iterator SFCGAL::TriangulatedSurface::begin ( )
inline
const_iterator SFCGAL::TriangulatedSurface::begin ( ) const
inline
TriangulatedSurface * SFCGAL::TriangulatedSurface::clone ( ) const
virtual

Get a deep copy of the geometry.

Implements SFCGAL::Geometry.

int SFCGAL::TriangulatedSurface::coordinateDimension ( ) const
virtual

[OGC/SFA]returns the dimension of the coordinates

Precondition
suppose no mix of 2D/3D coordinates

Implements SFCGAL::Geometry.

int SFCGAL::TriangulatedSurface::dimension ( ) const
virtual

[OGC/SFA]Dimension of the Geometry ( 0 : punctual, 1 : curve, ...)

Warning
empty geometries provide the dimension corresponding to the object

Reimplemented from SFCGAL::Surface.

iterator SFCGAL::TriangulatedSurface::end ( )
inline
const_iterator SFCGAL::TriangulatedSurface::end ( ) const
inline
const Triangle & SFCGAL::TriangulatedSurface::geometryN ( size_t const &  n) const
virtual

[OGC/SFA]Returns the n-th geometry

Warning
*this for Point, LineString, Polygon, Triangle

Reimplemented from SFCGAL::Geometry.

Triangle & SFCGAL::TriangulatedSurface::geometryN ( size_t const &  n)
virtual

[OGC/SFA]Returns the n-th geometry

Warning
*this for Point, LineString, Polygon, Triangle

Reimplemented from SFCGAL::Geometry.

std::string SFCGAL::TriangulatedSurface::geometryType ( ) const
virtual

[OGC/SFA]returns the geometry type

Warning
use CamelCase (LineString, not LINESTRING)

Implements SFCGAL::Geometry.

GeometryType SFCGAL::TriangulatedSurface::geometryTypeId ( ) const
virtual

Returns a code corresponding to the type.

Warning
not standard

Implements SFCGAL::Geometry.

bool SFCGAL::TriangulatedSurface::is3D ( ) const
virtual

[OGC/SFA]test if geometry is 3d

Precondition
suppose no mix of 2D/3D coordinates

Implements SFCGAL::Geometry.

bool SFCGAL::TriangulatedSurface::isEmpty ( ) const
virtual

[OGC/SFA]test if geometry is empty

Implements SFCGAL::Geometry.

bool SFCGAL::TriangulatedSurface::isMeasured ( ) const
virtual

[OGC/SFA]test if geometry is measured (has an m)

Precondition
suppose no mix of M/!M points

Implements SFCGAL::Geometry.

size_t SFCGAL::TriangulatedSurface::numGeometries ( ) const
virtual

[OGC/SFA]Gets the number of geometries in a collection of geometries

Warning
1 for Point, LineString, Polygon, Triangle

Reimplemented from SFCGAL::Geometry.

size_t SFCGAL::TriangulatedSurface::numTriangles ( ) const
inline

[SFA/OGC]Returns the number of points

Deprecated:
see numGeometries()
TriangulatedSurface & SFCGAL::TriangulatedSurface::operator= ( TriangulatedSurface  other)

assign operator

void SFCGAL::TriangulatedSurface::reserve ( const size_t &  n)
template<class Archive >
void SFCGAL::TriangulatedSurface::serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serializer.

template<typename K , typename Polyhedron >
std::auto_ptr< Polyhedron > SFCGAL::TriangulatedSurface::toPolyhedron_3 ( ) const

Converts a TriangulatedSurface to a CGAL::Polyhedron_3.

const Triangle& SFCGAL::TriangulatedSurface::triangleN ( size_t const &  n) const
inline

[SFA/OGC]Returns the n-th point

Deprecated:
see geometryN()
Triangle& SFCGAL::TriangulatedSurface::triangleN ( size_t const &  n)
inline

[SFA/OGC]Returns the n-th point

Deprecated:
see geometryN()