Skip to content

Class SFCGAL::TriangulatedSurface

ClassList > SFCGAL > TriangulatedSurface

More...

  • #include <TriangulatedSurface.h>

Inherits the following classes: SFCGAL::Surface

Public Types

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

Public Functions

Type Name
TriangulatedSurface ()
TriangulatedSurface (const std::vector< Triangle > & triangle)
TriangulatedSurface (const TriangulatedSurface & other)
virtual void accept (GeometryVisitor & visitor)
[visitor]dispatch visitor
virtual void accept (ConstGeometryVisitor & visitor) const
[visitor]dispatch visitor
void addTriangle (const Triangle & triangle)
void addTriangle (Triangle * triangle)
void addTriangles (const TriangulatedSurface & other)
iterator begin ()
const_iterator begin () const
virtual TriangulatedSurface * clone () const
Get a deep copy of the geometry.
virtual int coordinateDimension () const
virtual int dimension () const
iterator end ()
const_iterator end () const
virtual const Triangle & geometryN (size_t const & n) const
[OGC/SFA]Returns the n-th geometry
virtual Triangle & geometryN (size_t const & n)
[OGC/SFA]Returns the n-th geometry
virtual std::string geometryType () const
[OGC/SFA]returns the geometry type
virtual GeometryType geometryTypeId () const
Returns a code corresponding to the type.
virtual bool is3D () const
virtual bool isEmpty () const
virtual bool isMeasured () const
virtual size_t numGeometries () const
[OGC/SFA]Gets the number of geometries in a collection of geometries
size_t numTriangles () const
TriangulatedSurface & operator= (TriangulatedSurface other)
void reserve (const size_t & n)
void serialize (Archive & ar, const unsigned int)
std::unique_ptr< Polyhedron > toPolyhedron_3 () const
Converts a TriangulatedSurface to a CGAL::Polyhedron_3.
auto toPolyhedron_3 () const
const Triangle & triangleN (size_t const & n) const
Triangle & triangleN (size_t const & n)
~TriangulatedSurface ()

Public Functions inherited from SFCGAL::Surface

See SFCGAL::Surface

Type Name
virtual int dimension () const
virtual ~Surface ()

Public Functions inherited from SFCGAL::Geometry

See SFCGAL::Geometry

Type Name
Geometry ()
Default constructor.
Geometry (const Geometry &) = default
Copy constructor.
virtual void accept (GeometryVisitor & visitor) = 0
[visitor]dispatch visitor
virtual void accept (ConstGeometryVisitor & visitor) const = 0
[visitor]dispatch visitor
auto almostEqual (const Geometry & other, const double tolerance) const
const Derived & as () const
Downcast to a "Derived" class.
Derived & as ()
Downcast to a "Derived" class.
std::string asText (const int & numDecimals=-1) const
std::string asWkb (boost::endian::order wkbOrder=boost::endian::order::native, bool asHex=false) const
virtual std::unique_ptr< Geometry > boundary () const
[OGC/SFA]Returns the boundary of the geometry
virtual Geometry * clone () const = 0
Get a deep copy of the geometry.
virtual int coordinateDimension () const = 0
virtual int dimension () const = 0
double distance (const Geometry & other) const
Computes the distance to an other geometry.
double distance3D (const Geometry & other) const
Computes the 3D distance to an other geometry.
Envelope envelope () const
void forceValidityFlag (bool validity)
virtual const Geometry & geometryN (size_t const & n) const
[OGC/SFA]Returns the n-th geometry
virtual Geometry & geometryN (size_t const & n)
[OGC/SFA]Returns the n-th geometry
virtual std::string geometryType () const = 0
[OGC/SFA]returns the geometry type
virtual GeometryType geometryTypeId () const = 0
Returns a code corresponding to the type.
bool hasValidityFlag () const
bool is () const
Tests if geometry is of "Derived" type given as template parameter.
virtual bool is3D () const = 0
virtual bool isEmpty () const = 0
virtual bool isMeasured () const = 0
virtual size_t numGeometries () const
[OGC/SFA]Gets the number of geometries in a collection of geometries
Geometry & operator= (const Geometry & other) = default
Copy assignemnt operator.
void round (const long & scale=1)
round the geometry with a corresponding scale factor
void serialize (Archive &, const unsigned int)
virtual ~Geometry () = default
Destructor.

Protected Attributes inherited from SFCGAL::Geometry

See SFCGAL::Geometry

Type Name
bool validityFlag_ = = false

Protected Functions inherited from SFCGAL::Surface

