Antiprism 0.23
|
Bounding box. More...
#include <bbox.h>
Public Member Functions | |
bound_box (const vector< vec3d > &points=vector< vec3d >(), double cutoff=-1) | |
Constructer. | |
virtual | ~bound_box () |
Destructor. | |
void | add_points (const vector< vec3d > &points, double cutoff=-1) |
Add points and calculate the new bounding box. | |
void | add_b_box (const bound_box &b_box) |
Add a bounding box and calculate the new bounding box. | |
double | max_width () const |
Maximum width of the box. | |
virtual vec3d | get_centre () const |
Centre of the box. | |
const vec3d & | get_min () const |
Minimum coordinates. | |
const vec3d & | get_max () const |
Maximum coordinates. |
Bounding box.
A bounding box aligned with the coordinate planes.
Constructer.
points | points to find the bounding box for |
cutoff | ignore points beyond this distance from the origin. A negative value indicates there is no cut off distance. |
void bound_box::add_b_box | ( | const bound_box & | b_box | ) |
Add a bounding box and calculate the new bounding box.
b_box | bounding box to add |
void bound_box::add_points | ( | const vector< vec3d > & | points, |
double | cutoff = -1 |
||
) |
Add points and calculate the new bounding box.
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_box::get_centre | ( | ) | const [inline, virtual] |
Centre of the box.
const vec3d& bound_box::get_max | ( | ) | const [inline] |
Maximum coordinates.
const vec3d& bound_box::get_min | ( | ) | const [inline] |
Minimum coordinates.
double bound_box::max_width | ( | ) | const [inline] |
Maximum width of the box.