Public Types |
typedef Point2< RayScalarType > | PointType |
| The point type.
|
typedef Ray2< RayScalarType, NORM > | RayType |
| The ray type.
|
typedef RayScalarType | ScalarType |
| The scalar type.
|
Public Member Functions |
PointType | ClosestPoint (const PointType &p) const |
void | Flip () |
| flips the ray
|
template<class Q , bool K> |
void | Import (const Ray2< Q, K > &b) |
| importer for different ray types (with any scalar type or normalization beaviour)
|
Ray2< ScalarType, true > & | Normalize () |
| normalizes direction field (returns a Normalized Ray)
|
bool | operator!= (RayType const &p) const |
| Operator to dispare two rays.
|
bool | operator== (RayType const &p) const |
| Operator to compare two rays.
|
PointType | P (const ScalarType t) const |
| calculates the point of parameter t on the ray.
|
ScalarType | Projection (const PointType &p) const |
| Projects a point on the ray.
|
|
Direction() cannot be assigned directly. Use SetDirection() or Set() instead.
|
const PointType & | Direction () const |
PointType & | Origin () |
const PointType & | Origin () const |
void | Set (const PointType &ori, const PointType &dir) |
| sets origin and direction.
|
void | SetDirection (const PointType &dir) |
| sets the direction
|
void | SetOrigin (const PointType &ori) |
| sets the origin
|
|
|
Ray2< ScalarType, false > | operator* (const ScalarType s) const |
Ray2< ScalarType, false > | operator+ (RayType const &p) const |
Ray2< ScalarType, false > | operator- (RayType const &p) const |
Ray2< ScalarType, false > | operator/ (const ScalarType s) const |
|
"Ray2dN r0 = r1" is equivalent to "Ray2dN r0 = r1.Normalize()" if r1 is a Ray2d
|
RayType & | operator= (Ray2< ScalarType,!NORM > const &r) |
| assignment
|
| Ray2 (const Ray2< ScalarType,!NORM > &r) |
| copy constructor that takes opposite beaviour
|
|
|
| Ray2 (const PointType &ori, const PointType &dir) |
| The (origin, direction) constructor.
|
| Ray2 () |
| The empty constructor.
|
Static Public Member Functions |
template<class Q , bool K> |
static RayType | Construct (const Ray2< Q, K > &b) |
| constructs a new ray importing it from an existing one
|
static bool | IsNormalized () |
| returns wheter this type is normalized or not
|
static Ray2< ScalarType, true > & | Normalize (RayType &p) |
| normalizes direction field (returns a Normalized Ray) - static version
|
Private Attributes |
PointType | _dir |
| Direction (not necessarily normalized, unless so specified by NORM).
|
PointType | _ori |
| Origin.
|
Templated class for 3D rays. This is the class for infinite rays in 3D space. A Ray is stored just as two Point3: an origin and a direction (not necessarily normalized).
template<class RayScalarType, bool NORM = false>
template<class Q , bool K>
void vcg::Ray2< RayScalarType, NORM >::Import |
( |
const Ray2< Q, K > & |
b |
) |
[inline] |
importer for different ray types (with any scalar type or normalization beaviour)
Definition at line 125 of file ray2.h.