Open CASCADE Technology 6.6.0
|
The class Direction specifies a vector that is never null.
It is a unit vector.
#include <Geom2d_Direction.hxx>
Public Member Functions | |
Geom2d_Direction (const Standard_Real X, const Standard_Real Y) | |
Creates a unit vector with it 2 cartesian coordinates. Raised if Sqrt( X*X + Y*Y) <= Resolution from gp. | |
Geom2d_Direction (const gp_Dir2d &V) | |
Creates a persistent copy of <me>. | |
void | SetCoord (const Standard_Real X, const Standard_Real Y) |
Assigns the coordinates X and Y to this unit vector, then normalizes it. Exceptions Standard_ConstructionError if Sqrt(X*X + Y*Y) is less than or equal to gp::Resolution(). | |
void | SetDir2d (const gp_Dir2d &V) |
Converts the gp_Dir2d unit vector V into this unit vector. | |
void | SetX (const Standard_Real X) |
Assigns a value to the X coordinate of this unit vector, then normalizes it. Exceptions Standard_ConstructionError if the value assigned causes the magnitude of the vector to become less than or equal to gp::Resolution(). | |
void | SetY (const Standard_Real Y) |
Assigns a value to the Y coordinate of this unit vector, then normalizes it. Exceptions Standard_ConstructionError if the value assigned causes the magnitude of the vector to become less than or equal to gp::Resolution(). | |
gp_Dir2d | Dir2d () const |
Converts this unit vector into a gp_Dir2d unit vector. | |
Standard_Real | Magnitude () const |
returns 1.0 | |
Standard_Real | SquareMagnitude () const |
returns 1.0 | |
Standard_Real | Crossed (const Handle< Geom2d_Vector > &Other) const |
Computes the cross product between <me> and <Other>. | |
Standard_Real | operator^ (const Handle< Geom2d_Vector > &Other) const |
void | Transform (const gp_Trsf2d &T) |
Applies the transformation T to this unit vector, then normalizes it. | |
Handle_Geom2d_Geometry | Copy () const |
Creates a new object which is a copy of this unit vector. |
Geom2d_Direction::Geom2d_Direction | ( | const Standard_Real | X, |
const Standard_Real | Y | ||
) |
Geom2d_Direction::Geom2d_Direction | ( | const gp_Dir2d & | V | ) |
Handle_Geom2d_Geometry Geom2d_Direction::Copy | ( | ) | const [virtual] |
Implements Geom2d_Geometry.
Standard_Real Geom2d_Direction::Crossed | ( | const Handle< Geom2d_Vector > & | Other | ) | const [virtual] |
Implements Geom2d_Vector.
gp_Dir2d Geom2d_Direction::Dir2d | ( | ) | const |
Standard_Real Geom2d_Direction::Magnitude | ( | ) | const [virtual] |
Implements Geom2d_Vector.
Standard_Real Geom2d_Direction::operator^ | ( | const Handle< Geom2d_Vector > & | Other | ) | const [inline] |
void Geom2d_Direction::SetCoord | ( | const Standard_Real | X, |
const Standard_Real | Y | ||
) |
void Geom2d_Direction::SetDir2d | ( | const gp_Dir2d & | V | ) |
void Geom2d_Direction::SetX | ( | const Standard_Real | X | ) |
void Geom2d_Direction::SetY | ( | const Standard_Real | Y | ) |
Standard_Real Geom2d_Direction::SquareMagnitude | ( | ) | const [virtual] |
Implements Geom2d_Vector.
void Geom2d_Direction::Transform | ( | const gp_Trsf2d & | T | ) | [virtual] |
Implements Geom2d_Geometry.