|
ACF $AcfVersion:0$
|
Definition of a sphere in 3D space. More...
#include <CSphere.h>
Public Member Functions | |
| CSphere () | |
| Default constructor. | |
| CSphere (double radius, const CVector3d ¢er) | |
| Construct sphere from radius and center. | |
| double | GetRadius () const |
| Get radius of the sphere. | |
| void | SetRadius (double radius) |
| Set radius of the sphere. | |
| const CVector3d & | GetCenter () const |
| Get center of the sphere. | |
| void | SetCenter (const CVector3d ¢er) |
| Set center of the sphere. | |
| double | GetVolume () const |
| Calculate volume of the sphere. | |
| double | GetSurfaceArea () const |
| Calculate surface area of the sphere. | |
| bool | Contains (const CVector3d &point, double tolerance=0.0) const |
| Check if point is inside the sphere. | |
| bool | Intersects (const CSphere &other) const |
| Check if this sphere intersects another sphere. | |
| bool | Intersects (const CLine3d &line) const |
| Check if this sphere intersects a line segment. | |
| double | GetSignedDistance (const CVector3d &point) const |
| Get distance from sphere surface to point. | |
| CVector3d | GetClosestPoint (const CVector3d &point) const |
| Get closest point on sphere surface to given point. | |
| bool | Serialize (iser::IArchive &archive) |
| Serialize this sphere to specified archive. | |
| bool | operator== (const CSphere &sphere) const |
| bool | operator!= (const CSphere &sphere) const |
Definition of a sphere in 3D space.
Sphere is stored as center position and radius.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool i3d::CSphere::Intersects | ( | const CLine3d & | line | ) | const |
Check if this sphere intersects a line segment.
|
inline |
|
inline |
|
inline |
Definition at line 188 of file CSphere.h.
References I_BIG_EPSILON.
| bool i3d::CSphere::Serialize | ( | iser::IArchive & | archive | ) |
Serialize this sphere to specified archive.
|
inline |
|
inline |