52#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_RAY_2D_H
53#define LASS_GUARDIAN_OF_INCLUSION_PRIM_RAY_2D_H
81 typedef Ray2D<T, NormalizingPolicy, ParameterPolicy> TSelf;
82 typedef NormalizingPolicy TNormalizingPolicy;
83 typedef ParameterPolicy TParameterPolicy;
85 typedef Point2D<T> TPoint;
86 typedef typename TPoint::TVector TVector;
88 typedef typename TPoint::TValue TValue;
89 typedef typename TPoint::TParam TParam;
90 typedef typename TPoint::TReference TReference;
91 typedef typename TPoint::TConstReference TConstReference;
92 typedef typename TPoint::TNumTraits TNumTraits;
94 enum { dimension = TPoint::dimension };
96 template <
typename U>
struct Rebind
98 typedef Ray2D<U, NormalizingPolicy, ParameterPolicy> Type;
104 Ray2D(
const TPoint& iSupport,
const TVector& iDirection);
105 Ray2D(
const TPoint& iSupport,
const TPoint& iLookAt);
116 const TPoint
point(TParam a_t)
const;
117 const TValue
t(
const TPoint& iPoint)
const;
118 const TVector
project(
const TVector& iVector)
const;
119 const TVector
reject(
const TVector& iVector)
const;
120 const TVector
reflect(
const TVector& iVector)
const;
121 const TPoint
project(
const TPoint& iPoint)
const;
122 const TVector
reject(
const TPoint& iPoint)
const;
123 const TPoint
reflect(
const TPoint& iPoint)
const;
137template<
typename T,
class NP,
class PP>
138std::ostream& operator<<(std::ostream& oOStream,
const Ray2D<T, NP, PP>& iB);
140template<
typename T,
class NP,
class PP>
151#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_2D_H
155#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_LINE_2D_H
159#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_LINE_SEGMENT_2D_H
163#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_SIMPLE_POLYGON_2D_H
167#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_TRIANGLE_2D_H
Output stream for writing a selection of geometric primitives to XML files.
const TPoint point(TParam a_t) const
Return point on ray by it's parameter.
const TVector reflect(const TVector &iVector) const
Reflect vector against the axis of the ray.
bool isValid() const
Return true if ray is valid (direction isn't a zero vector).
const TVector reject(const TPoint &iPoint) const
Reject point against the axis of the ray.
TPoint & support()
access origin of ray the origin is also the support point of the ray.
const TVector project(const TVector &iVector) const
Project vector on the axis of the ray.
const TPoint project(const TPoint &iPoint) const
Project point on the axis of the ray.
void lookAt(const TPoint &iLookAt)
Set direction from origin to look-at point.
void setDirection(const TVector &iDirection)
Set direction and normalize it if that's the policy.
const TVector & direction() const
Return direction of ray.
const TPoint reflect(const TPoint &iPoint) const
Reject point against the axis of the ray.
const TValue t(const TPoint &iPoint) const
Return parameter of point on the ray that is the projection of the given point.
const TPoint & support() const
return origin of ray.
Side classify(const TPoint &iPoint) const
Return on what side a point is located.
const TVector reject(const TVector &iVector) const
Reject vector against the axis of the ray.
#define LASS_SIMD_ALIGN
if LASS_SIMD_ALIGNMENT is set, use LASS_SIMD_ALIGN to align some structures on SIMD alignment boundar...
set of geometrical primitives
Side
Different sides of a surface.
Library for Assembled Shared Sources.
Parameters supplied to functions must be in the range of the primitive.
Policy to auto-normalize normals.