SFCGAL  1.3.0
Classes | Functions
Implementation details

Classes

class  SFCGAL::algorithm::BoundaryVisitor
 Compute the boundary for a Geometry. More...
 
class  SFCGAL::algorithm::SurfaceGraph
 Represents a polyhedral surface as a graph where faces are nodes and egde are graph edges. More...
 
class  SFCGAL::algorithm::ConsistentOrientationBuilder
 Make orientation consistent in a triangle set. More...
 

Functions

double SFCGAL::algorithm::area (const Geometry &g, NoValidityCheck)
 Compute the 2D area for a Geometry. More...
 
Kernel::FT SFCGAL::algorithm::signedArea (const Triangle &g)
 Compute the 2D signed area for a Triangle. More...
 
Kernel::FT SFCGAL::algorithm::signedArea (const LineString &g)
 Compute the 2D signed area for a closed LineString. More...
 
double SFCGAL::algorithm::area (const Triangle &g)
 Returns Compute the 2D area for a Triangle. More...
 
double SFCGAL::algorithm::area (const Polygon &g)
 Returns Compute the 2D area for a Polygon. More...
 
double SFCGAL::algorithm::area (const GeometryCollection &g)
 Returns the 2D area for a GeometryCollection. More...
 
double SFCGAL::algorithm::area (const TriangulatedSurface &g)
 Returns the 2D area for a TriangulatedSurface. More...
 
double SFCGAL::algorithm::area (const PolyhedralSurface &g)
 Returns the 2D area for a TriangulatedSurface. More...
 
double SFCGAL::algorithm::area3D (const Geometry &g, NoValidityCheck)
 

– area3D

More...
 
double SFCGAL::algorithm::area3D (const Polygon &g)
 Returns 3D area for a Polygon. More...
 
double SFCGAL::algorithm::area3D (const GeometryCollection &g)
 Returns the 3D area for a MultiPolygon. More...
 
double SFCGAL::algorithm::area3D (const PolyhedralSurface &g)
 Returns the 3D area for a PolyhedralSurface. More...
 
double SFCGAL::algorithm::area3D (const Triangle &g)
 Returns the 3D area for a Triangle. More...
 
double SFCGAL::algorithm::area3D (const TriangulatedSurface &g)
 Returns the 3D area for a TriangulatedSurface. More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::collect (const Geometry &ga, const Geometry &gb)
 Returns an aggregate of ga and gb. More...
 
template<typename GeometryIterator >
std::auto_ptr< Geometry > SFCGAL::algorithm::collect (GeometryIterator begin, GeometryIterator end)
 Returns an aggregate of a list of geometries. More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::collectionHomogenize (std::auto_ptr< Geometry > coll)
 Given a geometry collection, returns the "simplest" representation of the contents. More...
 
bool SFCGAL::algorithm::isConnected (const SurfaceGraph &graph)
 test if a surface is connected, the graph should be build beforehand More...
 
bool SFCGAL::algorithm::isClosed (const SurfaceGraph &graph)
 test if a surface is closed, the graph should be build beforehand More...
 
bool SFCGAL::algorithm::covers (const Geometry &ga, const Geometry &gb)
 Cover test on 2D geometries. More...
 
template<int Dim>
bool SFCGAL::algorithm::covers (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b)
 @ More...
 
