The vector class for 2D calculations. More...
#include <Tools2D.h>
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 |
Vector2D & | operator= (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 |
The vector class for 2D calculations.
Definition at line 45 of file Tools2D.h.
Base::Vector2D::Vector2D | ( | void | ) | [inline] |
Definition at line 171 of file Tools2D.h.
Referenced by operator+(), and operator-().
Base::Vector2D::Vector2D | ( | const Vector2D & | rclVct | ) | [inline] |
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 209 of file Tools2D.h.
References fX, fY, and Vector2D().
Definition at line 214 of file Tools2D.h.
References fX, fY, and Vector2D().
bool Base::Vector2D::operator== | ( | const Vector2D & | rclVct | ) | const [inline] |
Definition at line 57 of file Tools2D.cpp.
References RobotExample::l, Length(), Normalize(), Scale(), and Mod::PartDesign::Scripts::Gear::t1.
void Base::Vector2D::Scale | ( | float | fS | ) | [inline] |
void Base::Vector2D::Set | ( | float | fPX, | |
float | fPY | |||
) | [inline] |
float Base::Vector2D::fX |
Definition at line 48 of file Tools2D.h.
Referenced by Base::Line2D::CalcBoundBox(), Base::Polygon2D::Contains(), Base::BoundBox2D::Contains(), Base::Line2D::FromPos(), Base::Line2D::Intersect(), Length(), DrawSketchHandlerCircle::mouseMove(), DrawSketchHandlerArc::mouseMove(), DrawSketchHandlerBox::mouseMove(), SketcherGui::ViewProviderSketch::moveConstraint(), Normalize(), Base::BoundBox2D::operator&=(), operator*(), operator+(), operator-(), operator=(), operator==(), Base::BoundBox2D::operator||(), DrawSketchHandlerArc::pressButton(), DrawSketchHandlerBox::pressButton(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerArc::releaseButton(), Scale(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), Set(), and SketcherGui::ViewProviderSketch::setPositionText().
float Base::Vector2D::fY |
Definition at line 48 of file Tools2D.h.
Referenced by Base::Line2D::CalcBoundBox(), Base::Polygon2D::Contains(), Base::BoundBox2D::Contains(), Base::Line2D::FromPos(), Base::Line2D::Intersect(), Length(), DrawSketchHandlerCircle::mouseMove(), DrawSketchHandlerArc::mouseMove(), DrawSketchHandlerBox::mouseMove(), SketcherGui::ViewProviderSketch::moveConstraint(), Normalize(), Base::BoundBox2D::operator&=(), operator*(), operator+(), operator-(), operator=(), operator==(), Base::BoundBox2D::operator||(), DrawSketchHandlerArc::pressButton(), DrawSketchHandlerBox::pressButton(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerArc::releaseButton(), Scale(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), Set(), and SketcherGui::ViewProviderSketch::setPositionText().