See SFCGAL::Surface

Type Name
Surface ()
Surface (Surface const & other)

Detailed Description

A TriangulatedSurface in SFA modeled as a Triangle soup

Todo

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

Public Types Documentation

typedef const_iterator

typedef boost::ptr_vector<Triangle>::const_iterator SFCGAL::TriangulatedSurface::const_iterator;

typedef iterator

typedef boost::ptr_vector<Triangle>::iterator SFCGAL::TriangulatedSurface::iterator;

Public Functions Documentation

function TriangulatedSurface [1/3]

SFCGAL::TriangulatedSurface::TriangulatedSurface () 

Empty TriangulatedSurface constructor


function TriangulatedSurface [2/3]

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

Constructor with a vector of triangles


function TriangulatedSurface [3/3]

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

Copy constructor


function accept [1/2]

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

Implements SFCGAL::Geometry::accept


function accept [2/2]

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

Implements SFCGAL::Geometry::accept


function addTriangle [1/2]

inline void SFCGAL::TriangulatedSurface::addTriangle (
    const Triangle & triangle
) 

add a Triangle to the TriangulatedSurface


function addTriangle [2/2]

inline void SFCGAL::TriangulatedSurface::addTriangle (
    Triangle * triangle
) 

add a Triangle to the TriangulatedSurface


function addTriangles

void SFCGAL::TriangulatedSurface::addTriangles (
    const TriangulatedSurface & other
) 

add triangles from an other TriangulatedSurface


function begin [1/2]

inline iterator SFCGAL::TriangulatedSurface::begin () 

function begin [2/2]

inline const_iterator SFCGAL::TriangulatedSurface::begin () const

function clone

virtual TriangulatedSurface * SFCGAL::TriangulatedSurface::clone () const

Implements SFCGAL::Geometry::clone


function coordinateDimension

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

[OGC/SFA]returns the dimension of the coordinates

Precondition:

suppose no mix of 2D/3D coordinates

Implements SFCGAL::Geometry::coordinateDimension


function dimension

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

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

Warning:

empty geometries provide the dimension corresponding to the object

Implements SFCGAL::Surface::dimension


function end [1/2]

inline iterator SFCGAL::TriangulatedSurface::end () 

function end [2/2]

inline const_iterator SFCGAL::TriangulatedSurface::end () const

function geometryN [1/2]

[OGC/SFA]Returns the n-th geometry

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

Warning:

*this for Point, LineString, Polygon, Triangle

Implements SFCGAL::Geometry::geometryN


function geometryN [2/2]

[OGC/SFA]Returns the n-th geometry

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

Warning:

*this for Point, LineString, Polygon, Triangle

Implements SFCGAL::Geometry::geometryN


function geometryType

[OGC/SFA]returns the geometry type

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

Warning:

use CamelCase (LineString, not LINESTRING)

Implements SFCGAL::Geometry::geometryType


function geometryTypeId

Returns a code corresponding to the type.

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

Warning:

not standard

Implements SFCGAL::Geometry::geometryTypeId


function is3D

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

[OGC/SFA]test if geometry is 3d

Precondition:

suppose no mix of 2D/3D coordinates

Implements SFCGAL::Geometry::is3D


function isEmpty

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

[OGC/SFA]test if geometry is empty

Implements SFCGAL::Geometry::isEmpty


function isMeasured

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

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

Precondition:

suppose no mix of M/!M points

Implements SFCGAL::Geometry::isMeasured


function numGeometries

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

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

Warning:

1 for Point, LineString, Polygon, Triangle

Implements SFCGAL::Geometry::numGeometries


function numTriangles

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

[SFA/OGC]Returns the number of points

Deprecated

see numGeometries()


function operator=

TriangulatedSurface & SFCGAL::TriangulatedSurface::operator= (
    TriangulatedSurface other
) 

assign operator


function reserve

void SFCGAL::TriangulatedSurface::reserve (
    const size_t & n
) 

function serialize

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

Serializer


function toPolyhedron_3 [1/2]

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

function toPolyhedron_3 [2/2]

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

function triangleN [1/2]

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

[SFA/OGC]Returns the n-th point

Deprecated

see geometryN()


function triangleN [2/2]

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

[SFA/OGC]Returns the n-th point

Deprecated

see geometryN()


function ~TriangulatedSurface

SFCGAL::TriangulatedSurface::~TriangulatedSurface () 

destructor



The documentation for this class was generated from the following file /builds/sfcgal/SFCGAL/src/TriangulatedSurface.h