Antiprism 0.23
|
Bounding Sphere. More...
#include <bbox.h>
Public Member Functions | |
bound_sphere (const vector< vec3d > &points=vector< vec3d >(), double cutoff=-1) | |
Constructer. | |
virtual | ~bound_sphere () |
Destructor. | |
void | add_points (const vector< vec3d > &points, double cutoff=-1) |
Add points and calculate the new bounding sphere. | |
void | add_b_sphere (const bound_sphere &b_sphere) |
Add a bounding sphere and calculate the new bounding sphere. | |
void | set_cut_off (double cutoff) |
Set the cut off distance. | |
virtual vec3d | get_centre () const |
Centre of the sphere. | |
double | get_radius () const |
Radius of the sphere. | |
double | get_width () const |
Width of the points (diameter of the sphere) | |
double | get_cut_off_cnt () const |
The number of points excluded by the cut-off distance. |
Bounding Sphere.
An approximate bounding sphere.
Constructer.
points | points to find the bounding sphere for |
cutoff | ignore points beyond this distance from the origin. A negative value indicates there is no cut off distance. |
void bound_sphere::add_b_sphere | ( | const bound_sphere & | b_sphere | ) |
Add a bounding sphere and calculate the new bounding sphere.
b_sphere | bounding sphere to add |
void bound_sphere::add_points | ( | const vector< vec3d > & | points, |
double | cutoff = -1 |
||
) |
Add points and calculate the new bounding sphere.
points | points to add |
cutoff | ignore points beyond this distance from the origin. A negative value indicates there is no cut off distance. |
virtual vec3d bound_sphere::get_centre | ( | ) | const [inline, virtual] |
Centre of the sphere.
double bound_sphere::get_cut_off_cnt | ( | ) | const [inline] |
The number of points excluded by the cut-off distance.
double bound_sphere::get_radius | ( | ) | const [inline] |
Radius of the sphere.
double bound_sphere::get_width | ( | ) | const [inline] |
Width of the points (diameter of the sphere)
void bound_sphere::set_cut_off | ( | double | cutoff | ) |
Set the cut off distance.
cutoff | ignore points beyond this distance from the origin. A negative value indicates there is no cut off distance. |