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;
Vector3 getHalfSize(void) const
Gets the half-size of the box.
const Vector3 & getCenter(void) const
Returns the center point of the sphere.
Vector3 getCenter(void) const
Gets the centre of the box.
Represents a convex volume bounded by planes.
A sphere primitive, mostly used for bounds checking.
float Real
Software floating point type.
bool isNull(void) const
Returns true if the box is null i.e.
Defines a plane in 3D space.
Standard 3-dimensional vector.
Side
The "positive side" of the plane is the half space to which the plane normal points.
PlaneList planes
Publicly accessible plane list, you can modify this direct.
vector< PlaneBoundedVolume >::type PlaneBoundedVolumeList
bool intersects(const AxisAlignedBox &box) const
Intersection test with AABB.
bool intersects(const Sphere &sphere) const
Intersection test with Sphere.
PlaneBoundedVolume(Plane::Side theOutside)
Constructor, determines which side is deemed to be 'outside'.
static std::pair< bool, Real > intersects(const Ray &ray, const Plane &plane)
Ray / plane intersection, returns boolean result and distance.
Real getRadius(void) const
Returns the radius of the sphere.
vector< Plane >::type PlaneList
Side getSide(const Vector3 &rkPoint) const
bool isInfinite(void) const
Returns true if the box is infinite.
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.
Real getDistance(const Vector3 &rkPoint) const
This is a pseudodistance.