KrisLibrary  1.0.0
Ray3D.h
1 #ifndef MATH3D_RAY3D_H
2 #define MATH3D_RAY3D_H
3 
4 #include "Line3D.h"
5 
6 namespace Math3D {
7 
8 struct Ray3D : public Line3D
9 {
10  Real closestPoint(const Point3D& in, Point3D& out) const;
11  Real distance(const Point3D& pt) const;
12  bool intersects(const Line3D&, Real* t=NULL, Real* u=NULL, Real epsilon=0) const; //t is the parameter of this ray, u is the line
13  bool intersects(const Ray3D&, Real* t=NULL, Real* u=NULL, Real epsilon=0) const; //t is the parameter of this ray, u is the other ray
14  bool intersects(const AABB3D&, Real& tmin, Real& tmax) const;
15  void closestPoint(const Line3D&,Real& t,Real& u) const; //same comment as above
16  void closestPoint(const Ray3D&,Real& t,Real& u) const; //same comment as above
17  Real distance(const AABB3D& bb) const;
18  Real distance(const AABB3D& bb, Real& tclosest, Vector3& bbclosest) const;
19 };
20 
21 
22 } //namespace Math3D
23 
24 #endif
A 3D vector class.
Definition: math3d/primitives.h:136
A 3D axis-aligned bounding box.
Definition: AABB3D.h:13
Contains all the definitions in the Math3D package.
Definition: AnyGeometry.h:13
A 3D line class.
Definition: Line3D.h:18
Definition: Ray3D.h:8