OpenLexocad  27.1
Base::Vector2d Class Reference

#include <Tools2D.h>

Public Member Functions

 Vector2d (void)
 
 Vector2d (float x, float y)
 
 Vector2d (double x, double y)
 
 Vector2d (const Vector2d &v)
 
Vector2doperator= (const Vector2d &v)
 
bool operator== (const Vector2d &v) const
 
Vector2d operator+ (void) const
 
Vector2d operator+ (const Vector2d &v) const
 
Vector2doperator+= (const Vector2d &v)
 
Vector2d operator- (void) const
 
Vector2d operator- (const Vector2d &v) const
 
Vector2doperator-= (const Vector2d &v)
 
Vector2d operator * (double c) const
 
Vector2doperator *= (double c)
 
double operator * (const Vector2d &v) const
 
Vector2d operator/ (double c) const
 
Vector2doperator/= (double c)
 
bool IsNull (double tolerance=0.0) const
 
double Length (void) const
 
double Angle (void) const
 
double Sqr (void) const
 
Vector2dSet (double x, double y)
 
Vector2dNegate (void)
 
Vector2dScale (double factor)
 
Vector2dRotate (double angle)
 
Vector2dNormalize (void)
 
Vector2d Perpendicular (bool clockwise=false) const
 
double Distance (const Vector2d &v) const
 
bool IsEqual (const Vector2d &v, double tolerance=0.0) const
 
double GetAngle (const Vector2d &v) const
 
void ProjectToLine (const Vector2d &point, const Vector2d &line)
 

Static Public Member Functions

static Vector2d FromPolar (double r, double fi)
 

Public Attributes

double x
 
double y
 

Detailed Description

The vector class for 2D calculations.

Constructor & Destructor Documentation

◆ Vector2d() [1/4]

Base::Vector2d::Vector2d ( void  )
inline

INLINES

◆ Vector2d() [2/4]

Base::Vector2d::Vector2d ( float  x,
float  y 
)
inline

◆ Vector2d() [3/4]

Base::Vector2d::Vector2d ( double  x,
double  y 
)
inline

◆ Vector2d() [4/4]

Base::Vector2d::Vector2d ( const Vector2d v)
inline

Member Function Documentation

◆ Angle()

double Base::Vector2d::Angle ( void  ) const
inline

◆ Distance()

double Base::Vector2d::Distance ( const Vector2d v) const
inline

◆ FromPolar()

Vector2d Base::Vector2d::FromPolar ( double  r,
double  fi 
)
inlinestatic

◆ GetAngle()

double Base::Vector2d::GetAngle ( const Vector2d v) const

◆ IsEqual()

bool Base::Vector2d::IsEqual ( const Vector2d v,
double  tolerance = 0.0 
) const
inline

◆ IsNull()

bool Base::Vector2d::IsNull ( double  tolerance = 0.0) const
inline

◆ Length()

double Base::Vector2d::Length ( void  ) const
inline

◆ Negate()

Vector2d & Base::Vector2d::Negate ( void  )
inline

◆ Normalize()

Vector2d & Base::Vector2d::Normalize ( void  )
inline

◆ operator *() [1/2]

Vector2d Base::Vector2d::operator * ( double  c) const
inline

◆ operator *() [2/2]

double Base::Vector2d::operator * ( const Vector2d v) const
inline

◆ operator *=()

Vector2d & Base::Vector2d::operator *= ( double  c)
inline

◆ operator+() [1/2]

Vector2d Base::Vector2d::operator+ ( void  ) const
inline

◆ operator+() [2/2]

Vector2d Base::Vector2d::operator+ ( const Vector2d v) const
inline

◆ operator+=()

Vector2d & Base::Vector2d::operator+= ( const Vector2d v)
inline

◆ operator-() [1/2]

Vector2d Base::Vector2d::operator- ( void  ) const
inline

◆ operator-() [2/2]

Vector2d Base::Vector2d::operator- ( const Vector2d v) const
inline

◆ operator-=()

Vector2d & Base::Vector2d::operator-= ( const Vector2d v)
inline

◆ operator/()

Vector2d Base::Vector2d::operator/ ( double  c) const
inline

◆ operator/=()

Vector2d & Base::Vector2d::operator/= ( double  c)
inline

◆ operator=()

Vector2d & Base::Vector2d::operator= ( const Vector2d v)
inline

◆ operator==()

bool Base::Vector2d::operator== ( const Vector2d v) const
inline

◆ Perpendicular()

Vector2d Base::Vector2d::Perpendicular ( bool  clockwise = false) const
inline

◆ ProjectToLine()

void Base::Vector2d::ProjectToLine ( const Vector2d point,
const Vector2d line 
)

◆ Rotate()

Vector2d & Base::Vector2d::Rotate ( double  angle)
inline

◆ Scale()

Vector2d & Base::Vector2d::Scale ( double  factor)
inline

◆ Set()

Vector2d & Base::Vector2d::Set ( double  x,
double  y 
)
inline

◆ Sqr()

double Base::Vector2d::Sqr ( void  ) const
inline

Member Data Documentation

◆ x

double Base::Vector2d::x

◆ y

double Base::Vector2d::y

The documentation for this class was generated from the following file: