Open CASCADE Technology
6.5.4
|
Defines a vector with magnitude.
A vector with magnitude can have a zero length.
#include <Geom2d_VectorWithMagnitude.hxx>
Public Member Functions | |
Geom2d_VectorWithMagnitude (const gp_Vec2d &V) | |
Creates a persistent copy of V. | |
Geom2d_VectorWithMagnitude (const Standard_Real X, const Standard_Real Y) | |
Creates a vector with two cartesian coordinates. | |
Geom2d_VectorWithMagnitude (const gp_Pnt2d &P1, const gp_Pnt2d &P2) | |
Creates a vector from the point P1 to the point P2. The magnitude of the vector is the distance between P1 and P2 | |
void | SetCoord (const Standard_Real X, const Standard_Real Y) |
Set <me> to X, Y coordinates. | |
void | SetVec2d (const gp_Vec2d &V) |
void | SetX (const Standard_Real X) |
Changes the X coordinate of <me>. | |
void | SetY (const Standard_Real Y) |
Changes the Y coordinate of <me> | |
Standard_Real | Magnitude () const |
Returns the magnitude of <me>. | |
Standard_Real | SquareMagnitude () const |
Returns the square magnitude of <me>. | |
void | Add (const Handle< Geom2d_Vector > &Other) |
Adds the Vector Other to <me>. | |
void | operator+= (const Handle< Geom2d_Vector > &Other) |
Handle_Geom2d_VectorWithMagnitude | Added (const Handle< Geom2d_Vector > &Other) const |
Adds the vector Other to <me>. | |
Handle_Geom2d_VectorWithMagnitude | operator+ (const Handle< Geom2d_Vector > &Other) const |
Standard_Real | Crossed (const Handle< Geom2d_Vector > &Other) const |
Computes the cross product between <me> and Other <me> ^ Other. A new vector is returned. | |
Standard_Real | operator^ (const Handle< Geom2d_Vector > &Other) const |
void | Divide (const Standard_Real Scalar) |
Divides <me> by a scalar. | |
void | operator/= (const Standard_Real Scalar) |
Handle_Geom2d_VectorWithMagnitude | Divided (const Standard_Real Scalar) const |
Divides <me> by a scalar. A new vector is returned. | |
Handle_Geom2d_VectorWithMagnitude | operator/ (const Standard_Real Scalar) const |
Handle_Geom2d_VectorWithMagnitude | Multiplied (const Standard_Real Scalar) const |
Computes the product of the vector <me> by a scalar. A new vector is returned. -C++: alias operator * Collision with same operator defined for the class Vector! | |
void | Multiply (const Standard_Real Scalar) |
Computes the product of the vector <me> by a scalar. | |
void | operator*= (const Standard_Real Scalar) |
void | Normalize () |
Normalizes <me>. Raised if the magnitude of the vector is lower or equal to Resolution from package gp. | |
Handle_Geom2d_VectorWithMagnitude | Normalized () const |
Returns a copy of <me> Normalized. Raised if the magnitude of the vector is lower or equal to Resolution from package gp. | |
void | Subtract (const Handle< Geom2d_Vector > &Other) |
Subtracts the Vector Other to <me>. | |
void | operator-= (const Handle< Geom2d_Vector > &Other) |
Handle_Geom2d_VectorWithMagnitude | Subtracted (const Handle< Geom2d_Vector > &Other) const |
Subtracts the vector Other to <me>. A new vector is returned. | |
Handle_Geom2d_VectorWithMagnitude | operator- (const Handle< Geom2d_Vector > &Other) const |
void | Transform (const gp_Trsf2d &T) |
Applies the transformation T to this vector. | |
Handle_Geom2d_Geometry | Copy () const |
Creates a new object which is a copy of this vector. |
Geom2d_VectorWithMagnitude::Geom2d_VectorWithMagnitude | ( | const Standard_Real | X, |
const Standard_Real | Y | ||
) |
void Geom2d_VectorWithMagnitude::Add | ( | const Handle< Geom2d_Vector > & | Other | ) |
Handle_Geom2d_VectorWithMagnitude Geom2d_VectorWithMagnitude::Added | ( | const Handle< Geom2d_Vector > & | Other | ) | const |
Handle_Geom2d_Geometry Geom2d_VectorWithMagnitude::Copy | ( | ) | const [virtual] |
Implements Geom2d_Geometry.
Standard_Real Geom2d_VectorWithMagnitude::Crossed | ( | const Handle< Geom2d_Vector > & | Other | ) | const [virtual] |
Implements Geom2d_Vector.
Handle_Geom2d_VectorWithMagnitude Geom2d_VectorWithMagnitude::Divided | ( | const Standard_Real | Scalar | ) | const |
Standard_Real Geom2d_VectorWithMagnitude::Magnitude | ( | ) | const [virtual] |
Implements Geom2d_Vector.
Handle_Geom2d_VectorWithMagnitude Geom2d_VectorWithMagnitude::Multiplied | ( | const Standard_Real | Scalar | ) | const |
Handle_Geom2d_VectorWithMagnitude Geom2d_VectorWithMagnitude::Normalized | ( | ) | const |
void Geom2d_VectorWithMagnitude::operator*= | ( | const Standard_Real | Scalar | ) | [inline] |
Handle_Geom2d_VectorWithMagnitude Geom2d_VectorWithMagnitude::operator+ | ( | const Handle< Geom2d_Vector > & | Other | ) | const [inline] |
void Geom2d_VectorWithMagnitude::operator+= | ( | const Handle< Geom2d_Vector > & | Other | ) | [inline] |
Handle_Geom2d_VectorWithMagnitude Geom2d_VectorWithMagnitude::operator- | ( | const Handle< Geom2d_Vector > & | Other | ) | const [inline] |
void Geom2d_VectorWithMagnitude::operator-= | ( | const Handle< Geom2d_Vector > & | Other | ) | [inline] |
Handle_Geom2d_VectorWithMagnitude Geom2d_VectorWithMagnitude::operator/ | ( | const Standard_Real | Scalar | ) | const [inline] |
void Geom2d_VectorWithMagnitude::operator/= | ( | const Standard_Real | Scalar | ) | [inline] |
Standard_Real Geom2d_VectorWithMagnitude::operator^ | ( | const Handle< Geom2d_Vector > & | Other | ) | const [inline] |
Standard_Real Geom2d_VectorWithMagnitude::SquareMagnitude | ( | ) | const [virtual] |
Implements Geom2d_Vector.
void Geom2d_VectorWithMagnitude::Subtract | ( | const Handle< Geom2d_Vector > & | Other | ) |
Handle_Geom2d_VectorWithMagnitude Geom2d_VectorWithMagnitude::Subtracted | ( | const Handle< Geom2d_Vector > & | Other | ) | const |
void Geom2d_VectorWithMagnitude::Transform | ( | const gp_Trsf2d & | T | ) | [virtual] |
Implements Geom2d_Geometry.