82 float *iTime,
Point3 *iPoint)
const;
91 float *iTime,
Point3 *iPoint)
const;
100 float *iTime,
Point3 *iPoint)
const;
107 float *iTime,
Point3 *iPoint)
const;
115 Point3 *iPoint,
int *iTriangleID)
const;
127 Point3 *iPoint,
int *iTriangleID)
const;
A 3D axis-aligned bounding box defined by two corners (min and max).
A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
Stores the mathematical object of a ray that begins at an origin (a 3D point) and points in a directi...
bool IntersectTriangle(const Point3 &v1, const Point3 &v2, const Point3 &v3, float *iTime, Point3 *iPoint) const
Checks to see if the ray intersects a triangle defined by the vertices v1, v2, and v3.
Point3 origin() const
Returns the origin.
bool IntersectQuad(const Point3 &v1, const Point3 &v2, const Point3 &v3, const Point3 &v4, float *iTime, Point3 *iPoint) const
Checks to see if the ray intersects a quad defined by the vertices v1, v2, v3, and v4.
float Length() const
Returns the length of the direction vector.
bool IntersectAABB(const AABB &box, float *iTime) const
Checks to see if the ray intersects an AABB (Axis-Aligned Bounding Box).
void set(Point3 newOrigin, Vector3 newDir)
Sets a new origin and direction.
bool IntersectMesh(const Mesh &mesh, float *iTime, Point3 *iPoint, int *iTriangleID) const
Checks to see if the ray intersects a triangle mesh.
Vector3 direction() const
Returns the direction.
bool IntersectPlane(const Point3 &planePt, const Vector3 &planeNormal, float *iTime, Point3 *iPoint) const
Checks to see if the ray intersects a plane defined by a point and a normal.
bool operator==(const Ray &other) const
Check for "equality", taking floating point imprecision into account.
bool IntersectSphere(const Point3 ¢er, float radius, float *iTime, Point3 *iPoint) const
Checks to see if the ray intersects a sphere defined by a center point and a radius.
Ray(const Point3 &origin, const Vector3 &direction)
Creates a ray from a 3D origin and direction.
bool operator!=(const Ray &other) const
Check for "inequality", taking floating point imprecision into account.
virtual ~Ray()
Ray destructor.
bool FastIntersectMesh(Mesh *mesh, float *iTime, Point3 *iPoint, int *iTriangleID) const
Checks to see if the ray intersects a triangle mesh.
Ray()
Defaults to a ray at the origin and pointing in the -Z direction.
A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
Namespace for the MinGfx Toolkit.
std::ostream & operator<<(std::ostream &os, const Color &c)
std::istream & operator>>(std::istream &is, Color &c)