28 #ifndef __PlaneBoundedVolume_H_
29 #define __PlaneBoundedVolume_H_
60 : outside(theOutside) {}
67 if (box.
isNull())
return false;
75 PlaneList::const_iterator i, iend;
77 for (i = planes.begin(); i != iend; ++i)
79 const Plane& plane = *i;
98 PlaneList::const_iterator i, iend;
100 for (i = planes.begin(); i != iend; ++i)
102 const Plane& plane = *i;
Real getRadius(void) const
Returns the radius of the sphere.
bool intersects(const AxisAlignedBox &box) const
Intersection test with AABB.
bool isNull(void) const
Returns true if the box is null i.e.
Represents a convex volume bounded by planes.
A sphere primitive, mostly used for bounds checking.
float Real
Software floating point type.
Side getSide(const Vector3 &rkPoint) const
Defines a plane in 3D space.
Real getDistance(const Vector3 &rkPoint) const
This is a pseudodistance.
Standard 3-dimensional vector.
const Vector3 & getCenter(void) const
Returns the center point of the sphere.
bool intersects(const Sphere &sphere) const
Intersection test with Sphere.
Vector3 getCenter(void) const
Gets the centre of the box.
PlaneList planes
Publicly accessible plane list, you can modify this direct.
vector< PlaneBoundedVolume >::type PlaneBoundedVolumeList
PlaneBoundedVolume(Plane::Side theOutside)
Constructor, determines which side is deemed to be 'outside'.
bool isInfinite(void) const
Returns true if the box is infinite.
Side
The "positive side" of the plane is the half space to which the plane normal points.
static std::pair< bool, Real > intersects(const Ray &ray, const Plane &plane)
Ray / plane intersection, returns boolean result and distance.
vector< Plane >::type PlaneList
Vector3 getHalfSize(void) const
Gets the half-size of the box.
A 3D box aligned with the x/y/z axes.
std::pair< bool, Real > intersects(const Ray &ray)
Intersection test with a Ray.
Representation of a ray in space, i.e.