Object3d of type (infinite) Plane (position+normal). Analytically compute intersection with a ray. More...
Public Member Functions | |
plane () | |
empty constructor | |
plane (const v3 &x0, const v3 &n) | |
direct constructor (position+normal) | |
virtual | ~plane () |
destructor | |
const v3 & | normal () const |
get the normal of the plane | |
const v3 & | position () const |
get the position of the plane | |
virtual std::vector < intersection_data > | intersect (const ray &seg) const |
Analytic intersection between a ray and the plane. | |
Private Attributes | |
const v3 | x0 |
internal position of the plane (not unique for a given plane) | |
const v3 | n |
internal normal of the plane |
Object3d of type (infinite) Plane (position+normal). Analytically compute intersection with a ray.
empty constructor
cpe::plane::plane | ( | const v3 & | x0, |
const v3 & | n | ||
) |
direct constructor (position+normal)
cpe::plane::~plane | ( | ) | [virtual] |
destructor
std::vector< intersection_data > cpe::plane::intersect | ( | const ray & | seg | ) | const [virtual] |
Analytic intersection between a ray and the plane.
Implements cpe::object3d.
References cpe::v3::dot(), n, cpe::ray::u(), cpe::ray::x0(), and x0.
const v3 & cpe::plane::normal | ( | ) | const |
get the normal of the plane
References n.
const v3 & cpe::plane::position | ( | ) | const |
get the position of the plane
References x0.
const v3 cpe::plane::n [private] |
internal normal of the plane
Referenced by intersect(), and normal().
const v3 cpe::plane::x0 [private] |
internal position of the plane (not unique for a given plane)
Referenced by intersect(), and position().