43#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_PLANE_3D_RAY_3D_H
44#define LASS_GUARDIAN_OF_INCLUSION_PRIM_PLANE_3D_RAY_3D_H
73template<
typename T,
class EPPlane,
class NPPlane,
class NPRay,
class PPRay>
76 T&
t,
const T& tMin = T())
78 typedef typename Vector3D<T>::TValue TValue;
79 typedef typename Vector3D<T>::TNumTraits TNumTraits;
80 typedef num::Consistent<T> TConsistent;
87 const TValue nd = dot(plane.normal(), ray.
direction());
88 if (nd == TNumTraits::zero)
98 LASS_ASSERT(!num::isNaN(tCanidate));
101 t = tCanidate.value();
Side classify(const TPoint &iPoint) const
Return on what side a point is located.
const TVector & direction() const
Return direction of ray.
const TPoint & support() const
return origin of ray.
Result intersect(const Plane3D< T, EPPlane, NPPlane > &plane, const Ray3D< T, NPRay, PPRay > &ray, T &t, const T &tMin=T())
Find the intersection of a plane and ray by their parameter t on the ray.
bool isValid() const
Return true if ray is valid (direction isn't a zero vector).
const TValue t(const TPoint &iPoint) const
const TValue equation(const TPoint &iPoint) const
Return value of point in equation.
bool isValid() const
return true if plane is a valid plane (no normal or direction vectors that are zero).
set of geometrical primitives
Side
Different sides of a surface.
@ sFront
in front of the surface
@ sBack
in back of the surface
@ sSurface
right on the surface
Result
meta information on the result you have from an operation like an intersection ...
@ rInfinite
there are infinite many solutions, output arguments are meaningless
@ rInvalid
0 is an invalid value, nothing is known.
@ rNone
operation has no answer, output arguments are meaningless
@ rOne
there's exactly one answer, 1 output argument contains the answer
Library for Assembled Shared Sources.