27 float SquareDistance(
const Point& point,
float*
t=
null)
const;
36 reflected = incoming_dir - outward_normal * 2.0f * (incoming_dir|outward_normal);
41 Point V = impact - source;
42 reflected = V - normal * 2.0f * (V|normal);
47 normal_compo = outward_normal * (outward_dir|outward_normal);
48 tangent_compo = outward_dir - normal_compo;
80 local_pt = world_pt * InvWorld;
98 #endif // __ICERAY_H__
Point mDir
Normalized direction.
#define null
our own NULL pointer
inline_ Ray()
Constructor.
inline_ Ray(const Point &orig, const Point &dir)
Constructor.
inline_ void ComputeLocalDirection(Point &local_dir, const Point &world_dir, const Matrix4x4 &world)
inline_ void ComputeReflexionVector(Point &reflected, const Point &incoming_dir, const Point &outward_normal)
inline_ void ComputeLocalRay(Ray &local_ray, const Ray &world_ray, const Matrix4x4 &world)
inline_ void ComputeLocalPoint(Point &local_pt, const Point &world_pt, const Matrix4x4 &world)
Matrix4x4 & Invert()
Inverts the matrix. Determinant must be different from zero, else matrix can't be inverted...
inline_ Ray(const Ray &ray)
Copy constructor.
inline_ float Distance(const Point &point, float *t=null) const
inline_ void DecomposeVector(Point &normal_compo, Point &tangent_compo, const Point &outward_dir, const Point &outward_normal)
inline_ ~Ray()
Destructor.