SFCGAL 2.3.0
SFCGAL::generator Namespace Reference

Generator namespace. More...

Functions

auto building (const Geometry &g, const Kernel::FT &wallHeight, const Kernel::FT &roofSlope) -> std::unique_ptr< Geometry >
 Basic building generator relying on a straight skeleton.
auto disc (const Point &center, const double &radius, const unsigned int &nQuadrantSegments=8U) -> std::unique_ptr< Polygon >
 Generate a discrete circle.
auto hoch (const unsigned int &order) -> std::unique_ptr< Polygon >
 generate hoch snowflake
auto sierpinski (const unsigned int &order) -> std::unique_ptr< MultiPolygon >
 generate sierpinski triangle

Detailed Description

Generator namespace.

Todo
should be moved from detail to SFCGAL folder

Function Documentation

◆ building()

SFCGAL_API auto SFCGAL::generator::building ( const Geometry & g,
const Kernel::FT & wallHeight,
const Kernel::FT & roofSlope ) -> std::unique_ptr< Geometry >

Basic building generator relying on a straight skeleton.

Parameters
gInput geometry
wallHeightwall height
roofSloperoof slope
Returns
A new geometry representing a building with wall height and roof slope
Warning
only supports Polygon and MultiPolygon
Todo
unittest

◆ disc()

SFCGAL_API auto SFCGAL::generator::disc ( const Point & center,
const double & radius,
const unsigned int & nQuadrantSegments = 8U ) -> std::unique_ptr< Polygon >

Generate a discrete circle.

Parameters
centerThe center point of the circle
radiusThe radius of the circle
nQuadrantSegmentsNumber of segments per quadrant
Returns
A unique pointer to the generated polygon
Todo
unittest

◆ hoch()

SFCGAL_API auto SFCGAL::generator::hoch ( const unsigned int & order) -> std::unique_ptr< Polygon >

generate hoch snowflake

Parameters
orderThe order of the snowflake
Returns
A unique pointer to the generated polygon
Todo
unittest

◆ sierpinski()

SFCGAL_API auto SFCGAL::generator::sierpinski ( const unsigned int & order) -> std::unique_ptr< MultiPolygon >

generate sierpinski triangle

Parameters
orderThe order of the sierpinski triangle
Returns
A unique pointer to the generated multipolygon
Todo
unittest