SFCGAL 2.0.0
SFCGAL::algorithm::Buffer3D Class Reference

Computes a 3D buffer around a Point or LineString. More...

#include <buffer3D.h>

Public Types

enum  BufferType { ROUND , CYLSPHERE , FLAT }
 Buffer type enumeration. More...

Public Member Functions

 Buffer3D (const Geometry &inputGeometry, double radius, int segments)
 Constructs a Buffer3D object.
std::unique_ptr< PolyhedralSurfacecompute (BufferType type) const
 Computes the 3D buffer.

Detailed Description

Computes a 3D buffer around a Point or LineString.

Member Enumeration Documentation

◆ BufferType

Buffer type enumeration.

Enumerator
ROUND 

Minkowski sum with a sphere.

CYLSPHERE 

Union of cylinders and spheres.

FLAT 

Construction of a disk on the bisector plane.

Constructor & Destructor Documentation

◆ Buffer3D()

SFCGAL::algorithm::Buffer3D::Buffer3D ( const Geometry & inputGeometry,
double radius,
int segments )

Constructs a Buffer3D object.

Parameters
inputGeometryThe input geometry (must be a Point or LineString)
radiusThe buffer radius
segmentsThe number of segments used to approximate curved surfaces
Exceptions
std::invalid_argumentif the input geometry is not a Point or LineString

Member Function Documentation

◆ compute()

auto SFCGAL::algorithm::Buffer3D::compute ( BufferType type) const

Computes the 3D buffer.

Parameters
typeThe type of buffer to compute
Returns
A PolyhedralSurface representing the 3D buffer
Exceptions
std::invalid_argumentif an invalid buffer type is provided