SFCGAL  1.4.1
Public Types | Public Member Functions | List of all members
SFCGAL::Solid Class Reference

A Solid modeled with an exteriorShell and interiorShells materialized by PolyhedralSurface. More...

#include <Solid.h>

Inheritance diagram for SFCGAL::Solid:
SFCGAL::Geometry

Public Types

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

Public Member Functions

 Solid ()
 Empty Solid constructor. More...
 
 Solid (const PolyhedralSurface &exteriorShell)
 Constructor with an exterior shell. More...
 
 Solid (PolyhedralSurface *exteriorShell)
 Constructor with an exterior shell (takes ownership) More...
 
 Solid (const std::vector< PolyhedralSurface > &shells)
 Constructor with a vector of shells (PolyhedralSurface) More...
 
 Solid (const Solid &other)
 Copy constructor. More...
 
Solidoperator= (Solid other)
 assign operator More...
 
 ~Solid ()
 destructor More...
 
virtual Solidclone () 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...
 
const PolyhedralSurfaceexteriorShell () const
 Returns the exterior shell. More...
 
PolyhedralSurfaceexteriorShell ()
 Returns the exterior shell. More...
 
size_t numInteriorShells () const
 Returns the number of interior shells. More...
 
const PolyhedralSurfaceinteriorShellN (size_t const &n) const
 Returns the n-th interior shell. More...
 
PolyhedralSurfaceinteriorShellN (size_t const &n)
 Returns the n-th interior shell. More...
 
void addInteriorShell (const PolyhedralSurface &shell)
 add a polygon to the PolyhedralSurface More...
 
void addInteriorShell (PolyhedralSurface *shell)
 add a polygon to the PolyhedralSurface More...
 
size_t numShells () const
 Returns the number of shells. More...
 
const PolyhedralSurfaceshellN (const size_t &n) const
 Returns the n-th shell, 0 is exteriorShell. More...
 
PolyhedralSurfaceshellN (const size_t &n)
 Returns the n-th shell, 0 is exteriorShell. More...
 
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<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer. More...
 
 Solid ()
 Empty Solid constructor. More...
 
 Solid (const PolyhedralSurface &exteriorShell)
 Constructor with an exterior shell. More...
 
 Solid (PolyhedralSurface *exteriorShell)
 Constructor with an exterior shell (takes ownership) More...
 
 Solid (const std::vector< PolyhedralSurface > &shells)
 Constructor with a vector of shells (PolyhedralSurface) More...
 
 Solid (const Solid &other)
 Copy constructor. More...
 
Solidoperator= (Solid other)
 assign operator More...
 
 ~Solid ()
 destructor More...
 
virtual Solidclone () 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...
 
const PolyhedralSurfaceexteriorShell () const
 Returns the exterior shell. More...
 
PolyhedralSurfaceexteriorShell ()
 Returns the exterior shell. More...
 
size_t numInteriorShells () const
 Returns the number of interior shells. More...
 
const PolyhedralSurfaceinteriorShellN (size_t const &n) const
 Returns the n-th interior shell. More...
 
PolyhedralSurfaceinteriorShellN (size_t const &n)
 Returns the n-th interior shell. More...
 
void addInteriorShell (const PolyhedralSurface &shell)
 add a polygon to the PolyhedralSurface More...
 
void addInteriorShell (PolyhedralSurface *shell)
 add a polygon to the PolyhedralSurface More...
 
size_t numShells () const
 Returns the number of shells. More...
 
const PolyhedralSurfaceshellN (const size_t &n) const
 Returns the n-th shell, 0 is exteriorShell. More...
 
PolyhedralSurfaceshellN (const size_t &n)
 Returns the n-th shell, 0 is exteriorShell. More...
 
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<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer. More...
 
- Public Member Functions inherited from SFCGAL::Geometry
 Geometry ()
 Default constructor. More...
 
 Geometry (const Geometry &)=default
 Copy constructor. More...
 
Geometryoperator= (const Geometry &other)=default
 Copy assignemnt operator. More...
 
virtual ~Geometry ()=default
 Destructor. More...
 
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::unique_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...
 
auto almostEqual (const Geometry &, const double tolerance) const -> bool
 Equality operator. More...
 
virtual size_t numGeometries () const
 [OGC/SFA]Gets the number of geometries in a collection of geometries More...
 
virtual const GeometrygeometryN (size_t const &n) const
 [OGC/SFA]Returns the n-th geometry More...
 
virtual GeometrygeometryN (size_t const &n)
 [OGC/SFA]Returns the n-th geometry 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...
 
 Geometry ()
 Default constructor. More...
 
 Geometry (const Geometry &)=default
 Copy constructor. More...
 
Geometryoperator= (const Geometry &other)=default
 Copy assignemnt operator. More...
 
virtual ~Geometry ()=default
 Destructor. More...
 
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::unique_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...
 
auto almostEqual (const Geometry &, const double tolerance) const -> bool
 Equality operator. More...
 
virtual size_t numGeometries () const
 [OGC/SFA]Gets the number of geometries in a collection of geometries More...
 
virtual const GeometrygeometryN (size_t const &n) const
 [OGC/SFA]Returns the n-th geometry More...
 
