A geometric primitive representing a sphere by its radius and center point, and a collection of sphere-related utility methods.
More...
|
| | Sphere_ () |
| | Construct an uninitialized Sphere object; the center point and radius will be garbage.
|
| |
| | Sphere_ (const Vec3P ¢er, RealP radius) |
| | Construct a sphere from its center location and radius.
|
| |
| Sphere_ & | setRadius (RealP radius) |
| | Change the radius of this sphere.
|
| |
| Sphere_ & | setCenter (const Vec3P ¢er) |
| | Change the center location of this sphere.
|
| |
| Sphere_ & | scaleBy (RealP f) |
| | Modify this sphere to scale its radius by a fractional amount f, that is we set radius to f*radius.
|
| |
| Sphere_ & | stretchBoundary () |
| | Stretch this sphere in place by a small amount to ensure that there will be no roundoff problems if this is used as a bounding sphere.
|
| |
| RealP | findVolume () const |
| | Return the volume of this sphere (4/3 pi r^3).
|
| |
| RealP | findArea () const |
| | Return the surface area of this sphere (4 pi r^2).
|
| |
| bool | isPointOutside (const Vec3P &p) const |
| | Return true if a given point is strictly outside this sphere.
|
| |
| bool | isPointOutside (const Vec3P &p, RealP tol) const |
| | Return true if a given point is more than a given tolerance outside the sphere.
|
| |
| const Vec3P & | getCenter () const |
| | Get the location of the sphere's center point.
|
| |
| Vec3P & | updCenter () |
| | Get a writable reference to the sphere's center point.
|
| |
| RealP | getRadius () const |
| | Get the sphere's radius.
|
| |
| RealP & | updRadius () |
| | Get a writable reference to the sphere's radius.
|
| |
template<class P>
class SimTK::Geo::Sphere_< P >
A geometric primitive representing a sphere by its radius and center point, and a collection of sphere-related utility methods.
Stretch this sphere in place by a small amount to ensure that there will be no roundoff problems if this is used as a bounding sphere.
The amount to stretch depends on the default tolerance for this precision, the radius, and the position of the sphere in space. A very large sphere, or a sphere that is very far from the origin, must be stretched more than a small one at the origin. Cost is 6 flops.
- See also
- Geo class for tolerance information.