Open CASCADE Technology
6.5.4
|
The class Direction specifies a vector that is never null.
It is a unit vector.
#include <Geom_Direction.hxx>
Public Member Functions | |
Geom_Direction (const Standard_Real X, const Standard_Real Y, const Standard_Real Z) | |
Creates a unit vector with it 3 cartesian coordinates. Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp. | |
Geom_Direction (const gp_Dir &V) | |
Creates a transient copy of <me>. | |
void | SetCoord (const Standard_Real X, const Standard_Real Y, const Standard_Real Z) |
Sets <me> to X,Y,Z coordinates. Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp. | |
void | SetDir (const gp_Dir &V) |
Converts the gp_Dir unit vector V into this unit vector. | |
void | SetX (const Standard_Real X) |
Changes the X coordinate of <me>. Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp. | |
void | SetY (const Standard_Real Y) |
Changes the Y coordinate of <me>. Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp. | |
void | SetZ (const Standard_Real Z) |
Changes the Z coordinate of <me>. Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp. | |
gp_Dir | Dir () const |
Returns the non transient direction with the same coordinates as <me>. | |
Standard_Real | Magnitude () const |
returns 1.0 which is the magnitude of any unit vector. | |
Standard_Real | SquareMagnitude () const |
returns 1.0 which is the square magnitude of any unit vector. | |
void | Cross (const Handle< Geom_Vector > &Other) |
Computes the cross product between <me> and <Other>. Raised if the two vectors are parallel because it is not possible to have a direction with null length. | |
void | CrossCross (const Handle< Geom_Vector > &V1, const Handle< Geom_Vector > &V2) |
Computes the triple vector product <me> ^(V1 ^ V2). Raised if V1 and V2 are parallel or <me> and (V1 ^ V2) are parallel | |
Handle_Geom_Vector | Crossed (const Handle< Geom_Vector > &Other) const |
Computes the cross product between <me> and <Other>. A new direction is returned. Raised if the two vectors are parallel because it is not possible to have a direction with null length. | |
Handle_Geom_Vector | CrossCrossed (const Handle< Geom_Vector > &V1, const Handle< Geom_Vector > &V2) const |
Computes the triple vector product <me> ^(V1 ^ V2). Raised if V1 and V2 are parallel or <me> and (V1 ^ V2) are parallel | |
void | Transform (const gp_Trsf &T) |
Applies the transformation T to this unit vector, then normalizes it. | |
Handle_Geom_Geometry | Copy () const |
Creates a new object which is a copy of this unit vector. |
Geom_Direction::Geom_Direction | ( | const Standard_Real | X, |
const Standard_Real | Y, | ||
const Standard_Real | Z | ||
) |
Handle_Geom_Geometry Geom_Direction::Copy | ( | ) | const [virtual] |
Implements Geom_Geometry.
void Geom_Direction::Cross | ( | const Handle< Geom_Vector > & | Other | ) | [virtual] |
Implements Geom_Vector.
void Geom_Direction::CrossCross | ( | const Handle< Geom_Vector > & | V1, |
const Handle< Geom_Vector > & | V2 | ||
) | [virtual] |
Implements Geom_Vector.
Handle_Geom_Vector Geom_Direction::CrossCrossed | ( | const Handle< Geom_Vector > & | V1, |
const Handle< Geom_Vector > & | V2 | ||
) | const [virtual] |
Implements Geom_Vector.
Handle_Geom_Vector Geom_Direction::Crossed | ( | const Handle< Geom_Vector > & | Other | ) | const [virtual] |
Implements Geom_Vector.
gp_Dir Geom_Direction::Dir | ( | ) | const |
Standard_Real Geom_Direction::Magnitude | ( | ) | const [virtual] |
Implements Geom_Vector.
void Geom_Direction::SetCoord | ( | const Standard_Real | X, |
const Standard_Real | Y, | ||
const Standard_Real | Z | ||
) |
void Geom_Direction::SetDir | ( | const gp_Dir & | V | ) |
Standard_Real Geom_Direction::SquareMagnitude | ( | ) | const [virtual] |
Implements Geom_Vector.
void Geom_Direction::Transform | ( | const gp_Trsf & | T | ) | [virtual] |
Implements Geom_Geometry.