virtual GeometrygeometryN (size_t const &n)
 [OGC/SFA]Returns the n-th geometry 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 Attributes inherited from SFCGAL::Geometry
bool validityFlag_
 

Detailed Description

A Solid modeled with an exteriorShell and interiorShells materialized by PolyhedralSurface.

Note
A shell is supposed to be closed.
Warning
GM_Solid, from ISO 19107 is defined in CityGML, but not in SFA. Without Solid concept,
Note
Volume concept is missing.

Member Typedef Documentation

◆ const_iterator [1/2]

◆ const_iterator [2/2]

◆ iterator [1/2]

typedef boost::ptr_vector<PolyhedralSurface>::iterator SFCGAL::Solid::iterator

◆ iterator [2/2]

typedef boost::ptr_vector<PolyhedralSurface>::iterator SFCGAL::Solid::iterator

Constructor & Destructor Documentation

◆ Solid() [1/10]

SFCGAL::Solid::Solid ( )

Empty Solid constructor.

◆ Solid() [2/10]

SFCGAL::Solid::Solid ( const PolyhedralSurface exteriorShell)

Constructor with an exterior shell.

◆ Solid() [3/10]

SFCGAL::Solid::Solid ( PolyhedralSurface exteriorShell)

Constructor with an exterior shell (takes ownership)

◆ Solid() [4/10]

SFCGAL::Solid::Solid ( const std::vector< PolyhedralSurface > &  shells)

Constructor with a vector of shells (PolyhedralSurface)

◆ Solid() [5/10]

SFCGAL::Solid::Solid ( const Solid other)

Copy constructor.

◆ ~Solid() [1/2]

SFCGAL::Solid::~Solid ( )
default

destructor

◆ Solid() [6/10]

SFCGAL::Solid::Solid ( )

Empty Solid constructor.

◆ Solid() [7/10]

SFCGAL::Solid::Solid ( const PolyhedralSurface exteriorShell)

Constructor with an exterior shell.

◆ Solid() [8/10]

SFCGAL::Solid::Solid ( PolyhedralSurface exteriorShell)

Constructor with an exterior shell (takes ownership)

◆ Solid() [9/10]

SFCGAL::Solid::Solid ( const std::vector< PolyhedralSurface > &  shells)

Constructor with a vector of shells (PolyhedralSurface)

◆ Solid() [10/10]

SFCGAL::Solid::Solid ( const Solid other)

Copy constructor.

◆ ~Solid() [2/2]

SFCGAL::Solid::~Solid ( )

destructor

Member Function Documentation

◆ accept() [1/4]

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

[visitor]dispatch visitor

Implements SFCGAL::Geometry.

◆ accept() [2/4]

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

[visitor]dispatch visitor

Implements SFCGAL::Geometry.

◆ accept() [3/4]

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

[visitor]dispatch visitor

Implements SFCGAL::Geometry.

◆ accept() [4/4]

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

[visitor]dispatch visitor

Implements SFCGAL::Geometry.

◆ addInteriorShell() [1/4]

void SFCGAL::Solid::addInteriorShell ( const PolyhedralSurface shell)
inline

add a polygon to the PolyhedralSurface

◆ addInteriorShell() [2/4]

void SFCGAL::Solid::addInteriorShell ( const PolyhedralSurface shell)
inline

add a polygon to the PolyhedralSurface

◆ addInteriorShell() [3/4]

void SFCGAL::Solid::addInteriorShell ( PolyhedralSurface shell)
inline

add a polygon to the PolyhedralSurface

◆ addInteriorShell() [4/4]

void SFCGAL::Solid::addInteriorShell ( PolyhedralSurface shell)
inline

add a polygon to the PolyhedralSurface

◆ begin() [1/4]

iterator SFCGAL::Solid::begin ( )
inline

◆ begin() [2/4]

iterator SFCGAL::Solid::begin ( )
inline

◆ begin() [3/4]

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

◆ begin() [4/4]

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

◆ clone() [1/2]

auto SFCGAL::Solid::clone ( ) const
virtual

Get a deep copy of the geometry.

Implements SFCGAL::Geometry.

◆ clone() [2/2]

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

Get a deep copy of the geometry.

Implements SFCGAL::Geometry.

◆ coordinateDimension() [1/2]

auto SFCGAL::Solid::coordinateDimension ( ) const
virtual

[OGC/SFA]returns the dimension of the coordinates

Precondition
suppose no mix of 2D/3D coordinates

Implements SFCGAL::Geometry.

◆ coordinateDimension() [2/2]

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

[OGC/SFA]returns the dimension of the coordinates

Precondition
suppose no mix of 2D/3D coordinates

Implements SFCGAL::Geometry.

◆ dimension() [1/2]

auto SFCGAL::Solid::dimension ( ) const
virtual

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

Warning
empty geometries provide the dimension corresponding to the object

Implements SFCGAL::Geometry.

◆ dimension() [2/2]

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

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

Warning
empty geometries provide the dimension corresponding to the object

Implements SFCGAL::Geometry.

◆ end() [1/4]

iterator SFCGAL::Solid::end ( )
inline