template<int Dim>
bool SFCGAL::algorithm::covers (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b)
 @ More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::difference (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Diffrence on 2D geometries. More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::difference3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Difference on 3D geometries. More...
 
template<int Dim>
void SFCGAL::algorithm::difference (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b, detail::GeometrySet< Dim > &)
 
double SFCGAL::algorithm::distance (const Geometry &gA, const Geometry &gB, NoValidityCheck)
 Compute the distance between two Geometries. More...
 
double SFCGAL::algorithm::distancePointGeometry (const Point &gA, const Geometry &gB)
 dispatch distance from Point to Geometry More...
 
double SFCGAL::algorithm::distancePointPoint (const Point &gA, const Point &gB)
 distance between two Points More...
 
double SFCGAL::algorithm::distancePointLineString (const Point &gA, const LineString &gB)
 distance between a Point and a LineString More...
 
double SFCGAL::algorithm::distancePointPolygon (const Point &gA, const Polygon &gB)
 distance between a Point and a Polygon More...
 
double SFCGAL::algorithm::distancePointTriangle (const Point &gA, const Triangle &gB)
 distance between a Point and a Triangle More...
 
double SFCGAL::algorithm::distanceLineStringGeometry (const LineString &gA, const Geometry &gB)
 dispatch distance from LineString to Geometry More...
 
double SFCGAL::algorithm::distanceLineStringLineString (const LineString &gA, const LineString &gB)
 distance between two LineStrings More...
 
double SFCGAL::algorithm::distanceLineStringPolygon (const LineString &gA, const Polygon &gB)
 distance between a LineString and a Polygon More...
 
double SFCGAL::algorithm::distanceLineStringTriangle (const LineString &gA, const Triangle &gB)
 distance between a LineString and a Triangle More...
 
double SFCGAL::algorithm::distancePolygonGeometry (const Polygon &gA, const Geometry &gB)
 dispatch distance from Polygon to Geometry More...
 
double SFCGAL::algorithm::distancePolygonPolygon (const Polygon &gA, const Polygon &gB)
 distance between two Polygons More...
 
double SFCGAL::algorithm::distancePolygonTriangle (const Polygon &gA, const Triangle &gB)
 distance between a Polygon and a Triangle More...
 
double SFCGAL::algorithm::distanceTriangleGeometry (const Triangle &gA, const Geometry &gB)
 dispatch distance from a Triangle to a Geometry More...
 
double SFCGAL::algorithm::distanceGeometryCollectionToGeometry (const Geometry &gA, const Geometry &gB)
 dispatch distance from a collection of geometry (gA) to a Geometry (gB) More...
 
double SFCGAL::algorithm::distancePointSegment (const Point &p, const Point &a, const Point &b)
 
double SFCGAL::algorithm::distanceSegmentSegment (const Point &a, const Point &b, const Point &c, const Point &d)
 
double SFCGAL::algorithm::distance3D (const Geometry &gA, const Geometry &gB, NoValidityCheck)
 Compute distance between two 3D Geometries. More...
 
double SFCGAL::algorithm::distancePointGeometry3D (const Point &gA, const Geometry &gB)
 dispatch distance from Point to Geometry More...
 
double SFCGAL::algorithm::distancePointPoint3D (const Point &gA, const Point &gB)
 distance between two Points More...
 
double SFCGAL::algorithm::distancePointLineString3D (const Point &gA, const LineString &gB)
 distance between a Point and a LineString More...
 
double SFCGAL::algorithm::distancePointTriangle3D (const Point &gA, const Triangle &gB)
 distance between a Point and a Triangle More...
 
double SFCGAL::algorithm::distancePointPolygon3D (const Point &gA, const Polygon &gB)
 distance between a Point and a Triangle More...
 
double SFCGAL::algorithm::distancePointSolid3D (const Point &gA, const Solid &gB)
 distance between a Point and a Solid More...
 
double SFCGAL::algorithm::distanceLineStringGeometry3D (const LineString &gA, const Geometry &gB)
 dispatch distance between a LineString and a Geometry More...
 
double SFCGAL::algorithm::distanceLineStringLineString3D (const LineString &gA, const LineString &gB)
 distance between two LineStrings More...
 
double SFCGAL::algorithm::distanceLineStringTriangle3D (const LineString &gA, const Triangle &gB)
 distance between a LineString and a Triangle More...
 
double SFCGAL::algorithm::distanceLineStringPolygon3D (const LineString &gA, const Polygon &gB)
 distance between a LineString and a Polygon More...
 
double SFCGAL::algorithm::distanceLineStringSolid3D (const LineString &gA, const Solid &gB)
 distance between a LineString and a Solid More...
 
double SFCGAL::algorithm::distanceTriangleGeometry3D (const Triangle &gA, const Geometry &gB)
 dispatch distance between a Triangle and a Geometry More...
 
double SFCGAL::algorithm::distanceTriangleSolid3D (const Triangle &gA, const Solid &gB)
 distance between a Triangle and a Solid More...
 
double SFCGAL::algorithm::distancePolygonGeometry3D (const Polygon &gA, const Geometry &gB)
 dispatch distance between a Polygon and a Geometry More...
 
double SFCGAL::algorithm::distanceSolidGeometry3D (const Solid &gA, const Geometry &gB)
 dispatch distance between a Solid and a Geometry More...
 
double SFCGAL::algorithm::distanceSolidSolid3D (const Solid &gA, const Solid &gB)
 distance between two Solids More...
 
double SFCGAL::algorithm::distanceGeometryCollectionToGeometry3D (const Geometry &gA, const Geometry &gB)
 dispatch distance from a collection of geometry (gA) to a Geometry (gB) More...
 
double SFCGAL::algorithm::distancePointSegment3D (const Point &p, const Point &a, const Point &b)
 
double SFCGAL::algorithm::distancePointTriangle3D (const Point &p, const Point &a, const Point &b, const Point &c)
 
double SFCGAL::algorithm::distanceSegmentSegment3D (const Point &a, const Point &b, const Point &c, const Point &d)
 
double SFCGAL::algorithm::distanceSegmentTriangle3D (const Point &sA, const Point &sB, const Point &tA, const Point &tB, const Point &tC)
 
double SFCGAL::algorithm::distanceTriangleTriangle3D (const Triangle &gA, const Triangle &gB)
 distance between two Triangles More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::extrude (const Geometry &g, Kernel::FT dx, Kernel::FT dy, Kernel::FT dz, NoValidityCheck)
 extrude a Geometry with a direction More...
 
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::extrude (const Geometry &g, const double &dx, const double &dy, const double &dz)
 extrude a Geometry with a direction More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::extrude (const Geometry &g, const Kernel::Vector_3 &v)
 extrude a Geometry by a given vector More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::intersection (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection on 2D geometries. More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::intersection3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection on 3D geometries. More...
 
template<int Dim>
void SFCGAL::algorithm::intersection (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b, detail::GeometrySet< Dim > &)
 
template<int Dim>
void SFCGAL::algorithm::intersection (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b, detail::GeometrySet< Dim > &)
 
bool SFCGAL::algorithm::intersects (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection test on 2D geometries. More...
 
bool SFCGAL::algorithm::intersects3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection test on 3D geometries. More...
 
template<int Dim>
bool SFCGAL::algorithm::intersects (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b)
 Intersection test on GeometrySet. More...
 
template<int Dim>
bool SFCGAL::algorithm::intersects (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b)
 Intersection test on a PrimitiveHandle. More...
 
bool SFCGAL::algorithm::selfIntersects (const LineString &l)
 Self intersection test for 2D LineString (false if only endpoint touch) More...
 
bool SFCGAL::algorithm::selfIntersects3D (const LineString &l)
 Self intersection test for 3D LineString (false if only endpoints touch) More...
 
bool SFCGAL::algorithm::selfIntersects (const PolyhedralSurface &s, const SurfaceGraph &g)
 Self intersection test for 2D PolyhedralSurface (false if only point touch) More...
 
bool SFCGAL::algorithm::selfIntersects3D (const PolyhedralSurface &s, const SurfaceGraph &g)
 Self intersection test for 3D PolyhedralSurface (false if only point touch) More...
 
bool SFCGAL::algorithm::selfIntersects (const TriangulatedSurface &s, const SurfaceGraph &g)
 Self intersection test for 2D TriangulatedSurface (false if only point touch) More...
 
bool SFCGAL::algorithm::selfIntersects3D (const TriangulatedSurface &s, const SurfaceGraph &g)
 Self intersection test for 3D TriangulatedSurface (false if only point touch) More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::minkowskiSum (const Geometry &gA, const Polygon &gB, NoValidityCheck)
 2D minkowski sum (p+q) More...
 
std::auto_ptr< MultiPolygon > SFCGAL::algorithm::offset (const Geometry &g, const double &r, NoValidityCheck)
 [experimental]compute polygon offset More...
 
template<typename Kernel >
bool SFCGAL::algorithm::isPlane3D (const Geometry &geom, const double &toleranceAbs)
 Test if all points of a geometry lie in the same plane. More...
 
std::auto_ptr< MultiLineString > SFCGAL::algorithm::straightSkeleton (const Polygon &g, bool autoOrientation=true, bool innerOnly=false, bool outputDistanceInM=false)
 build a 2D straight skeleton for a Polygon More...
 
std::auto_ptr< MultiLineString > SFCGAL::algorithm::straightSkeleton (const MultiPolygon &g, bool autoOrientation=true, bool innerOnly=false, bool outputDistanceInM=false)
 build a 2D straight skeleton for a Polygon More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::tesselate (const Geometry &, NoValidityCheck)
 Tesselate a geometry: this will triangulate surfaces (including polyhedral and solid's surfaces) and keep untouched points, lines, etc. More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::union_ (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Union on 2D geometries. More...
 
std::auto_ptr< Geometry > SFCGAL::algorithm::union3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Union on 3D geometries. More...
 
template<int Dim>
void SFCGAL::algorithm::union_ (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b, detail::GeometrySet< Dim > &)
 
template<int Dim>
void SFCGAL::algorithm::union_ (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b, detail::GeometrySet< Dim > &)
 
const Kernel::FT SFCGAL::algorithm::volume (const Solid &g, NoValidityCheck)
 Computes the volume of a Solid. More...
 
SFCGAL_API sfcgal_geometry_tsfcgal_geometry_make_solid (const sfcgal_geometry_t *geom)
 Convert a PolyhedralSurface to a Solid. More...
 
bool SFCGAL::detail::algorithm::coversPoints (const Geometry &ga, const Geometry &gb)
 Pseudo cover test on 2D geometries. More...
 
bool SFCGAL::detail::algorithm::coversPoints3D (const Geometry &ga, const Geometry &gb)
 Pseudo cover test on 3D geometries. More...
 
virtual void SFCGAL::Geometry::accept (GeometryVisitor &visitor)=0
 [visitor]dispatch visitor

  More...
 
virtual void SFCGAL::Geometry::accept (ConstGeometryVisitor &visitor) const =0
 [visitor]dispatch visitor

  More...
 
template<class Archive >
void SFCGAL::Geometry::serialize (Archive &, const unsigned int)
 Serializer

. More...

 
void SFCGAL::triangulate::triangulatePolygon3D (const Geometry &g, TriangulatedSurface &triangulatedSurface)
 Triangulate 3D polygons in a Geometry. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const Polygon &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a 3D Polygon. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const Triangle &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a 3D Triangle (copy triangle) More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const TriangulatedSurface &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a 3D TriangulatedSurface (copy triangles) More...
 
SFCGAL_API void SFCGAL::triangulate::opentriangulatePolygon3D (const GeometryCollection &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a 3D MultiPolygon. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const PolyhedralSurface &polyhedralSurface, TriangulatedSurface &triangulatedSurface)
 Triangulate 3D polygons in a PolyhedralSurface. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const Solid &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a Solid. More...
 

Detailed Description

Function Documentation

virtual void SFCGAL::Geometry::accept ( GeometryVisitor visitor)
pure virtual
virtual void SFCGAL::Geometry::accept ( ConstGeometryVisitor visitor) const
pure virtual
SFCGAL_API double SFCGAL::algorithm::area ( const Geometry g,
NoValidityCheck   
)

Compute the 2D area for a Geometry.

Warning
Z component is ignored, there is no 2D projection for 3D geometries
Precondition
g is a valid geometry
Warning
No actual validity check is done
SFCGAL_API double SFCGAL::algorithm::area ( const Triangle g)

Returns Compute the 2D area for a Triangle.

SFCGAL_API double SFCGAL::algorithm::area ( const Polygon g)

Returns Compute the 2D area for a Polygon.

SFCGAL_API double SFCGAL::algorithm::area ( const GeometryCollection g)

Returns the 2D area for a GeometryCollection.

SFCGAL_API double SFCGAL::algorithm::area ( const TriangulatedSurface g)

Returns the 2D area for a TriangulatedSurface.

SFCGAL_API double SFCGAL::algorithm::area ( const PolyhedralSurface g)

Returns the 2D area for a TriangulatedSurface.

SFCGAL_API double SFCGAL::algorithm::area3D ( const Geometry g,
NoValidityCheck   
)


– area3D

Returns 3D area for a Geometry.

Warning
Solid area is set to 0 (might be defined as the area of the surface)
Precondition
g is a valid geometry
Warning
No actual validity check is done
SFCGAL_API double SFCGAL::algorithm::area3D ( const Polygon g)

Returns 3D area for a Polygon.

SFCGAL_API double SFCGAL::algorithm::area3D ( const Triangle g)

Returns the 3D area for a Triangle.

SFCGAL_API double SFCGAL::algorithm::area3D ( const GeometryCollection g)

Returns the 3D area for a MultiPolygon.

SFCGAL_API double SFCGAL::algorithm::area3D ( const PolyhedralSurface g)

Returns the 3D area for a PolyhedralSurface.

SFCGAL_API double SFCGAL::algorithm::area3D ( const TriangulatedSurface g)

Returns the 3D area for a TriangulatedSurface.

SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::collect ( const Geometry ga,
const Geometry gb 
)

Returns an aggregate of ga and gb.

template<typename GeometryIterator >
std::auto_ptr<Geometry> SFCGAL::algorithm::collect ( GeometryIterator  begin,
GeometryIterator  end 
)

Returns an aggregate of a list of geometries.

SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::collectionHomogenize ( std::auto_ptr< Geometry coll)

Given a geometry collection, returns the "simplest" representation of the contents.

Singletons will be returned as singletons. Collections that are homogeneous will be returned as the appropriate multi-type.

Warning
Ownership is taken from the parameter
template<int Dim>
bool SFCGAL::algorithm::covers ( const detail::PrimitiveHandle< Dim > &  a,
const detail::PrimitiveHandle< Dim > &  b 
)

@

template<int Dim>
bool SFCGAL::algorithm::covers ( const GeometrySet< Dim > &  a,
const GeometrySet< Dim > &  b 
)

@

SFCGAL_API bool SFCGAL::algorithm::covers ( const Geometry ga,
const Geometry gb 
)

Cover test on 2D geometries.

Checks if gA covers gB. Force projection to z=0 if needed @

SFCGAL_API bool SFCGAL::detail::algorithm::coversPoints ( const Geometry ga,
const Geometry gb 
)

Pseudo cover test on 2D geometries.

Collect points of gb and tests if no points of gb is outside ga @

SFCGAL_API bool SFCGAL::detail::algorithm::coversPoints3D ( const Geometry ga,
const Geometry gb 
)

Pseudo cover test on 3D geometries.

Collect points of gb and tests if no points of gb is outside ga @

template<int Dim>
void SFCGAL::algorithm::difference ( const GeometrySet< Dim > &  a,
const GeometrySet< Dim > &  b,
GeometrySet< Dim > &  output 
)
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::difference ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Diffrence on 2D geometries.

No validity check variant

Precondition
ga and gb are valid geometries
Warning
No actual validity check is done.
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::difference3D ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Difference on 3D geometries.

Assume z = 0 if needed

Precondition
ga and gb are valid geometries
Warning
@ No actual validity check is done
SFCGAL_API double SFCGAL::algorithm::distance ( const Geometry gA,
const Geometry gB,
NoValidityCheck   
)

Compute the distance between two Geometries.

Precondition
gA is a valid geometry
gB is a valid geometry
Warning
No actual validity check is done
SFCGAL_API double SFCGAL::algorithm::distance3D ( const Geometry gA,
const Geometry gB,
NoValidityCheck   
)

Compute distance between two 3D Geometries.

Precondition
gA is a valid geometry
gB is a valid geometry
Warning
No actual validity check is done
SFCGAL_API double SFCGAL::algorithm::distanceGeometryCollectionToGeometry ( const Geometry gA,
const Geometry gB 
)

dispatch distance from a collection of geometry (gA) to a Geometry (gB)

SFCGAL_API double SFCGAL::algorithm::distanceGeometryCollectionToGeometry3D ( const Geometry gA,
const Geometry gB 
)

dispatch distance from a collection of geometry (gA) to a Geometry (gB)

SFCGAL_API double SFCGAL::algorithm::distanceLineStringGeometry ( const LineString gA,
const Geometry gB 
)

dispatch distance from LineString to Geometry

SFCGAL_API double SFCGAL::algorithm::distanceLineStringGeometry3D ( const LineString gA,
const Geometry gB 
)

dispatch distance between a LineString and a Geometry

SFCGAL_API double SFCGAL::algorithm::distanceLineStringLineString ( const LineString gA,
const LineString gB 
)

distance between two LineStrings

SFCGAL_API double SFCGAL::algorithm::distanceLineStringLineString3D ( const LineString gA,
const LineString gB 
)

distance between two LineStrings

SFCGAL_API double SFCGAL::algorithm::distanceLineStringPolygon ( const LineString gA,
const Polygon gB 
)

distance between a LineString and a Polygon

SFCGAL_API double SFCGAL::algorithm::distanceLineStringPolygon3D ( const LineString gA,
const Polygon gB 
)

distance between a LineString and a Polygon

Todo:
same method than distancePointPolygon3D (unify if triangulate is available)
SFCGAL_API double SFCGAL::algorithm::distanceLineStringSolid3D ( const LineString gA,
const Solid gB 
)

distance between a LineString and a Solid

SFCGAL_API double SFCGAL::algorithm::distanceLineStringTriangle ( const LineString gA,
const Triangle gB 
)

distance between a LineString and a Triangle

SFCGAL_API double SFCGAL::algorithm::distanceLineStringTriangle3D ( const LineString gA,
const Triangle gB 
)

distance between a LineString and a Triangle

SFCGAL_API double SFCGAL::algorithm::distancePointGeometry ( const Point gA,
const Geometry gB 
)

dispatch distance from Point to Geometry

SFCGAL_API double SFCGAL::algorithm::distancePointGeometry3D ( const Point gA,
const Geometry gB 
)

dispatch distance from Point to Geometry

SFCGAL_API double SFCGAL::algorithm::distancePointLineString ( const Point gA,
const LineString gB 
)

distance between a Point and a LineString

SFCGAL_API double SFCGAL::algorithm::distancePointLineString3D ( const Point gA,
const LineString gB 
)

distance between a Point and a LineString

SFCGAL_API double SFCGAL::algorithm::distancePointPoint ( const Point gA,
const Point gB 
)

distance between two Points

SFCGAL_API double SFCGAL::algorithm::distancePointPoint3D ( const Point gA,
const Point gB 
)

distance between two Points

SFCGAL_API double SFCGAL::algorithm::distancePointPolygon ( const Point gA,
const Polygon gB 
)

distance between a Point and a Polygon

SFCGAL_API double SFCGAL::algorithm::distancePointPolygon3D ( const Point gA,
const Polygon gB 
)

distance between a Point and a Triangle

SFCGAL_API double SFCGAL::algorithm::distancePointSegment ( const Point p,
const Point a,
const Point b 
)
SFCGAL_API double SFCGAL::algorithm::distancePointSegment3D ( const Point p,
const Point a,
const Point b 
)
SFCGAL_API double SFCGAL::algorithm::distancePointSolid3D ( const Point gA,
const Solid gB 
)

distance between a Point and a Solid

SFCGAL_API double SFCGAL::algorithm::distancePointTriangle ( const Point gA,
const Triangle gB 
)

distance between a Point and a Triangle

SFCGAL_API double SFCGAL::algorithm::distancePointTriangle3D ( const Point gA,
const Triangle gB 
)

distance between a Point and a Triangle

SFCGAL_API double SFCGAL::algorithm::distancePointTriangle3D ( const Point p_,
const Point a_,
const Point b_,
const Point c_ 
)
SFCGAL_API double SFCGAL::algorithm::distancePolygonGeometry ( const Polygon gA,
const Geometry gB 
)

dispatch distance from Polygon to Geometry

SFCGAL_API double SFCGAL::algorithm::distancePolygonGeometry3D ( const Polygon gA,
const Geometry gB 
)

dispatch distance between a Polygon and a Geometry

SFCGAL_API double SFCGAL::algorithm::distancePolygonPolygon ( const Polygon gA,
const Polygon gB 
)

distance between two Polygons

SFCGAL_API double SFCGAL::algorithm::distancePolygonTriangle ( const Polygon gA,
const Triangle gB 
)

distance between a Polygon and a Triangle

SFCGAL_API double SFCGAL::algorithm::distanceSegmentSegment ( const Point a,
const Point b,
const Point c,
const Point d 
)
SFCGAL_API double SFCGAL::algorithm::distanceSegmentSegment3D ( const Point a,
const Point b,
const Point c,
const Point d 
)
SFCGAL_API double SFCGAL::algorithm::distanceSegmentTriangle3D ( const Point sA_,
const Point sB_,
const Point tA_,
const Point tB_,
const Point tC_ 
)
SFCGAL_API double SFCGAL::algorithm::distanceSolidGeometry3D ( const Solid gA,
const Geometry gB 
)

dispatch distance between a Solid and a Geometry

SFCGAL_API double SFCGAL::algorithm::distanceSolidSolid3D ( const Solid gA,
const Solid gB 
)

distance between two Solids

SFCGAL_API double SFCGAL::algorithm::distanceTriangleGeometry ( const Triangle gA,
const Geometry gB 
)

dispatch distance from a Triangle to a Geometry

SFCGAL_API double SFCGAL::algorithm::distanceTriangleGeometry3D ( const Triangle gA,
const Geometry gB 
)

dispatch distance between a Triangle and a Geometry

SFCGAL_API double SFCGAL::algorithm::distanceTriangleSolid3D ( const Triangle gA,
const Solid gB 
)

distance between a Triangle and a Solid

SFCGAL_API double SFCGAL::algorithm::distanceTriangleTriangle3D ( const Triangle gA,
const Triangle gB 
)

distance between two Triangles

SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::extrude ( const Geometry g,
const Kernel::Vector_3 &  v 
)

extrude a Geometry by a given vector

Todo:
Improve 3D surface extrude (Extrude only faces whose dot( v, normal ) > 0 and use Polyhedron union to get output geometries with a clean topology)
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::extrude ( const Geometry g,
Kernel::FT  dx,
Kernel::FT  dy,
Kernel::FT  dz,
NoValidityCheck   
)

extrude a Geometry with a direction

Precondition
g is a valid geometry
Warning
No actual validity check is done.
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::extrude ( const Geometry g,
const double &  dx,
const double &  dy,
const double &  dz 
)

extrude a Geometry with a direction

Precondition
g is a valid geometry
dx, dy and dz are finite values
Warning
No actual validity check is done.
template<int Dim>
void SFCGAL::algorithm::intersection ( const PrimitiveHandle< Dim > &  pa,
const PrimitiveHandle< Dim > &  pb,
GeometrySet< Dim > &  output 
)
template<int Dim>
void SFCGAL::algorithm::intersection ( const GeometrySet< Dim > &  a,
const GeometrySet< Dim > &  b,
GeometrySet< Dim > &  output 
)
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::intersection ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Intersection on 2D geometries.

No validity check variant

Precondition
ga and gb are valid geometries
Warning
No actual validity check is done.
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::intersection3D ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Intersection on 3D geometries.

Assume z = 0 if needed

Precondition
ga and gb are valid geometries
Warning
@ No actual validity check is done
template<int Dim>
bool SFCGAL::algorithm::intersects ( const PrimitiveHandle< Dim > &  pa,
const PrimitiveHandle< Dim > &  pb 
)

Intersection test on a PrimitiveHandle.

template<int Dim>
bool SFCGAL::algorithm::intersects ( const GeometrySet< Dim > &  a,
const GeometrySet< Dim > &  b 
)

Intersection test on GeometrySet.

SFCGAL_API bool SFCGAL::algorithm::intersects ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Intersection test on 2D geometries.

Force projection to z=0 if needed

Precondition
ga and gb are valid geometries
Warning
the validity is assumed, no actual check is done
SFCGAL_API bool SFCGAL::algorithm::intersects3D ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Intersection test on 3D geometries.

Assume z = 0 if needed

Precondition
ga and gb are valid geometries
Warning
the validity is assumed, no actual check is done
SFCGAL_API bool SFCGAL::algorithm::isClosed ( const SurfaceGraph graph)

test if a surface is closed, the graph should be build beforehand

Note
the surface may not be connected, eg. two spheres will yield a true result
SFCGAL_API bool SFCGAL::algorithm::isConnected ( const SurfaceGraph graph)

test if a surface is connected, the graph should be build beforehand

template<typename Kernel >
bool SFCGAL::algorithm::isPlane3D ( const Geometry geom,
const double &  toleranceAbs 
)

Test if all points of a geometry lie in the same plane.

SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::minkowskiSum ( const Geometry gA,
const Polygon gB,
NoValidityCheck   
)

2D minkowski sum (p+q)

Warning
If gA is a polygon, its orientation is taken into account. A "reversed" polygon (with a clockwise-oriented exterior ring) will involve a minkowski difference rather than a sum.
Todo:
missing cases (union)
Precondition
gA and gB are valid geometries
Warning
@ No actual validity check is done.
SFCGAL_API std::auto_ptr< MultiPolygon > SFCGAL::algorithm::offset ( const Geometry g,
const double &  r,
NoValidityCheck   
)

[experimental]compute polygon offset

Warning
test in order to compare with minkowski sum
Precondition
g is a valid Geometry
Warning
No actual validity check is done.
SFCGAL_API void SFCGAL::triangulate::opentriangulatePolygon3D ( const GeometryCollection g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a 3D MultiPolygon.

Todo:
unittest
bool SFCGAL::algorithm::selfIntersects ( const LineString l)

Self intersection test for 2D LineString (false if only endpoint touch)

bool SFCGAL::algorithm::selfIntersects ( const PolyhedralSurface s,
const SurfaceGraph g 
)

Self intersection test for 2D PolyhedralSurface (false if only point touch)

bool SFCGAL::algorithm::selfIntersects ( const TriangulatedSurface tin,
const SurfaceGraph g 
)

Self intersection test for 2D TriangulatedSurface (false if only point touch)

bool SFCGAL::algorithm::selfIntersects3D ( const LineString l)

Self intersection test for 3D LineString (false if only endpoints touch)

bool SFCGAL::algorithm::selfIntersects3D ( const PolyhedralSurface s,
const SurfaceGraph g 
)

Self intersection test for 3D PolyhedralSurface (false if only point touch)

bool SFCGAL::algorithm::selfIntersects3D ( const TriangulatedSurface tin,
const SurfaceGraph g 
)

Self intersection test for 3D TriangulatedSurface (false if only point touch)

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

Serializer

.

SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_make_solid ( const sfcgal_geometry_t geom)

Convert a PolyhedralSurface to a Solid.

Precondition
isValid(geom) == true
Postcondition
isValid(return) == true
SFCGAL_API Kernel::FT SFCGAL::algorithm::signedArea ( const Triangle g)

Compute the 2D signed area for a Triangle.

SFCGAL_API Kernel::FT SFCGAL::algorithm::signedArea ( const LineString g)

Compute the 2D signed area for a closed LineString.

SFCGAL_API std::auto_ptr< MultiLineString > SFCGAL::algorithm::straightSkeleton ( const Polygon g,
bool  ,
bool  innerOnly,
bool  outputDistanceInM 
)

build a 2D straight skeleton for a Polygon

SFCGAL_API std::auto_ptr< MultiLineString > SFCGAL::algorithm::straightSkeleton ( const MultiPolygon g,
bool  ,
bool  innerOnly,
bool  outputDistanceInM 
)

build a 2D straight skeleton for a Polygon

SFCGAL_API std::auto_ptr< SFCGAL::Geometry > SFCGAL::algorithm::tesselate ( const Geometry ,
NoValidityCheck   
)

Tesselate a geometry: this will triangulate surfaces (including polyhedral and solid's surfaces) and keep untouched points, lines, etc.

Precondition
g is a valid geometry
Warning
No actual validity check is done.
SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const Geometry g,
TriangulatedSurface triangulatedSurface 
)

Triangulate 3D polygons in a Geometry.

Parameters
ginput geometry
triangulatedSurfaceresulting TriangulatedSurface
usePolygonPlanesuse polygon plane or Triangulate in OXY plane
Todo:
unittest
SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const Triangle g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a 3D Triangle (copy triangle)

Todo:
unittest
SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const TriangulatedSurface g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a 3D TriangulatedSurface (copy triangles)

Todo:
unittest
SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const Polygon g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a 3D Polygon.

Todo:
unittest
SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const PolyhedralSurface polyhedralSurface,
TriangulatedSurface triangulatedSurface 
)

Triangulate 3D polygons in a PolyhedralSurface.

Todo:
unittest
SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const Solid g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a Solid.

Todo:
unittest
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::union3D ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Union on 3D geometries.

Assume z = 0 if needed

Precondition
ga and gb are valid geometries
Warning
@ No actual validity check is done
template<int Dim>
void SFCGAL::algorithm::union_ ( const detail::GeometrySet< Dim > &  a,
const detail::GeometrySet< Dim > &  b,
detail::GeometrySet< Dim > &   
)
template<int Dim>
void SFCGAL::algorithm::union_ ( const detail::PrimitiveHandle< Dim > &  a,
const detail::PrimitiveHandle< Dim > &  b,
detail::GeometrySet< Dim > &   
)
SFCGAL_API std::auto_ptr< Geometry > SFCGAL::algorithm::union_ ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Union on 2D geometries.

No validity check variant

Precondition
ga and gb are valid geometries
Warning
No actual validity check is done.
SFCGAL_API const Kernel::FT SFCGAL::algorithm::volume ( const Solid g,
NoValidityCheck   
)

Computes the volume of a Solid.

Precondition
(not checked) volume is closed and consistently oriented