Class SFCGAL::Cylinder#
Represents a cylinder in 3D space. More...
#include <Cylinder.h>
Public Functions#
Type | Name |
---|---|
Cylinder (const Point_3 & base_center=Point_3(0, 0, 0), const Vector_3 & axis=Vector_3(0, 0, 1), const Kernel::FT & radius=1.0, const Kernel::FT & height=1.0, int num_radial=32) Constructs a Cylinder object. |
|
Cylinder (const Cylinder & other) = default Copy constructor. |
|
double | area () const |
const Vector_3 & | axis () const Gets the axis of the cylinder. |
const Point_3 & | baseCenter () const Gets the base center of the cylinder. |
Polyhedron_3 | generatePolyhedron () Generates a polyhedron representation of the cylinder. |
Surface_mesh_3 | generateSurfaceMesh () Generates a surface mesh representation of the cylinder. |
const Kernel::FT & | height () const Gets the height of the cylinder. |
int | numRadial () const Gets the number of radial divisions. |
Cylinder & | operator= (Cylinder other) Assignment operator. |
const Kernel::FT & | radius () const Gets the radius of the cylinder. |
void | setAxis (const Vector_3 & axis) Sets the axis of the cylinder. |
void | setBaseCenter (const Point_3 & base_center) Sets the base center of the cylinder. |
void | setHeight (const Kernel::FT & height) Sets the height of the cylinder. |
void | setNumRadial (int num) Sets the number of radial divisions. |
void | setRadius (const Kernel::FT & radius) Sets the radius of the cylinder. |
double | volume () const |
~Cylinder () = default Destructor. |
Detailed Description#
This class provides methods to generate a polyhedron and a surface mesh representation of a cylinder. It uses SFCGAL's Kernel for exact computations.
Public Functions Documentation#
function Cylinder [1/2]#
Constructs a Cylinder object.
SFCGAL::Cylinder::Cylinder (
const Point_3 & base_center=Point_3(0, 0, 0),
const Vector_3 & axis=Vector_3(0, 0, 1),
const Kernel::FT & radius=1.0,
const Kernel::FT & height=1.0,
int num_radial=32
)
Parameters:
base_center
The center point of the base of the cylinderaxis
The axis of the cylinderradius
The radius of the cylinderheight
The height of the cylindernum_radial
The number of radial divisions
function Cylinder [2/2]#
Copy constructor.
SFCGAL::Cylinder::Cylinder (
const Cylinder & other
) = default
function area#
inline double SFCGAL::Cylinder::area () const
function axis#
Gets the axis of the cylinder.
inline const Vector_3 & SFCGAL::Cylinder::axis () const
Returns:
The axis vector
function baseCenter#
Gets the base center of the cylinder.
inline const Point_3 & SFCGAL::Cylinder::baseCenter () const
Returns:
The base center point
function generatePolyhedron#
Generates a polyhedron representation of the cylinder.
Polyhedron_3 SFCGAL::Cylinder::generatePolyhedron ()
Returns:
A CGAL::Polyhedron_3 object representing the cylinder
function generateSurfaceMesh#
Generates a surface mesh representation of the cylinder.
Surface_mesh_3 SFCGAL::Cylinder::generateSurfaceMesh ()
Returns:
A CGAL::Surface_mesh object representing the cylinder
function height#
Gets the height of the cylinder.
inline const Kernel::FT & SFCGAL::Cylinder::height () const
Returns:
The height
function numRadial#
Gets the number of radial divisions.
inline int SFCGAL::Cylinder::numRadial () const
Returns:
The number of radial divisions
function operator=#
Assignment operator.
Cylinder & SFCGAL::Cylinder::operator= (
Cylinder other
)
function radius#
Gets the radius of the cylinder.
inline const Kernel::FT & SFCGAL::Cylinder::radius () const
Returns:
The radius
function setAxis#
Sets the axis of the cylinder.
void SFCGAL::Cylinder::setAxis (
const Vector_3 & axis
)
Parameters:
axis
The new axis vector
function setBaseCenter#
Sets the base center of the cylinder.
void SFCGAL::Cylinder::setBaseCenter (
const Point_3 & base_center
)
Parameters:
base_center
The new base center point
function setHeight#
Sets the height of the cylinder.
void SFCGAL::Cylinder::setHeight (
const Kernel::FT & height
)
Parameters:
height
The new height
function setNumRadial#
Sets the number of radial divisions.
void SFCGAL::Cylinder::setNumRadial (
int num
)
Parameters:
num
The new number of radial divisions
function setRadius#
Sets the radius of the cylinder.
void SFCGAL::Cylinder::setRadius (
const Kernel::FT & radius
)
Parameters:
radius
The new radius
function volume#
inline double SFCGAL::Cylinder::volume () const
function ~Cylinder#
Destructor.
SFCGAL::Cylinder::~Cylinder () = default
The documentation for this class was generated from the following file /builds/sfcgal/SFCGAL/src/primitive3d/Cylinder.h