SFCGAL  2.3.0
Public Member Functions | List of all members
SFCGAL::Transform Class Referenceabstract

Base interface for applying a coordinate transformation to geometry objects. More...

#include <Transform.h>

Inheritance diagram for SFCGAL::Transform:
SFCGAL::GeometryVisitor SFCGAL::transform::AffineTransform2 SFCGAL::transform::AffineTransform3 SFCGAL::transform::Force2D SFCGAL::transform::ForceM SFCGAL::transform::ForceOrderPoints SFCGAL::transform::ForceZ SFCGAL::transform::ForceZOrderPoints SFCGAL::transform::RoundTransform

Public Member Functions

 ~Transform () override
 Virtual destructor to allow safe cleanup of derived Transform implementations. More...
 
virtual void transform (Point &p)=0
 Apply the coordinate transformation to a single Point in place. More...
 
void visit (Point &g) override
 Apply the transformation to a Point geometry (visitor override). More...
 
void visit (LineString &g) override
 Apply the transformation to a LineString geometry (visitor override). More...
 
void visit (Polygon &g) override
 Apply the transformation to a Polygon geometry (visitor override). More...
 
void visit (Triangle &g) override
 Apply the transformation to a Triangle geometry (visitor override). More...
 
void visit (Solid &g) override
 Apply the transformation to a Solid geometry (visitor override). More...
 
void visit (MultiPoint &g) override
 Apply the transformation to a MultiPoint geometry (visitor override). More...
 
void visit (MultiLineString &g) override
 Apply the transformation to a MultiLineString geometry (visitor override). More...
 
void visit (MultiPolygon &g) override
 Apply the transformation to a MultiPolygon geometry (visitor override). More...
 
void visit (MultiSolid &g) override
 Apply the transformation to a MultiSolid geometry (visitor override). More...
 
void visit (GeometryCollection &g) override
 Apply the transformation to a GeometryCollection (visitor override). More...
 
void visit (PolyhedralSurface &g) override
 Apply the transformation to a PolyhedralSurface geometry (visitor override). More...
 
void visit (TriangulatedSurface &g) override
 Apply the transformation to a TriangulatedSurface geometry (visitor override). More...
 
void visit (NURBSCurve &g) override
 Apply the transformation to a NURBSCurve geometry (visitor override). More...
 
- Public Member Functions inherited from SFCGAL::GeometryVisitor
virtual ~GeometryVisitor ()
 Default destructor for GeometryVisitor. More...
 
virtual void visit (Geometry &geometry)
 Apply this visitor to a generic Geometry reference. More...
 

Detailed Description

Base interface for applying a coordinate transformation to geometry objects.

Implementations must provide transform(Point&) to define how a single point's coordinates are mapped; all other geometry visitor methods apply that point- level transform to the coordinates contained in their respective geometry types in place.

Constructor & Destructor Documentation

SFCGAL::Transform::~Transform ( )
overridedefault

Virtual destructor to allow safe cleanup of derived Transform implementations.

Member Function Documentation

virtual void SFCGAL::Transform::transform ( Point &  p)
pure virtual

Apply the coordinate transformation to a single Point in place.

Implementations should update the point's coordinate values according to the desired transform.

Parameters
pPoint to transform (modified in place).

Implemented in SFCGAL::transform::ForceOrderPoints, SFCGAL::transform::ForceZOrderPoints, SFCGAL::transform::AffineTransform2, SFCGAL::transform::AffineTransform3, SFCGAL::transform::ForceZ, SFCGAL::transform::RoundTransform, SFCGAL::transform::ForceM, and SFCGAL::transform::Force2D.

void SFCGAL::Transform::visit ( Point &  g)
overridevirtual

Apply the transformation to a Point geometry (visitor override).

The Point is modified in place.

Parameters
gPoint to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( LineString &  g)
overridevirtual

Apply the transformation to a LineString geometry (visitor override).

Each vertex of the LineString is transformed in place.

Parameters
gLineString to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( Polygon &  g)
overridevirtual

Apply the transformation to a Polygon geometry (visitor override).

All rings and their vertices are transformed in place.

Parameters
gPolygon to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( Triangle &  g)
overridevirtual

Apply the transformation to a Triangle geometry (visitor override).

Each vertex of the Triangle is transformed in place.

Parameters
gTriangle to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( Solid &  g)
overridevirtual

Apply the transformation to a Solid geometry (visitor override).

All constituent faces and vertices of the Solid are transformed in place.

Parameters
gSolid to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( MultiPoint &  g)
overridevirtual

Apply the transformation to a MultiPoint geometry (visitor override).

Every point in the collection is transformed in place.

Parameters
gMultiPoint to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( MultiLineString &  g)
overridevirtual

Apply the transformation to a MultiLineString geometry (visitor override).

All lines and their vertices are transformed in place.

Parameters
gMultiLineString to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( MultiPolygon &  g)
overridevirtual

Apply the transformation to a MultiPolygon geometry (visitor override).

All polygons, rings, and vertices are transformed in place.

Parameters
gMultiPolygon to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( MultiSolid &  g)
overridevirtual

Apply the transformation to a MultiSolid geometry (visitor override).

All solids and their constituent geometry are transformed in place.

Parameters
gMultiSolid to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( GeometryCollection &  g)
overridevirtual

Apply the transformation to a GeometryCollection (visitor override).

Each element in the collection is visited and transformed in place.

Parameters
gGeometryCollection to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( PolyhedralSurface &  g)
overridevirtual

Apply the transformation to a PolyhedralSurface geometry (visitor override).

All faces and their vertices are transformed in place.

Parameters
gPolyhedralSurface to transform (modified in place).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( TriangulatedSurface &  g)
overridevirtual

Apply the transformation to a TriangulatedSurface geometry (visitor override).

Apply the transformation to every patch of a TriangulatedSurface.

All triangles and their vertices are transformed in place.

Parameters
gTriangulatedSurface to transform (modified in place).

Iterates all patches in the given TriangulatedSurface and recursively visits each patch so the transformation is applied to their constituent geometries (control vertices/triangles).

Implements SFCGAL::GeometryVisitor.

void SFCGAL::Transform::visit ( NURBSCurve &  g)
overridevirtual

Apply the transformation to a NURBSCurve geometry (visitor override).

Control points (and any relevant coordinate data) of the NURBSCurve are transformed in place.

Parameters
gNURBSCurve to transform (modified in place).

Reimplemented from SFCGAL::GeometryVisitor.