|
SFCGAL
2.3.0
|
Visitor that extracts point coordinates from geometries to expand an Envelope. More...
Namespaces | |
| algorithm | |
| Algorithm detail namespace. | |
| io | |
| Input/output detail namespace. | |
Classes | |
| struct | BoxCollection |
| BoxCollection for use with CGAL::Box_intersection_d. More... | |
| class | CollectionElement |
| CollectionElement, a Primitive with flags Primitive : Point_d, Segment_d, Surface_d, Volume_d. More... | |
| struct | ComparePoints |
| Comparator for sorting points lexicographically. More... | |
| struct | ComplexComparator |
| lexicographic order on complex More... | |
| struct | ConstraintInfo |
| Structure to identify constraint sources for topology-preserving mode. More... | |
| struct | ConstraintInfoCompare |
| Comparison function for sorting constraints by original order. More... | |
| struct | ConstraintOrderInfo |
| Structure to store constraint order information Allows recovering the original insertion order after simplification. More... | |
| struct | dim_t |
| Create a distinct type for each dimension. More... | |
| class | EnvelopeVisitor |
| Get the list of points from a Geometry. More... | |
| class | ForceValidityVisitor |
| Visitor that forces the validity flag on geometries. More... | |
| class | GeometrySet |
| A GeometrySet represents a set of CGAL primitives. More... | |
| class | GetPointsVisitor |
| Get the list of points from a Geometry. More... | |
| struct | Halfedge_with_mark |
| Extended polyhedron_3 type with a boolean marker on halfedges This is used internally for polyhedra boolean operations. More... | |
| struct | HandleCollection |
| HandleCollection. Used to store PrimitiveHandle. More... | |
| class | Interval |
| Represents an interval. More... | |
| struct | IsPrimitiveLarger |
| Tests if a primitive type has a larger dimension than another one. More... | |
| struct | Items_with_mark_on_hedge |
| An items type using my halfedge. More... | |
| struct | NoVolume |
| struct | Point_d |
| Another way of looking at TypeForDimension<Dim>::Point. More... | |
| struct | PrimitiveBox |
| PrimitiveBox. Type used for CGAL::Box_intersection_d. More... | |
| struct | PrimitiveDimension |
| Get a primitive dimension (0: point, 1: line, 2: surface, 3: volume) from a type. More... | |
| struct | PrimitiveDimension< TypeForDimension< 2 >::Segment > |
| Specialization for 2D segments. More... | |
| struct | PrimitiveDimension< TypeForDimension< 2 >::Surface > |
| Specialization for 2D surfaces. More... | |
| struct | PrimitiveDimension< TypeForDimension< 2 >::Volume > |
| Specialization for 2D volumes (should not exist but for completeness) More... | |
| struct | PrimitiveDimension< TypeForDimension< 3 >::Segment > |
| Specialization for 3D segments. More... | |
| struct | PrimitiveDimension< TypeForDimension< 3 >::Surface > |
| Specialization for 3D surfaces. More... | |
| struct | PrimitiveDimension< TypeForDimension< 3 >::Volume > |
| Specialization for 3D volumes. More... | |
| struct | PrimitiveHandle |
| Primitive handle. More... | |
| struct | Segment_d |
| Another way of looking at TypeForDimension<Dim>::Segment. More... | |
| class | SegmentStore |
| Collection of segments from a geometry for interpolation. More... | |
| struct | Surface_d |
| Another way of looking at TypeForDimension<Dim>::Surface. More... | |
| struct | TypeForDimension |
| Generic traits, default dimension is 2. More... | |
| struct | TypeForDimension< 3 > |
| Specialization for dimension = 3. More... | |
| struct | Volume_d |
| Another way of looking at TypeForDimension<Dim>::Volume. More... | |
Typedefs | |
| using | MarkedPolyhedron = CGAL::Polyhedron_3< Kernel, Items_with_mark_on_hedge > |
| CGAL 3D polyhedron with marked half-edges. More... | |
Enumerations | |
| enum | PrimitiveType : std::uint8_t { PrimitivePoint = 0, PrimitiveSegment = 1, PrimitiveSurface = 2, PrimitiveVolume = 3 } |
| Primitive type enumeration. Note that the value is the dimension ! More... | |
| enum | ElementFlag : std::uint8_t { FLAG_IS_PLANAR = 1 } |
| Flags available for each type of Geometry type. More... | |
Functions | |
| static auto | extractPointsFromLineString (const LineString &lineString) -> std::vector< CGALPoint > |
| Extracts points from a LineString to create a CGAL point vector. More... | |
| static auto | extractPointsFromRing (const LineString &ring) -> std::vector< CGALPoint > |
| Extracts points from a ring to create a CGAL point vector. More... | |
| static auto | buildLineStringFromConstraint (const CT &ct, const Constraint_id &cid, const SegmentStore &store, CoordinateType dimension) -> LineString |
| Builds a LineString from constraint points. More... | |
| static auto | extractLineStringConstraints (const LineString &lineString, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx) -> bool |
| Extracts LineString constraints and adds them to the triangulation. More... | |
| static auto | extractPolygonExteriorConstraint (const LineString &ring, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx, std::size_t polyIdx, ConstraintInfo::Type type) -> bool |
| Extracts polygon exterior ring constraints and adds them to the triangulation. More... | |
| static void | extractPolygonInteriorConstraints (const Polygon &polygon, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx, std::size_t polyIdx, ConstraintInfo::Type type) |
| Extracts polygon interior ring constraints and adds them to the triangulation. More... | |
| static void | extractPolygonConstraints (const Polygon &polygon, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx) |
| Extracts polygon constraints and adds them to the triangulation. More... | |
| static void | extractMultiPolygonConstraints (const MultiPolygon &multiPolygon, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx) |
| Extracts MultiPolygon constraints and adds them to the triangulation. More... | |
| static void | extractPolyhedralSurfaceConstraints (const PolyhedralSurface &surface, CT &ct, std::vector< ConstraintInfoType > &constraintInfos, std::size_t geomIdx) |
| Extracts PolyhedralSurface constraints and adds them to the triangulation. More... | |
| static void | extractAllConstraints (const GeometryCollection &collection, CT &ct, std::vector< ConstraintInfoType > &constraintInfos) |
| Extracts constraints from all geometry types in a collection. More... | |
| static void | organizeSimplifiedConstraints (const CT &ct, const std::vector< ConstraintInfoType > &constraintInfos, const SegmentStore &store, CoordinateType dimension, std::map< size_t, std::unique_ptr< LineString >> &linestrings, std::map< size_t, std::map< size_t, LineString >> &polygonRings, std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &multiPolygonRings, std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &polyhedralSurfaceRings) |
| Organizes simplified constraints into corresponding data structures. More... | |
| static void | reconstructLineString (const std::map< size_t, std::unique_ptr< LineString >> &linestrings, const GeometryCollection &collection, std::size_t geomIdx, GeometryCollection &result) |
| Reconstructs a LineString in a GeometryCollection from simplified constraints. More... | |
| static void | reconstructPolygon (const std::map< size_t, std::map< size_t, LineString >> &polygonRings, const GeometryCollection &collection, std::size_t geomIdx, GeometryCollection &result) |
| Reconstructs a Polygon in a GeometryCollection from simplified rings. More... | |
| static void | reconstructMultiPolygon (const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &multiPolygonRings, const GeometryCollection &collection, std::size_t geomIdx, GeometryCollection &result) |
| Reconstructs a MultiPolygon in a GeometryCollection from simplified rings, preserving dimensions. More... | |
| static void | reconstructPolyhedralSurface (const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &polyhedralSurfaceRings, const GeometryCollection &collection, std::size_t geomIdx, GeometryCollection &result) |
| Reconstructs a PolyhedralSurface in a GeometryCollection from simplified rings, preserving dimensions. More... | |
| static auto | reconstructAllGeometries (const GeometryCollection &collection, const std::map< size_t, std::unique_ptr< LineString >> &linestrings, const std::map< size_t, std::map< size_t, LineString >> &polygonRings, const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &multiPolygonRings, const std::map< size_t, std::map< size_t, std::map< size_t, LineString >>> &polyhedralSurfaceRings) -> std::unique_ptr< GeometryCollection > |
| Reconstructs all geometries from simplified constraints, preserving dimensions. More... | |
| auto | simplifyLineString (const LineString &lineString, double threshold, bool, const SegmentStore &store) -> std::unique_ptr< Geometry > |
| Simplifies a LineString. More... | |
| auto | simplifyMultiLineString (const MultiLineString &multiLine, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry > |
| Simplifies a MultiLineString. More... | |
| auto | simplifyPolygon (const Polygon &polygon, double threshold, bool) -> std::unique_ptr< Geometry > |
| Simplifies a Polygon. More... | |
| auto | simplifyMultiPolygon (const MultiPolygon &multiPolygon, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry > |
| Simplifies a MultiPolygon. More... | |
| auto | simplifyPolyhedralSurface (const PolyhedralSurface &polySurface, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry > |
| Simplifies a PolyhedralSurface. More... | |
| auto | simplifyGeometryCollectionTopology (const GeometryCollection &collection, double threshold) -> std::unique_ptr< Geometry > |
| Simplifies a GeometryCollection with topology preservation. More... | |
| auto | simplify (const Geometry &geometry, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry > |
| Wrapper for the algorithm::simplify function. More... | |
| auto | simplifyGeometryCollection (const GeometryCollection &collection, double threshold, bool preserveTopology) -> std::unique_ptr< Geometry > |
| Simplifies a GeometryCollection. More... | |
| auto | operator<< (std::ostream &ostr, const GeometrySet< 2 > &geomSet) -> std::ostream & |
| Display operator for 2D GeometrySet. More... | |
| auto | operator<< (std::ostream &ostr, const GeometrySet< 3 > &geomSet) -> std::ostream & |
| Display operator for 3D GeometrySet. More... | |
| template<class Primitive > | |
| auto | operator<< (std::ostream &ostr, const CollectionElement< Primitive > &collection) -> std::ostream & |
| Stream output operator for a CollectionElement. More... | |
| auto | compute_solid_bbox (const NoVolume &, dim_t< 2 >) -> CGAL::Bbox_2 |
| Compute the bounding box of a volume in 2D. More... | |
| auto | compute_solid_bbox (const TypeForDimension< 3 >::Volume &volume, dim_t< 3 >) -> CGAL::Bbox_3 |
| Compute the bounding box of a 3D volume. More... | |
| auto | polygonSetToMultiPolygon (const CGAL::Polygon_set_2< Kernel > &polygonSet) -> std::unique_ptr< MultiPolygon > |
| convert a CGAL::Polygon_set_2 to a MultiPolygon More... | |
Visitor that extracts point coordinates from geometries to expand an Envelope.
Implementation details namespace.
Visitor that collects pointers to all Point instances contained in a Geometry.
Visits concrete Geometry types and updates the referenced envelope with all point coordinates encountered (vertices, control points, etc.), so the envelope bounds encompass the geometry. Supports points, line strings, polygons, triangles, solids, multis, collections, surfaces, triangulated surfaces and NURBS curves.
The visitor holds a reference to the Envelope to populate (public member envelope). Use an instance of this visitor to traverse a Geometry with the goal of computing or extending its bounding envelope.
Traverses geometries by overriding ConstGeometryVisitor visit methods and appends pointers to discovered Point objects into the public 'points' vector. Includes points found directly (Point), on linear/area/volume geometries (LineString, Polygon, Triangle, Solid, etc.), within multi- and collection geometries, and control points of NURBSCurve. Collected pointers reference Points owned by the visited geometries; this visitor does not take ownership or modify them.
Use the const_iterator typedef to iterate over the collected point pointers.
| using SFCGAL::detail::MarkedPolyhedron = typedef CGAL::Polyhedron_3<Kernel, Items_with_mark_on_hedge> |
CGAL 3D polyhedron with marked half-edges.
| enum SFCGAL::detail::ElementFlag : std::uint8_t |
| enum SFCGAL::detail::PrimitiveType : std::uint8_t |
Primitive type enumeration. Note that the value is the dimension !
| Enumerator | |
|---|---|
| PrimitivePoint | |
| PrimitiveSegment | |
| PrimitiveSurface | |
| PrimitiveVolume | |
|
static |
Builds a LineString from constraint points.
| ct | The constrained triangulation |
| cid | The constraint ID |
| store | The segment store for interpolation |
| dimension | The coordinate dimension type |
Compute the bounding box of a volume in 2D.
This overload is for the NoVolume type and will never be called in practice.
|
inline |
Compute the bounding box of a 3D volume.
| volume | The volume whose bounding box is to be computed. |
|
static |
Extracts constraints from all geometry types in a collection.
| collection | The source GeometryCollection |
| ct | The constrained triangulation to add to |
| constraintInfos | Collection of constraint infos |
|
static |
Extracts LineString constraints and adds them to the triangulation.
| lineString | The source LineString |
| ct | The constrained triangulation to add to |
| constraintInfos | Collection of constraint infos |
| geomIdx | The geometry index |
|
static |
Extracts MultiPolygon constraints and adds them to the triangulation.
| multiPolygon | The source MultiPolygon |
| ct | The constrained triangulation to add to |
| constraintInfos | Collection of constraint infos |
| geomIdx | The geometry index |
|
static |
Extracts points from a LineString to create a CGAL point vector.
| lineString | The source LineString |
|
static |
Extracts points from a ring to create a CGAL point vector.
| ring | The source ring (LineString) |
|
static |
Extracts polygon constraints and adds them to the triangulation.
| polygon | The source polygon |
| ct | The constrained triangulation to add to |
| constraintInfos | Collection of constraint infos |
| geomIdx | The geometry index |
|
static |
Extracts polygon exterior ring constraints and adds them to the triangulation.
| ring | The exterior ring |
| ct | The constrained triangulation to add to |
| constraintInfos | Collection of constraint infos |
| geomIdx | The geometry index |
| polyIdx | The polygon index |
| type | The constraint type |
|
static |
Extracts polygon interior ring constraints and adds them to the triangulation.
| polygon | The source polygon |
| ct | The constrained triangulation to add to |
| constraintInfos | Collection of constraint infos |
| geomIdx | The geometry index |
| polyIdx | The polygon index in a collection |
| type | The constraint type for interior rings |
|
static |
Extracts PolyhedralSurface constraints and adds them to the triangulation.
| surface | The source PolyhedralSurface |
| ct | The constrained triangulation to add to |
| constraintInfos | Collection of constraint infos |
| geomIdx | The geometry index |
| auto SFCGAL::detail::operator<< | ( | std::ostream & | ostr, |
| const CollectionElement< Primitive > & | collection | ||
| ) | -> std::ostream & |
Stream output operator for a CollectionElement.
| Primitive | The type of the underlying primitive stored in the CollectionElement. |
| ostr | The output stream to write to. |
| collection | The CollectionElement to display. |
| SFCGAL_API auto SFCGAL::detail::operator<< | ( | std::ostream & | ostr, |
| const GeometrySet< 2 > & | geomSet | ||
| ) | -> std::ostream & |
Display operator for 2D GeometrySet.
| ostr | The output stream to write to. |
| geomSet | The 2D GeometrySet to display. |
| SFCGAL_API auto SFCGAL::detail::operator<< | ( | std::ostream & | ostr, |
| const GeometrySet< 3 > & | geomSet | ||
| ) | -> std::ostream & |
Display operator for 3D GeometrySet.
| ostr | The output stream to write to. |
| geomSet | The 3D GeometrySet to display. |
|
static |
Organizes simplified constraints into corresponding data structures.
| ct | The constrained triangulation with simplified constraints |
| constraintInfos | Collection of constraint infos |
| store | The segment store for interpolation |
| dimension | The coordinate dimension type |
| linestrings | Output map for linestrings |
| polygonRings | Output map for polygon rings |
| multiPolygonRings | Output map for multipolygon rings |
| polyhedralSurfaceRings | Output map for polyhedral surface rings |
| SFCGAL_API auto SFCGAL::detail::polygonSetToMultiPolygon | ( | const CGAL::Polygon_set_2< Kernel > & | polygonSet | ) | -> std::unique_ptr< MultiPolygon > |
convert a CGAL::Polygon_set_2 to a MultiPolygon
| polygonSet | The CGAL polygon set to convert |
|
static |
Reconstructs all geometries from simplified constraints, preserving dimensions.
| collection | The original GeometryCollection |
| linestrings | Map of simplified linestrings |
| polygonRings | Map of simplified polygon rings |
| multiPolygonRings | Map of simplified multipolygon rings |
| polyhedralSurfaceRings | Map of simplified polyhedral surface rings |
|
static |
Reconstructs a LineString in a GeometryCollection from simplified constraints.
| linestrings | Map of simplified linestrings |
| collection | The original GeometryCollection |
| geomIdx | The geometry index |
| result | The output GeometryCollection |
|
static |
Reconstructs a MultiPolygon in a GeometryCollection from simplified rings, preserving dimensions.
| multiPolygonRings | Map of simplified multipolygon rings |
| collection | The original GeometryCollection |
| geomIdx | The geometry index |
| result | The output GeometryCollection |
|
static |
Reconstructs a Polygon in a GeometryCollection from simplified rings.
| polygonRings | Map of simplified polygon rings |
| collection | The original GeometryCollection |
| geomIdx | The geometry index |
| result | The output GeometryCollection |
|
static |
Reconstructs a PolyhedralSurface in a GeometryCollection from simplified rings, preserving dimensions.
| polyhedralSurfaceRings | Map of simplified polyhedral surface rings |
| collection | The original GeometryCollection |
| geomIdx | The geometry index |
| result | The output GeometryCollection |
|
inline |
Wrapper for the algorithm::simplify function.
| geometry | The geometry to simplify |
| threshold | The simplification threshold |
| preserveTopology | Whether to preserve topology |
| auto SFCGAL::detail::simplifyGeometryCollection | ( | const GeometryCollection & | collection, |
| double | threshold, | ||
| bool | preserveTopology | ||
| ) | -> std::unique_ptr< Geometry > |
Simplifies a GeometryCollection.
| collection | The GeometryCollection to simplify |
| threshold | The simplification threshold |
| preserveTopology | Whether to preserve topology |
| auto SFCGAL::detail::simplifyGeometryCollectionTopology | ( | const GeometryCollection & | collection, |
| double | threshold | ||
| ) | -> std::unique_ptr< Geometry > |
Simplifies a GeometryCollection with topology preservation.
| collection | The GeometryCollection to simplify |
| threshold | The simplification threshold |
| auto SFCGAL::detail::simplifyLineString | ( | const LineString & | lineString, |
| double | threshold, | ||
| bool | , | ||
| const SegmentStore & | store | ||
| ) | -> std::unique_ptr< Geometry > |
Simplifies a LineString.
| lineString | The LineString to simplify |
| threshold | The simplification threshold |
| store | The segment store for interpolation |
| auto SFCGAL::detail::simplifyMultiLineString | ( | const MultiLineString & | multiLine, |
| double | threshold, | ||
| bool | preserveTopology | ||
| ) | -> std::unique_ptr< Geometry > |
Simplifies a MultiLineString.
| multiLine | The MultiLineString to simplify |
| threshold | The simplification threshold |
| preserveTopology | Whether to preserve topology |
| auto SFCGAL::detail::simplifyMultiPolygon | ( | const MultiPolygon & | multiPolygon, |
| double | threshold, | ||
| bool | preserveTopology | ||
| ) | -> std::unique_ptr< Geometry > |
Simplifies a MultiPolygon.
| multiPolygon | The MultiPolygon to simplify |
| threshold | The simplification threshold |
| preserveTopology | Whether to preserve topology |
| auto SFCGAL::detail::simplifyPolygon | ( | const Polygon & | polygon, |
| double | threshold, | ||
| bool | |||
| ) | -> std::unique_ptr< Geometry > |
| auto SFCGAL::detail::simplifyPolyhedralSurface | ( | const PolyhedralSurface & | polySurface, |
| double | threshold, | ||
| bool | preserveTopology | ||
| ) | -> std::unique_ptr< Geometry > |
Simplifies a PolyhedralSurface.
| polySurface | The PolyhedralSurface to simplify |
| threshold | The simplification threshold |
| preserveTopology | Whether to preserve topology |
1.8.10