28#ifndef __PlaneBoundedVolume_H_
29#define __PlaneBoundedVolume_H_
68 if (
box.isInfinite())
return true;
75 PlaneList::const_iterator
i,
iend;
77 for (
i = planes.begin();
i !=
iend; ++
i)
98 PlaneList::const_iterator
i,
iend;
100 for (
i = planes.begin();
i !=
iend; ++
i)
107 if (outside == Plane::NEGATIVE_SIDE) d = -d;
109 if ( (d -
sphere.getRadius()) > 0)
123 return Math::intersects(
ray, planes, outside == Plane::POSITIVE_SIDE);
A 3D box aligned with the x/y/z axes.
Represents a convex volume bounded by planes.
PlaneBoundedVolume(Plane::Side theOutside)
Constructor, determines which side is deemed to be 'outside'.
PlaneList planes
Publicly accessible plane list, you can modify this direct.
bool intersects(const Sphere &sphere) const
Intersection test with Sphere.
std::pair< bool, Real > intersects(const Ray &ray)
Intersection test with a Ray.
bool intersects(const AxisAlignedBox &box) const
Intersection test with AABB.
vector< Plane >::type PlaneList
Defines a plane in 3D space.
Side getSide(const Vector3 &rkPoint) const
Real getDistance(const Vector3 &rkPoint) const
This is a pseudodistance.
Side
The "positive side" of the plane is the half space to which the plane normal points.
Representation of a ray in space, i.e.
Reference-counted shared pointer, used for objects where implicit destruction is required.
A sphere primitive, mostly used for bounds checking.
Standard 3-dimensional vector.
vector< PlaneBoundedVolume >::type PlaneBoundedVolumeList