35 #include "ParaVector3.h" 36 #include "ParaPlaneBoundedVolume.h" 47 Ray():mOrigin(Vector3::ZERO), mDirection(Vector3::UNIT_Z) {}
49 :mOrigin(origin), mDirection(direction) {}
63 return Vector3(mOrigin + (mDirection * t));
std::pair< bool, float > intersects(const PlaneBoundedVolume &p) const
Tests whether this ray intersects the given plane bounded volume.
Definition: ParaRay.h:87
different physics engine has different winding order.
Definition: EventBinding.h:32
std::pair< bool, float > intersects(const Plane &p) const
Tests whether this ray intersects the given plane.
Definition: ParaRay.h:77
static std::pair< bool, float > intersects(const Ray &ray, const Plane &plane)
Ray / plane intersection, returns boolean result and distance.
Definition: ParaMath.cpp:316
std::pair< bool, float > intersects(const Sphere &s) const
Tests whether this ray intersects the given sphere.
Definition: ParaRay.h:97
A sphere primitive, mostly used for bounds checking.
Definition: ParaSphere.h:46
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
Vector3 getPoint(float t) const
Gets the position of a point t units along the ray.
Definition: ParaRay.h:62
std::pair< bool, float > intersects(const AxisAlignedBox &box) const
Tests whether this ray intersects the given box.
Definition: ParaRay.h:107
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
const Vector3 & getOrigin(void) const
Gets the origin of the ray.
Definition: ParaRay.h:54
const Vector3 & getDirection(void) const
Gets the direction of the ray.
Definition: ParaRay.h:59
void setDirection(const Vector3 &dir)
Sets the direction of the ray.
Definition: ParaRay.h:57
Vector3 operator*(float t) const
Gets the position of a point t units along the ray.
Definition: ParaRay.h:67
A 3D box aligned with the x/y/z axes.
Definition: ParaAxisAlignedBox.h:16
void setOrigin(const Vector3 &origin)
Sets the origin of the ray.
Definition: ParaRay.h:52
PlaneList planes
Publicly accessible plane list, you can modify this direct.
Definition: ParaPlaneBoundedVolume.h:48