43#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_LINE_SEGMENT_3D_PLANE_3D_H
44#define LASS_GUARDIAN_OF_INCLUSION_PRIM_LINE_SEGMENT_3D_PLANE_3D_H
72template<
typename T,
class EPPlane,
class NPPlane,
class PPRay>
77 typedef typename Vector3D<T>::TValue TValue;
78 typedef typename Vector3D<T>::TNumTraits TNumTraits;
85 const TValue eTail = plane.
equation(lineSegment.tail());
86 const TValue eHead = plane.
equation(lineSegment.head());
95 const TValue tCandidate = eTail / (eTail - eHead);
96 if (tCandidate >= TNumTraits::zero && tCandidate <= TNumTraits::one)
113template <
typename T,
class EP,
class NP,
class PP>
128template <
typename T,
class EP,
class NP,
class PP>
Result intersect(const Plane3D< T, EPPlane, NPPlane > &plane, const LineSegment3D< T, PPRay > &lineSegment, T &t)
Find the intersection of a plane and line segment by their parameter t on the ray.
const TValue t(const TPoint &iPoint) const
LineSegment3D< T, PP > reflect(const Plane3D< T, EP, NP > &plane, const LineSegment3D< T, PP > &lineSegment)
reflect a linesegment in a plane.
LineSegment3D< T, PP > project(const Plane3D< T, EP, NP > &plane, const LineSegment3D< T, PP > &lineSegment)
project a linesegment on a plane.
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
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.