SFCGAL 2.0.0
|
Represents a cylinder in 3D space. More...
#include <Cylinder.h>
Public Types | |
using | Point_3 = Kernel::Point_3 |
using | Vector_3 = Kernel::Vector_3 |
using | Polyhedron_3 = CGAL::Polyhedron_3<Kernel> |
using | Surface_mesh = CGAL::Surface_mesh<Point_3> |
Public Member Functions | |
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. | |
Cylinder & | operator= (Cylinder other) |
Assignment operator. | |
~Cylinder ()=default | |
Destructor. | |
void | setBaseCenter (const Point_3 &base_center) |
Sets the base center of the cylinder. | |
void | setAxis (const Vector_3 &axis) |
Sets the axis of the cylinder. | |
void | setRadius (const Kernel::FT &radius) |
Sets the radius 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. | |
const Point_3 & | baseCenter () const |
Gets the base center of the cylinder. | |
const Vector_3 & | axis () const |
Gets the axis of the cylinder. | |
const Kernel::FT & | radius () const |
Gets the radius of the cylinder. | |
const Kernel::FT & | height () const |
Gets the height of the cylinder. | |
int | numRadial () const |
Gets the number of radial divisions. | |
Polyhedron_3 | generatePolyhedron () |
Generates a polyhedron representation of the cylinder. | |
Surface_mesh | generateSurfaceMesh () |
Generates a surface mesh representation of the cylinder. | |
double | volume () const |
double | area () const |
Represents a cylinder in 3D space.
This class provides methods to generate a polyhedron and a surface mesh representation of a cylinder. It uses SFCGAL's Kernel for exact computations.
using SFCGAL::Cylinder::Point_3 = Kernel::Point_3 |
using SFCGAL::Cylinder::Polyhedron_3 = CGAL::Polyhedron_3<Kernel> |
using SFCGAL::Cylinder::Surface_mesh = CGAL::Surface_mesh<Point_3> |
using SFCGAL::Cylinder::Vector_3 = Kernel::Vector_3 |
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 ) |
Constructs a Cylinder object.
base_center | The center point of the base of the cylinder |
axis | The axis of the cylinder |
radius | The radius of the cylinder |
height | The height of the cylinder |
num_radial | The number of radial divisions |
|
default |
Copy constructor.
|
default |
Destructor.
|
inline |
|
inline |
Gets the axis of the cylinder.
|
inline |
Gets the base center of the cylinder.
auto SFCGAL::Cylinder::generatePolyhedron | ( | ) |
Generates a polyhedron representation of the cylinder.
auto SFCGAL::Cylinder::generateSurfaceMesh | ( | ) |
Generates a surface mesh representation of the cylinder.
|
inline |
Gets the height of the cylinder.
|
inline |
Gets the number of radial divisions.
auto SFCGAL::Cylinder::operator= | ( | Cylinder | other | ) |
Assignment operator.
|
inline |
Gets the radius of the cylinder.
void SFCGAL::Cylinder::setAxis | ( | const Vector_3 & | axis | ) |
Sets the axis of the cylinder.
axis | The new axis vector |
void SFCGAL::Cylinder::setBaseCenter | ( | const Point_3 & | base_center | ) |
Sets the base center of the cylinder.
base_center | The new base center point |
void SFCGAL::Cylinder::setHeight | ( | const Kernel::FT & | height | ) |
Sets the height of the cylinder.
height | The new height |
void SFCGAL::Cylinder::setNumRadial | ( | int | num | ) |
Sets the number of radial divisions.
num | The new number of radial divisions |
void SFCGAL::Cylinder::setRadius | ( | const Kernel::FT & | radius | ) |
Sets the radius of the cylinder.
radius | The new radius |
|
inline |