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 & | Origin () const |
| PointType & | Origin () |
| const PointType & | Direction () const |
| void | SetOrigin (const PointType &ori) |
| | sets the origin
|
| void | SetDirection (const PointType &dir) |
| | sets the direction
|
| void | Set (const PointType &ori, const PointType &dir) |
| | sets origin and direction.
|
|
| | Ray2 () |
| | The empty constructor.
|
| | Ray2 (const PointType &ori, const PointType &dir) |
| | The (origin, direction) constructor.
|
|
| Ray2< ScalarType, false > | operator+ (RayType const &p) const |
| Ray2< ScalarType, false > | operator- (RayType const &p) const |
| Ray2< ScalarType, false > | operator* (const ScalarType s) const |
| Ray2< ScalarType, false > | operator/ (const ScalarType s) const |
|
"Ray2dN r0 = r1" is equivalent to "Ray2dN r0 = r1.Normalize()" if r1 is a Ray2d
|
| | Ray2 (const Ray2< ScalarType,!NORM > &r) |
| | copy constructor that takes opposite beaviour
|
| RayType & | operator= (Ray2< ScalarType,!NORM > const &r) |
| | assignment
|
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.
|
template<class RayScalarType, bool NORM = false>
class vcg::Ray2< RayScalarType, NORM >
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).
- Parameters:
-
| RayScalarType | (template parameter) Specifies the type of scalar used to represent coords. |
| NORM,: | if on, the direction is always Normalized |
Definition at line 49 of file ray2.h.