The vector class for 2D calculations. More...
#include <Tools2D.h>
Public Member Functions | |
double | Angle () const |
double | Distance (const Vector2d &v) const |
double | GetAngle (const Vector2d &v) const |
bool | IsEqual (const Vector2d &v, double tolerance=0.0) const |
bool | IsNull (double tolerance=0.0) const |
double | Length () const |
Vector2d & | Negate () |
Vector2d & | Normalize () |
double | operator* (const Vector2d &v) const |
Vector2d | operator* (double c) const |
Vector2d & | operator*= (double c) |
Vector2d | operator+ (const Vector2d &v) const |
Vector2d | operator+ (void) const |
Vector2d & | operator+= (const Vector2d &v) |
Vector2d | operator- (const Vector2d &v) const |
Vector2d | operator- (void) const |
Vector2d & | operator-= (const Vector2d &v) |
Vector2d | operator/ (double c) const |
Vector2d & | operator/= (double c) |
Vector2d & | operator= (const Vector2d &v) |
bool | operator== (const Vector2d &v) const |
Vector2d | Perpendicular (bool clockwise=false) const |
void | ProjectToLine (const Vector2d &point, const Vector2d &line) |
Vector2d & | Rotate (double angle) |
Vector2d & | Scale (double factor) |
Vector2d & | Set (double x, double y) |
double | Sqr () const |
Vector2d () | |
INLINES. More... | |
Vector2d (const Vector2d &v) | |
Vector2d (double x, double y) | |
Vector2d (float x, float y) | |
Static Public Member Functions | |
static Vector2d | FromPolar (double r, double fi) |
Public Attributes | |
double | x |
double | y |
The vector class for 2D calculations.
Base::Vector2d::Vector2d | ( | ) |
INLINES.
Referenced by FromPolar(), operator*(), operator+(), operator-(), operator/(), and Perpendicular().
Base::Vector2d::Vector2d | ( | float | x, |
float | y | ||
) |
Base::Vector2d::Vector2d | ( | double | x, |
double | y | ||
) |
Base::Vector2d::Vector2d | ( | const Vector2d & | v | ) |
double Base::Vector2d::Angle | ( | ) | const |
double Base::Vector2d::Distance | ( | const Vector2d & | v | ) | const |
|
static |
References Vector2d().
Referenced by TechDrawGui::QGIViewDimension::computeExtensionLinePoints(), TechDrawGui::QGIViewDimension::computePerpendicularIntersection(), TechDrawGui::QGIViewDimension::drawAngle(), TechDrawGui::QGIViewDimension::drawDiameter(), TechDrawGui::QGIViewDimension::drawDimensionArc(), TechDrawGui::QGIViewDimension::drawDimensionLine(), TechDrawGui::QGIViewDimension::drawDistanceExecutive(), TechDrawGui::QGIViewDimension::drawDistanceOverride(), TechDrawGui::QGIViewDimension::drawRadiusExecutive(), TechDrawGui::QGIViewDimension::drawSingleLine(), TechDraw::DrawUtil::findCircularArcRectangleIntersections(), TechDraw::DrawUtil::findLineRectangleIntersections(), and TechDraw::DrawUtil::findLineSegmentRectangleIntersections().
double Vector2d::GetAngle | ( | const Vector2d & | v | ) | const |
References Length().
Referenced by SketcherGui::DrawSketchHandlerExtend::mouseMove().
References Distance(), and draftutils.utils::tolerance().
Referenced by Base::BoundBox2d::IsEqual().
bool Base::Vector2d::IsNull | ( | double | tolerance = 0.0 | ) | const |
References draftutils.utils::tolerance().
double Base::Vector2d::Length | ( | void | ) | const |
Referenced by ArchStructure.CommandStructuralSystem::Activated(), TechDrawGui::QGIViewDimension::computeExtensionLinePoints(), TechDrawGui::QGIViewDimension::computeLineAndLabelAngles(), TechDrawGui::QGIViewDimension::drawAngle(), TechDrawGui::QGIViewDimension::drawDiameter(), TechDrawGui::QGIViewDimension::drawRadiusExecutive(), GetAngle(), ArchPanel.CommandPanel::getPoint(), SketcherGui::DrawSketchHandlerExtend::mouseMove(), SketcherGui::DrawSketchHandlerRegularPolygon::mouseMove(), Normalize(), ProjectToLine(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), ArchPanel.CommandPanel::setLength(), Part::Geom2dEllipse::setMajorAxisDir(), Part::Geom2dArcOfEllipse::setMajorAxisDir(), and ArchPanel.CommandPanel::update().
Vector2d & Base::Vector2d::Normalize | ( | ) |
Vector2d Base::Vector2d::operator* | ( | double | c | ) | const |
References Vector2d().
Vector2d & Base::Vector2d::operator*= | ( | double | c | ) |
References Vector2d().
Vector2d Base::Vector2d::operator+ | ( | void | ) | const |
References Vector2d().
References Vector2d().
Vector2d Base::Vector2d::operator- | ( | void | ) | const |
References Vector2d().
Vector2d Base::Vector2d::operator/ | ( | double | c | ) | const |
References Vector2d().
Vector2d & Base::Vector2d::operator/= | ( | double | c | ) |
References Vector2d().
Referenced by TechDrawGui::QGIViewDimension::drawDistanceExecutive(), and Base::Vector2dPy::perpendicular().
References Length(), Normalize(), and Scale().
Referenced by SketcherGui::DrawSketchHandlerExtend::mouseMove().
Vector2d & Base::Vector2d::Scale | ( | double | factor | ) |
double Base::Vector2d::Sqr | ( | ) | const |
References y.
double Base::Vector2d::x |
Referenced by Mod.PartDesign.Scripts.FilletArc.Vector::add(), Base::Line2d::CalcBoundBox(), DraftGui.DraftToolBar::changeXValue(), importSVG.svgHandler::characters(), PathScripts.PathInspect.GCodeEditorDialog::cleanup(), Base::Polygon2d::Contains(), Mod.PartDesign.Scripts.FilletArc.Vector::cross(), PathScripts.PostUtils.GCodeEditorDialog::done(), Mod.PartDesign.Scripts.FilletArc.Vector::dot(), TechDrawGui::QGIViewDimension::drawDiameter(), TechDrawGui::QGIViewDimension::drawRadiusExecutive(), TechDrawGui::QGIViewDimension::drawSingleArc(), TechDraw::DrawUtil::findCircleRectangleIntersections(), TechDraw::DrawUtil::findLineRectangleIntersections(), Base::Line2d::FromPos(), Part::Geom2dLine::Geom2dLine(), Part::Geom2dCircle::getCircleCenter(), SketcherGui::GetPointAngle(), Base::BoundBox2d::Intersect(), Base::Line2d::Intersect(), TechDraw::DrawUtil::Intersect2d(), Mod.PartDesign.Scripts.FilletArc.Vector::length(), DrawSketchHandlerBSplineInsertKnot::mouseMove(), SketcherGui::DrawSketchHandlerArc::mouseMove(), SketcherGui::DrawSketchHandler3PointArc::mouseMove(), SketcherGui::DrawSketchHandlerArcOfEllipse::mouseMove(), SketcherGui::DrawSketchHandlerArcOfHyperbola::mouseMove(), SketcherGui::DrawSketchHandlerArcOfParabola::mouseMove(), SketcherGui::DrawSketchHandlerCircle::mouseMove(), SketcherGui::DrawSketchHandler3PointCircle::mouseMove(), SketcherGui::DrawSketchHandlerExtend::mouseMove(), SketcherGui::DrawSketchHandlerLineSet::mouseMove(), SketcherGui::DrawSketchHandlerRegularPolygon::mouseMove(), SketcherGui::DrawSketchHandlerBox::mouseMove(), SketcherGui::DrawSketchHandlerOblong::mouseMove(), SketcherGui::DrawSketchHandlerSlot::mouseMove(), SketcherGui::DrawSketchHandlerTrimming::mouseMove(), Mod.PartDesign.Scripts.FilletArc.Vector::mult(), Negate(), Mod.PartDesign.Scripts.FilletArc.Vector::norm(), operator*(), operator+=(), operator-=(), operator=(), PathScripts.PathDressupHoldingTags.Tag::originAt(), DraftGui.DraftToolBar::pointUi(), SketcherGui::DrawSketchHandlerArc::pressButton(), SketcherGui::DrawSketchHandlerBox::pressButton(), DrawSketchHandlerGenConstraint::releaseButton(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), SketcherGui::DrawSketchHandlerArc::releaseButton(), SketcherGui::DrawSketchHandler3PointArc::releaseButton(), SketcherGui::DrawSketchHandlerArcOfEllipse::releaseButton(), SketcherGui::DrawSketchHandler3PointCircle::releaseButton(), SketcherGui::DrawSketchHandlerExtend::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), SketcherGui::DrawSketchHandlerLineSet::releaseButton(), SketcherGui::DrawSketchHandlerPoint::releaseButton(), SketcherGui::DrawSketchHandlerRegularPolygon::releaseButton(), SketcherGui::DrawSketchHandlerBox::releaseButton(), SketcherGui::DrawSketchHandlerOblong::releaseButton(), SketcherGui::DrawSketchHandlerSlot::releaseButton(), SketcherGui::DrawSketchHandlerSplitting::releaseButton(), SketcherGui::DrawSketchHandlerTrimming::releaseButton(), SketcherGui::DrawSketchHandlerArcOfHyperbola::releaseButton(), SketcherGui::DrawSketchHandlerArcOfParabola::releaseButton(), DraftGui.DraftToolBar::reset_ui_values(), Rotate(), Part::Geom2dLineSegment::Save(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), Set(), Part::Geom2dLine::setLine(), Part::Geom2dConic::setLocation(), Part::Geom2dArcOfConic::setLocation(), Part::Geom2dEllipse::setMajorAxisDir(), Part::Geom2dArcOfEllipse::setMajorAxisDir(), SketcherGui::EditModeCoinManager::setPositionText(), Mod.PartDesign.Scripts.FilletArc.Vector::sub(), DraftGui.DraftToolBar::update_cartesian_coords(), DraftGui.DraftToolBar::update_spherical_coords(), DraftGui.DraftToolBar::updateSnapper(), DraftGui.DraftToolBar::validatePoint(), and automotive_design.right_angular_wedge::wr1().
double Base::Vector2d::y |
Referenced by Mod.PartDesign.Scripts.FilletArc.Vector::add(), Base::Line2d::CalcBoundBox(), DraftGui.DraftToolBar::changeYValue(), importSVG.svgHandler::characters(), PathScripts.PathInspect.GCodeEditorDialog::cleanup(), Base::Polygon2d::Contains(), Mod.PartDesign.Scripts.FilletArc.Vector::cross(), PathScripts.PostUtils.GCodeEditorDialog::done(), Mod.PartDesign.Scripts.FilletArc.Vector::dot(), TechDrawGui::QGIViewDimension::drawDiameter(), TechDrawGui::QGIViewDimension::drawSingleArc(), TechDraw::DrawUtil::findCircleRectangleIntersections(), TechDraw::DrawUtil::findLineRectangleIntersections(), Base::Line2d::FromPos(), Part::Geom2dLine::Geom2dLine(), TechDrawGui::QGIViewDimension::getAsmeRefJointPoint(), TechDrawGui::QGIViewDimension::getAsmeRefOutsetPoint(), Part::Geom2dCircle::getCircleCenter(), SketcherGui::GetPointAngle(), Base::BoundBox2d::Intersect(), Base::Line2d::Intersect(), TechDraw::DrawUtil::Intersect2d(), Mod.PartDesign.Scripts.FilletArc.Vector::length(), DrawSketchHandlerBSplineInsertKnot::mouseMove(), SketcherGui::DrawSketchHandlerArc::mouseMove(), SketcherGui::DrawSketchHandler3PointArc::mouseMove(), SketcherGui::DrawSketchHandlerArcOfEllipse::mouseMove(), SketcherGui::DrawSketchHandlerArcOfHyperbola::mouseMove(), SketcherGui::DrawSketchHandlerArcOfParabola::mouseMove(), SketcherGui::DrawSketchHandlerCircle::mouseMove(), SketcherGui::DrawSketchHandler3PointCircle::mouseMove(), SketcherGui::DrawSketchHandlerExtend::mouseMove(), SketcherGui::DrawSketchHandlerLineSet::mouseMove(), SketcherGui::DrawSketchHandlerRegularPolygon::mouseMove(), SketcherGui::DrawSketchHandlerBox::mouseMove(), SketcherGui::DrawSketchHandlerOblong::mouseMove(), SketcherGui::DrawSketchHandlerSlot::mouseMove(), SketcherGui::DrawSketchHandlerTrimming::mouseMove(), Mod.PartDesign.Scripts.FilletArc.Vector::mult(), Negate(), Mod.PartDesign.Scripts.FilletArc.Vector::norm(), PathScripts.PathDressupHoldingTags.Tag::originAt(), DraftGui.DraftToolBar::pointUi(), SketcherGui::DrawSketchHandlerArc::pressButton(), SketcherGui::DrawSketchHandlerBox::pressButton(), DrawSketchHandlerGenConstraint::releaseButton(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), SketcherGui::DrawSketchHandlerArc::releaseButton(), SketcherGui::DrawSketchHandler3PointArc::releaseButton(), SketcherGui::DrawSketchHandlerArcOfEllipse::releaseButton(), SketcherGui::DrawSketchHandler3PointCircle::releaseButton(), SketcherGui::DrawSketchHandlerExtend::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), SketcherGui::DrawSketchHandlerLineSet::releaseButton(), SketcherGui::DrawSketchHandlerPoint::releaseButton(), SketcherGui::DrawSketchHandlerRegularPolygon::releaseButton(), SketcherGui::DrawSketchHandlerBox::releaseButton(), SketcherGui::DrawSketchHandlerOblong::releaseButton(), SketcherGui::DrawSketchHandlerSlot::releaseButton(), SketcherGui::DrawSketchHandlerSplitting::releaseButton(), SketcherGui::DrawSketchHandlerTrimming::releaseButton(), SketcherGui::DrawSketchHandlerArcOfHyperbola::releaseButton(), SketcherGui::DrawSketchHandlerArcOfParabola::releaseButton(), DraftGui.DraftToolBar::reset_ui_values(), Part::Geom2dLineSegment::Save(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), Set(), Part::Geom2dLine::setLine(), Part::Geom2dConic::setLocation(), Part::Geom2dArcOfConic::setLocation(), Part::Geom2dEllipse::setMajorAxisDir(), Part::Geom2dArcOfEllipse::setMajorAxisDir(), SketcherGui::EditModeCoinManager::setPositionText(), Sqr(), Mod.PartDesign.Scripts.FilletArc.Vector::sub(), DraftGui.DraftToolBar::update_cartesian_coords(), DraftGui.DraftToolBar::update_spherical_coords(), DraftGui.DraftToolBar::updateSnapper(), and DraftGui.DraftToolBar::validatePoint().