VISH  0.2
Public Types | Public Member Functions | Protected Attributes | Friends
Eagle::BoundingBall Class Reference

Bounding container implemented by a ball. More...

#include </home/werner/origo/vish/ocean/aerie/BoundingBall.hpp>

List of all members.

Public Types

Public Member Functions

Protected Attributes

Friends


Detailed Description

Bounding container implemented by a ball.

See also http://geometryalgorithms.com/Archive/algorithm_0107/algorithm_0107.htm


Member Function Documentation

void Eagle::BoundingBall::expandBall ( const point_t point)

Expand ball by point, using the algorithm http://geometryalgorithms.com/Archive/algorithm_0107/algorithm_0107.htm#fastBall() .

This algorithm is pretty slow (even though it is called fastBall ), as it involves a sqrt() function call and several vector operations. If speed is crucial, better use a BoundingBox to expand by points, and then use a global operation BoundingBox::updateBall() to compute the bounding ball. However, the bounding ball computed this way will be not as tight around the points like a ball built from expandBall() calls.

Note:
If the point is contained int the ball, then the cost of this function is (6add,3mul) operations. If not, then the cost is increased by (1sqrt, 5add, 6mul).
void Eagle::BoundingBall::expandBall ( const BoundingBall B)

Expand a ball by another ball.

Note that this function is not necessarily the fastest.

Todo:
Check whether there is a faster way to implement void BoundingBall::expandBall(const BoundingBall&B)

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