Antiprism 0.23
Public Member Functions

bound_box Class Reference

Bounding box. More...

#include <bbox.h>

Collaboration diagram for bound_box:
Collaboration graph
[legend]

List of all members.

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 vec3dget_min () const
 Minimum coordinates.
const vec3dget_max () const
 Maximum coordinates.

Detailed Description

Bounding box.

A bounding box aligned with the coordinate planes.


Constructor & Destructor Documentation

bound_box::bound_box ( const vector< vec3d > &  points = vector<vec3d>(),
double  cutoff = -1 
)

Constructer.

Parameters:
pointspoints to find the bounding box for
cutoffignore points beyond this distance from the origin. A negative value indicates there is no cut off distance.

Member Function Documentation

void bound_box::add_b_box ( const bound_box b_box)

Add a bounding box and calculate the new bounding box.

Parameters:
b_boxbounding box to add
void bound_box::add_points ( const vector< vec3d > &  points,
double  cutoff = -1 
)

Add points and calculate the new bounding box.

Parameters:
pointspoints to add
cutoffignore 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.

Returns:
The centre coordinates
const vec3d& bound_box::get_max ( ) const [inline]

Maximum coordinates.

Returns:
The maximum coordinates, at right top front corner
const vec3d& bound_box::get_min ( ) const [inline]

Minimum coordinates.

Returns:
The minimum coordinates, at left bottom back corner
double bound_box::max_width ( ) const [inline]

Maximum width of the box.

Returns:
The length of a diagonal

The documentation for this class was generated from the following files: