#include <eng_volume.hh>

Public Member Functions | |
| Volume (void) | |
| virtual | ~Volume () |
| virtual SphereVolume | ToSphereVolume (void) const =0 |
| virtual BoxVolume | ToBoxVolume (void) const =0 |
| virtual bool | IfInside (const Vector3 &v) const =0 |
| virtual bool | IfInside (const Volume &volume) const =0 |
| |
| virtual bool | IfOutside (const Volume &volume) const =0 |
| |
| virtual Vector3 | GetPosition (void) const =0 |
| virtual void | SetPosition (const Vector3 &position)=0 |
| virtual bool | IfOutside (const Vector3 &v) const |
| virtual bool | IfIntersecting (const Volume &volume) const |
| |
The base Volume class is abstract and space-neutral. Derivatives are:
Unlike the Vector3 variants, the Volume variants of IfInside()/IfOutside() aren't exact opposites. "not IfInside(Volume)" might be either outside or intersecting.
Collision-detection can be performed by Volume::IfOutside(Volume&). If IfOutside() returns false, the other volume is either inside or intersecting.
The reason for the abstract method operator SphereVolume() is so that an implementation of Volume::IfInside/IfOutside(Volume&) can convert the abstract Volume arg into a concrete SphereVolume. SphereVolume serves as a LCD.
Only having Volume::operator SphereVolume() would've inefficiently caused BoxVolume(volume) to convert box to a sphere then back to a box. Volume::operator BoxVolume() added which just does a copy.
Grow() omitted since it's N/A to BSPVolume.
| eng::Volume::Volume | ( | void | ) | [inline] |
| virtual eng::Volume::~Volume | ( | ) | [inline, virtual] |
| virtual SphereVolume eng::Volume::ToSphereVolume | ( | void | ) | const [pure virtual] |
Implemented in eng::SphereVolume, and eng::BoxVolume.
| virtual BoxVolume eng::Volume::ToBoxVolume | ( | void | ) | const [pure virtual] |
Implemented in eng::SphereVolume, and eng::BoxVolume.
| virtual bool eng::Volume::IfInside | ( | const Vector3 & | v | ) | const [pure virtual] |
Implemented in eng::SphereVolume, and eng::BoxVolume.
| virtual bool eng::Volume::IfInside | ( | const Volume & | volume | ) | const [pure virtual] |
Implemented in eng::SphereVolume, and eng::BoxVolume.
| virtual bool eng::Volume::IfOutside | ( | const Volume & | volume | ) | const [pure virtual] |
Implemented in eng::SphereVolume, and eng::BoxVolume.
| virtual Vector3 eng::Volume::GetPosition | ( | void | ) | const [pure virtual] |
Implemented in eng::SphereVolume, and eng::BoxVolume.
| virtual void eng::Volume::SetPosition | ( | const Vector3 & | position | ) | [pure virtual] |
Implemented in eng::SphereVolume, and eng::BoxVolume.
| virtual bool eng::Volume::IfOutside | ( | const Vector3 & | v | ) | const [inline, virtual] |
Reimplemented in eng::SphereVolume, and eng::BoxVolume.
| virtual bool eng::Volume::IfIntersecting | ( | const Volume & | volume | ) | const [inline, virtual] |
Reimplemented in eng::BoxVolume.
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:25 2007