Go to the documentation of this file.
42 Vec2d(
const double Xv,
const double Yv);
58 double coord(
const int Index)
const;
60 void coord(
double& Xv,
double& Yv)
const;
79 bool isEqual(
const Vec2d& Other,
const double LinearTolerance,
const double AngularTolerance)
const;
Vec2d divided(const double Scalar) const
divides a vector by a scalar
double dot(const Vec2d &Other) const
Computes the scalar product
Vec2d rotated(const double Ang) const
Vec2d added(const Vec2d &Other) const
Adds two vectors
double y() const
For this vector, returns its Y coordinate.
Vec2d(const double Xv, const double Yv)
Creates a point with its two cartesian coordinates.
bool isNormal(const Vec2d &Other, const double AngularTolerance) const
Returns True if abs(abs(<me>.angle(Other)) - PI/2.) <= AngularTolerance
void setXY(const XY &Coord)
Assigns the two coordinates of Coord to this vector.
void setX(const double X)
Assigns the given value to the X coordinate of this vector.
Vec2d transformed(const Trsf2d &T) const
double angle(const Vec2d &Other) const
void coord(double &Xv, double &Yv) const
For this vector, returns its two coordinates Xv and Yv
bool isEqual(const Vec2d &Other, const double LinearTolerance, const double AngularTolerance) const
void setLinearForm(const double A1, const Vec2d &V1, const double A2, const Vec2d &V2, const Vec2d &V3)
Vec2d scaled(const double S) const
Scales a vector. S is the scaling value.
void divide(const double Scalar)
bool isOpposite(const Vec2d &Other, const double AngularTolerance) const
Returns True if PI - abs(<me>.angle(Other)) <= AngularTolerance
void multiply(const double Scalar)
void transform(const Trsf2d &T)
void setLinearForm(const Vec2d &Left, const Vec2d &Right)
void operator+=(const Vec2d &Other)
Definition: Vec2d.h:97
void rotate(const double Ang)
double crossSquareMagnitude(const Vec2d &Right) const
Vec2d()
Creates an indefinite vector.
X
Definition: Globals.h:29
bool isParallel(const Vec2d &Other, const double AngularTolerance) const
void setLinearForm(const double A1, const Vec2d &V1, const double A2, const Vec2d &V2)
<me> is setted to the following linear form : A1 * V1 + A2 * V2
double x() const
For this vector, returns its X coordinate.
double crossed(const Vec2d &Right) const
Computes the crossing product between two vectors
const XY & xy() const
For this vector, returns its two coordinates as a number pair
Vec2d mirrored(const Vec2d &V) const
double coord(const int Index) const
Vec2d operator+(const Vec2d &Other) const
Definition: Vec2d.h:98
Vec2d multiplied(const double Scalar) const
void add(const Vec2d &Other)
void mirror(const Vec2d &V)
Vec2d reversed() const
Reverses the direction of a vector //! Subtracts two vectors
void setY(const double Y)
Assigns the given value to the Y coordinate of this vector.
Vec2d(const Dir2d &V)
Creates a unitary vector from a direction V.
Vec2d subtracted(const Vec2d &Right) const
Subtracts two vectors
void setCoord(const int Index, const double Xi)
Vec2d operator*(const double Scalar) const
Definition: Vec2d.h:107
Defines a non-persistent vector in 2D space.
Definition: Vec2d.h:33
Vec2d operator-() const
Definition: Vec2d.h:100
void operator-=(const Vec2d &Right)
Definition: Vec2d.h:99
Vec2d operator-(const Vec2d &Right) const
Definition: Vec2d.h:102
Y
Definition: Globals.h:30
double crossMagnitude(const Vec2d &Right) const
Vec2d(const XY &Coord)
Creates a vector with a doublet of coordinates.
void setCoord(const double Xv, const double Yv)
void operator/=(const double Scalar)
Definition: Vec2d.h:109
double magnitude() const
Computes the magnitude of this vector.
void operator*=(const double Scalar)
Definition: Vec2d.h:104
Vec2d operator/(const double Scalar) const
Definition: Vec2d.h:110
void mirror(const Ax2d &A1)
double squareMagnitude() const
Computes the square magnitude of this vector.
Defines a non-persistent 2D cartesian point.
Definition: Pnt2d.h:34
Vec2d mirrored(const Ax2d &A1) const
void subtract(const Vec2d &Right)
void setLinearForm(const double A1, const Vec2d &V1, const Vec2d &V2)
<me> is setted to the following linear form : A1 * V1 + V2
void scale(const double S)
double operator*(const Vec2d &Other) const
Definition: Vec2d.h:105
double operator^(const Vec2d &Right) const
Definition: Vec2d.h:111
Definition: PropertyContainer.h:33
Vec2d(const Pnt2d &P1, const Pnt2d &P2)