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