29 #ifndef __PlaneBoundedVolume_H_ 30 #define __PlaneBoundedVolume_H_ 33 #include "ParaEngine.h" 34 #include "ParaAxisAlignedBox.h" 35 #include "ParaSphere.h" 37 #include "ParaPlane.h" 46 typedef std::vector<Plane> PlaneList;
54 : outside(theOutside) {}
61 if (box.
isNull())
return false;
69 PlaneList::const_iterator i, iend;
71 for (i = planes.begin(); i != iend; ++i)
73 const Plane& plane = *i;
92 PlaneList::const_iterator i, iend;
94 for (i = planes.begin(); i != iend; ++i)
96 const Plane& plane = *i;
101 if (outside == Plane::NEGATIVE_SIDE) d = -d;
122 typedef std::vector<PlaneBoundedVolume> PlaneBoundedVolumeList;
float getRadius(void) const
Returns the radius of the sphere.
Definition: ParaSphere.h:62
bool isInfinite(void) const
Returns true if the box is infinite.
Definition: ParaAxisAlignedBox.cpp:242
different physics engine has different winding order.
Definition: EventBinding.h:32
static std::pair< bool, float > intersects(const Ray &ray, const Plane &plane)
Ray / plane intersection, returns boolean result and distance.
Definition: ParaMath.cpp:316
bool intersects(const Sphere &sphere) const
Intersection test with Sphere.
Definition: ParaPlaneBoundedVolume.h:90
const Vector3 & getCenter(void) const
Returns the center point of the sphere.
Definition: ParaSphere.h:68
float getDistance(const Vector3 &rkPoint) const
This is a pseudo distance.
Definition: ParaPlane.cpp:50
A sphere primitive, mostly used for bounds checking.
Definition: ParaSphere.h:46
bool intersects(const AxisAlignedBox &box) const
Intersection test with AABB.
Definition: ParaPlaneBoundedVolume.h:59
Vector3 getCenter(void) const
Gets the centre of the box.
Definition: ParaAxisAlignedBox.cpp:105
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
Side
The "positive side" of the plane is the half space to which the plane normal points.
Definition: ParaPlane.h:32
std::pair< bool, float > intersects(const Ray &ray)
Intersection test with a Ray.
Definition: ParaPlaneBoundedVolume.h:115
PlaneBoundedVolume(Plane::Side theOutside)
Constructor, determines which side is deemed to be 'outside'.
Definition: ParaPlaneBoundedVolume.h:53
Representation of a ray in space, i.e.
Definition: ParaRay.h:41
Defines a plane in 3D space.
Definition: ParaPlane.h:23
Represents a convex volume bounded by planes.
Definition: ParaPlaneBoundedVolume.h:43
bool isNull(void) const
Returns true if the box is null i.e.
Definition: ParaAxisAlignedBox.cpp:257
A 3D box aligned with the x/y/z axes.
Definition: ParaAxisAlignedBox.h:16
PlaneList planes
Publicly accessible plane list, you can modify this direct.
Definition: ParaPlaneBoundedVolume.h:48
Vector3 getHalfSize(void) const
Gets the half-size of the box.
Definition: ParaAxisAlignedBox.cpp:61