Base::Vector2D Class Reference

The vector class for 2D calculations. More...

#include <Tools2D.h>

List of all members.

Public Member Functions

float GetAngle (const Vector2D &rclVect) const
float Length (void) const
void Normalize (void)
float operator* (const Vector2D &rclVct) const
Vector2D operator+ (const Vector2D &rclVct) const
Vector2D operator- (const Vector2D &rclVct) const
Vector2Doperator= (const Vector2D &rclVct)
bool operator== (const Vector2D &rclVct) const
void ProjToLine (const Vector2D &rclPt, const Vector2D &rclLine)
void Scale (float fS)
void Set (float fPX, float fPY)
 Vector2D (const Vector2D &rclVct)
 Vector2D (double x, double y)
 Vector2D (float x, float y)
 Vector2D (void)

Public Attributes

float fX
float fY

Detailed Description

The vector class for 2D calculations.

Definition at line 45 of file Tools2D.h.


Constructor & Destructor Documentation

Base::Vector2D::Vector2D ( void   )  [inline]

Definition at line 171 of file Tools2D.h.

Referenced by operator+(), and operator-().

Base::Vector2D::Vector2D ( float  x,
float  y 
) [inline]

Definition at line 176 of file Tools2D.h.

Base::Vector2D::Vector2D ( double  x,
double  y 
) [inline]

Definition at line 181 of file Tools2D.h.

Base::Vector2D::Vector2D ( const Vector2D rclVct  )  [inline]

Definition at line 187 of file Tools2D.h.


Member Function Documentation

float Vector2D::GetAngle ( const Vector2D rclVect  )  const

Definition at line 36 of file Tools2D.cpp.

References KDL::acos(), SketcherExample::f, F_PI, FLOAT_MAX, and Length().

float Base::Vector2D::Length ( void   )  const [inline]

Definition at line 192 of file Tools2D.h.

References fX, fY, and KDL::sqrt().

Referenced by GetAngle(), Normalize(), ProjToLine(), and SketcherGui::DrawSketchHandler::seekAutoConstraint().

void Base::Vector2D::Normalize ( void   )  [inline]

Definition at line 230 of file Tools2D.h.

References SketcherExample::f, fX, fY, and Length().

Referenced by Base::Line2D::FromPos(), and ProjToLine().

float Base::Vector2D::operator* ( const Vector2D rclVct  )  const [inline]

Definition at line 219 of file Tools2D.h.

References fX, and fY.

Vector2D Base::Vector2D::operator+ ( const Vector2D rclVct  )  const [inline]

Definition at line 209 of file Tools2D.h.

References fX, fY, and Vector2D().

Vector2D Base::Vector2D::operator- ( const Vector2D rclVct  )  const [inline]

Definition at line 214 of file Tools2D.h.

References fX, fY, and Vector2D().

Vector2D & Base::Vector2D::operator= ( const Vector2D rclVct  )  [inline]

Definition at line 197 of file Tools2D.h.

References fX, and fY.

bool Base::Vector2D::operator== ( const Vector2D rclVct  )  const [inline]

Definition at line 204 of file Tools2D.h.

References fX, and fY.

void Vector2D::ProjToLine ( const Vector2D rclPt,
const Vector2D rclLine 
)
void Base::Vector2D::Scale ( float  fS  )  [inline]

Definition at line 224 of file Tools2D.h.

References fX, and fY.

Referenced by ProjToLine().

void Base::Vector2D::Set ( float  fPX,
float  fPY 
) [inline]

Definition at line 240 of file Tools2D.h.

References fX, and fY.


Member Data Documentation


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

Generated on Wed Nov 23 19:01:48 2011 for FreeCAD by  doxygen 1.6.1