Open CASCADE Technology 6.6.0
|
The abstract class Vector describes the common
behavior of vectors in 2D space.
The Geom2d package provides two concrete
classes of vectors: Geom2d_Direction (unit vector)
and Geom2d_VectorWithMagnitude.
#include <Geom2d_Vector.hxx>
Public Member Functions | |
void | Reverse () |
Reverses the vector <me>. | |
Handle_Geom2d_Vector | Reversed () const |
Returns a copy of <me> reversed. | |
Standard_Real | Angle (const Handle< Geom2d_Vector > &Other) const |
Computes the angular value, in radians, between this vector and vector Other. The result is a value between -Pi and Pi. The orientation is from this vector to vector Other. Raises VectorWithNullMagnitude if one of the two vectors is a vector with null magnitude because the angular value is indefinite. | |
void | Coord (Standard_Real &X, Standard_Real &Y) const |
Returns the coordinates of <me>. | |
virtual Standard_Real | Magnitude () const =0 |
Returns the Magnitude of <me>. | |
virtual Standard_Real | SquareMagnitude () const =0 |
Returns the square magnitude of <me>. | |
Standard_Real | X () const |
Returns the X coordinate of <me>. | |
Standard_Real | Y () const |
Returns the Y coordinate of <me>. | |
virtual Standard_Real | Crossed (const Handle< Geom2d_Vector > &Other) const =0 |
Cross product of <me> with the vector <Other>. | |
Standard_Real | Dot (const Handle< Geom2d_Vector > &Other) const |
Returns the scalar product of 2 Vectors. | |
gp_Vec2d | Vec2d () const |
Returns a non persistent copy of <me>. | |
Protected Attributes | |
gp_Vec2d | gpVec2d |
Standard_Real Geom2d_Vector::Angle | ( | const Handle< Geom2d_Vector > & | Other | ) | const |
void Geom2d_Vector::Coord | ( | Standard_Real & | X, |
Standard_Real & | Y | ||
) | const |
virtual Standard_Real Geom2d_Vector::Crossed | ( | const Handle< Geom2d_Vector > & | Other | ) | const [pure virtual] |
Implemented in Geom2d_Direction, and Geom2d_VectorWithMagnitude.
Standard_Real Geom2d_Vector::Dot | ( | const Handle< Geom2d_Vector > & | Other | ) | const |
virtual Standard_Real Geom2d_Vector::Magnitude | ( | ) | const [pure virtual] |
Implemented in Geom2d_Direction, and Geom2d_VectorWithMagnitude.
void Geom2d_Vector::Reverse | ( | ) |
Handle_Geom2d_Vector Geom2d_Vector::Reversed | ( | ) | const |
virtual Standard_Real Geom2d_Vector::SquareMagnitude | ( | ) | const [pure virtual] |
Implemented in Geom2d_Direction, and Geom2d_VectorWithMagnitude.
gp_Vec2d Geom2d_Vector::Vec2d | ( | ) | const |
Standard_Real Geom2d_Vector::X | ( | ) | const |
Standard_Real Geom2d_Vector::Y | ( | ) | const |
gp_Vec2d Geom2d_Vector::gpVec2d [protected] |