◆ end() [2/4]

iterator SFCGAL::Solid::end ( )
inline

◆ end() [3/4]

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

◆ end() [4/4]

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

◆ exteriorShell() [1/4]

PolyhedralSurface& SFCGAL::Solid::exteriorShell ( )
inline

Returns the exterior shell.

◆ exteriorShell() [2/4]

PolyhedralSurface& SFCGAL::Solid::exteriorShell ( )
inline

Returns the exterior shell.

◆ exteriorShell() [3/4]

const PolyhedralSurface& SFCGAL::Solid::exteriorShell ( ) const
inline

Returns the exterior shell.

◆ exteriorShell() [4/4]

const PolyhedralSurface& SFCGAL::Solid::exteriorShell ( ) const
inline

Returns the exterior shell.

◆ geometryType() [1/2]

auto SFCGAL::Solid::geometryType ( ) const
virtual

[OGC/SFA]returns the geometry type

Warning
use CamelCase (LineString, not LINESTRING)

Implements SFCGAL::Geometry.

◆ geometryType() [2/2]

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

[OGC/SFA]returns the geometry type

Warning
use CamelCase (LineString, not LINESTRING)

Implements SFCGAL::Geometry.

◆ geometryTypeId() [1/2]

auto SFCGAL::Solid::geometryTypeId ( ) const
virtual

Returns a code corresponding to the type.

Warning
not standard

Implements SFCGAL::Geometry.

◆ geometryTypeId() [2/2]

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

Returns a code corresponding to the type.

Warning
not standard

Implements SFCGAL::Geometry.

◆ interiorShellN() [1/4]

PolyhedralSurface& SFCGAL::Solid::interiorShellN ( size_t const &  n)
inline

Returns the n-th interior shell.

◆ interiorShellN() [2/4]

PolyhedralSurface& SFCGAL::Solid::interiorShellN ( size_t const &  n)
inline

Returns the n-th interior shell.

◆ interiorShellN() [3/4]

const PolyhedralSurface& SFCGAL::Solid::interiorShellN ( size_t const &  n) const
inline

Returns the n-th interior shell.

◆ interiorShellN() [4/4]

const PolyhedralSurface& SFCGAL::Solid::interiorShellN ( size_t const &  n) const
inline

Returns the n-th interior shell.

◆ is3D() [1/2]

auto SFCGAL::Solid::is3D ( ) const
virtual

[OGC/SFA]test if geometry is 3d

Precondition
suppose no mix of 2D/3D coordinates

Implements SFCGAL::Geometry.

◆ is3D() [2/2]

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

[OGC/SFA]test if geometry is 3d

Precondition
suppose no mix of 2D/3D coordinates

Implements SFCGAL::Geometry.

◆ isEmpty() [1/2]

auto SFCGAL::Solid::isEmpty ( ) const
virtual

[OGC/SFA]test if geometry is empty

Implements SFCGAL::Geometry.

◆ isEmpty() [2/2]

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

[OGC/SFA]test if geometry is empty

Implements SFCGAL::Geometry.

◆ isMeasured() [1/2]

auto SFCGAL::Solid::isMeasured ( ) const
virtual

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

Precondition
suppose no mix of M/!M points

Implements SFCGAL::Geometry.

◆ isMeasured() [2/2]

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

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

Precondition
suppose no mix of M/!M points

Implements SFCGAL::Geometry.

◆ numInteriorShells() [1/2]

size_t SFCGAL::Solid::numInteriorShells ( ) const
inline

Returns the number of interior shells.

◆ numInteriorShells() [2/2]

size_t SFCGAL::Solid::numInteriorShells ( ) const
inline

Returns the number of interior shells.

◆ numShells() [1/2]

size_t SFCGAL::Solid::numShells ( ) const
inline

Returns the number of shells.

◆ numShells() [2/2]

size_t SFCGAL::Solid::numShells ( ) const
inline

Returns the number of shells.

◆ operator=() [1/2]

auto SFCGAL::Solid::operator= ( Solid  other)

assign operator

◆ operator=() [2/2]

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

assign operator

◆ serialize() [1/2]

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

Serializer.

◆ serialize() [2/2]

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

Serializer.

◆ shellN() [1/4]

PolyhedralSurface& SFCGAL::Solid::shellN ( const size_t &  n)
inline

Returns the n-th shell, 0 is exteriorShell.

Warning
not standard, avoid conditionnal to access rings

◆ shellN() [2/4]

PolyhedralSurface& SFCGAL::Solid::shellN ( const size_t &  n)
inline

Returns the n-th shell, 0 is exteriorShell.

Warning
not standard, avoid conditionnal to access rings

◆ shellN() [3/4]

const PolyhedralSurface& SFCGAL::Solid::shellN ( const size_t &  n) const
inline

Returns the n-th shell, 0 is exteriorShell.

Warning
not standard, avoid conditionnal to access rings

◆ shellN() [4/4]

const PolyhedralSurface& SFCGAL::Solid::shellN ( const size_t &  n) const
inline

Returns the n-th shell, 0 is exteriorShell.

Warning
not standard, avoid conditionnal to access rings