|
SFCGAL 2.0.0
|
Represents a sphere in 3D space. More...
#include <Sphere.h>
Public Member Functions | |
| Sphere (const Kernel::FT &radius=1.0, const Kernel::Point_3 ¢er=Kernel::Point_3(0, 0, 0), int num_vertical=16, int num_horizontal=32, const Kernel::Vector_3 &direction=Kernel::Vector_3(0, 0, 1)) | |
| Constructs a Sphere object. | |
| Sphere (const Sphere &other)=default | |
| Copy constructor. | |
| Sphere & | operator= (Sphere other) |
| Assignment operator. | |
| ~Sphere ()=default | |
| Destructor. | |
| void | setRadius (const Kernel::FT &radius) |
| Sets the radius of the sphere. | |
| void | setCenter (const Kernel::Point_3 ¢er) |
| Sets the center of the sphere. | |
| void | setNumVertical (int num) |
| Sets the number of vertical divisions. | |
| void | setNumHorizontal (int num) |
| Sets the number of horizontal divisions. | |
| void | setDirection (const Kernel::Vector_3 &direction) |
| Sets the direction of the sphere. | |
| const Kernel::FT & | radius () const |
| Gets the radius of the sphere. | |
| const Kernel::Point_3 & | center () const |
| Gets the center of the sphere. | |
| int | numVertical () const |
| Gets the number of vertical divisions. | |
| int | numHorizontal () const |
| Gets the number of horizontal divisions. | |
| const Kernel::Vector_3 & | direction () const |
| Gets the direction of the sphere. | |
| CGAL::Polyhedron_3< Kernel > | generatePolyhedron () |
| Generates a polyhedron representation of the sphere. | |
| std::vector< Kernel::Point_3 > | generatePoints () |
| Generates a point cloud representation of the sphere. | |
| double | volume () const |
| Calculates the volume of the Sphere. | |
| double | area () const |
| Calculates the surface area of the Sphere. | |
Represents a sphere in 3D space.
This class provides methods to generate a polyhedron and a point cloud representation of a sphere. It uses SFCGAL's Kernel for exact computations.
| SFCGAL::Sphere::Sphere | ( | const Kernel::FT & | radius = 1.0, |
| const Kernel::Point_3 & | center = Kernel::Point_3(0, 0, 0), | ||
| int | num_vertical = 16, | ||
| int | num_horizontal = 32, | ||
| const Kernel::Vector_3 & | direction = Kernel::Vector_3(0, 0, 1) ) |
Constructs a Sphere object.
| radius | The radius of the sphere |
| center | The center point of the sphere |
| num_vertical | The number of vertical divisions |
| num_horizontal | The number of horizontal divisions |
| direction | The direction vector for sphere orientation |
|
default |
Copy constructor.
|
default |
Destructor.
|
inline |
Calculates the surface area of the Sphere.
|
inline |
Gets the center of the sphere.
|
inline |
Gets the direction of the sphere.
| auto SFCGAL::Sphere::generatePoints | ( | ) |
Generates a point cloud representation of the sphere.
| auto SFCGAL::Sphere::generatePolyhedron | ( | ) |
Generates a polyhedron representation of the sphere.
|
inline |
Gets the number of horizontal divisions.
|
inline |
Gets the number of vertical divisions.
| auto SFCGAL::Sphere::operator= | ( | Sphere | other | ) |
Assignment operator.
|
inline |
Gets the radius of the sphere.
|
inline |
Sets the center of the sphere.
| center | The new center point |
|
inline |
Sets the direction of the sphere.
| direction | The new direction vector |
|
inline |
Sets the number of horizontal divisions.
| num | The new number of horizontal divisions |
|
inline |
Sets the number of vertical divisions.
| num | The new number of vertical divisions |
|
inline |
Sets the radius of the sphere.
| radius | The new radius |
|
inline |
Calculates the volume of the Sphere.