SFCGAL  2.2.0
Public Types | Public Member Functions | List of all members
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. More...
 
std::unique_ptr< PolyhedralSurfacecompute (BufferType type) const
 Computes the 3D buffer. More...
 

Detailed Description

Computes a 3D buffer around a Point or LineString.

Member Enumeration Documentation

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

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

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