Antiprism 0.23

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# bound_sphere Class Reference

Bounding Sphere. More...

`#include <bbox.h>`

Collaboration diagram for bound_sphere:
[legend]

List of all members.

## 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.

## Detailed Description

Bounding Sphere.

An approximate bounding sphere.

## Constructor & Destructor Documentation

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

Constructer.

Parameters:

  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.

## Member Function Documentation

void bound_sphere::add_b_sphere | ( | const bound_sphere & | b_sphere | ) |

Add a bounding sphere and calculate the new bounding sphere.

Parameters:

  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.

Parameters:

  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.

Returns:
  The centre coordinates

double bound_sphere::get_cut_off_cnt | ( |  | ) | const`[inline]`

The number of points excluded by the cut-off distance.

Returns:
  The number of points cut off

double bound_sphere::get_radius | ( |  | ) | const`[inline]`

Radius of the sphere.

Returns:
  The radius

double bound_sphere::get_width | ( |  | ) | const`[inline]`

Width of the points (diameter of the sphere)

Returns:
  The width

void bound_sphere::set_cut_off | ( | double | cutoff | ) |

Set the cut off distance.

Parameters:

  cutoff | ignore points beyond this distance from the origin. A negative value indicates there is no cut off distance.

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

- base/bbox.h
- base/bbox.cc