Class DeriVector2 holds a vector value and its derivative on the parameter that the derivatives are being calculated for now. More...
#include <Geo.h>
Public Member Functions | |
DeriVector2 () | |
DeriVector2 (const Point &p, const double *derivparam) | |
DeriVector2 (double x, double y) | |
DeriVector2 (double x, double y, double dx, double dy) | |
DeriVector2 | divD (double val, double dval) const |
DeriVector2 | getNormalized () const |
double | length () const |
double | length (double &dlength) const |
DeriVector2 | linCombi (double m1, const DeriVector2 &v2, double m2) const |
DeriVector2 | mult (double val) const |
DeriVector2 | multD (double val, double dval) const |
DeriVector2 | rotate90ccw () const |
DeriVector2 | rotate90cw () const |
double | scalarProd (const DeriVector2 &v2, double *dprd=nullptr) const |
DeriVector2 | subtr (const DeriVector2 &v2) const |
DeriVector2 | sum (const DeriVector2 &v2) const |
Public Attributes | |
double | dx |
double | dy |
double | x |
double | y |
Class DeriVector2 holds a vector value and its derivative on the parameter that the derivatives are being calculated for now.
x,y is the actual vector (v). dx,dy is a derivative of the vector by a parameter (dv/dp). The easiest way to fill the vector in is by passing a point and a derivative parameter pointer to its constructor. x,y are read from the pointers in Point, and dx,dy are set to either 0 or 1 depending on what pointers of Point match the supplied pointer. The derivatives can be set manually as well. The class also provides a bunch of methods to do math on it (and derivatives are calculated implicitly).
GCS::DeriVector2::DeriVector2 | ( | ) |
Referenced by divD(), getNormalized(), linCombi(), mult(), multD(), rotate90ccw(), rotate90cw(), subtr(), and sum().
GCS::DeriVector2::DeriVector2 | ( | double | x, |
double | y, | ||
double | dx, | ||
double | dy | ||
) |
DeriVector2 GCS::DeriVector2::divD | ( | double | val, |
double | dval | ||
) | const |
References DeriVector2(), dx, and dy.
Referenced by GCS::Parabola::Value().
DeriVector2 GCS::DeriVector2::getNormalized | ( | ) | const |
References DeriVector2(), dx, dy, length(), x, and y.
Referenced by GCS::Ellipse::CalculateNormal(), GCS::Hyperbola::CalculateNormal(), GCS::Parabola::CalculateNormal(), GCS::Ellipse::Value(), GCS::Hyperbola::Value(), and GCS::Parabola::Value().
double GCS::DeriVector2::length | ( | ) | const |
Referenced by PathScripts.PathStock.StockFromBase::execute(), PathScripts.PathDressupDogbone.ObjectDressup::execute(), getNormalized(), GCS::Ellipse::getRadMaj(), GCS::Hyperbola::getRadMaj(), PathScripts.PathFeatureExtensions.Extension::getSubLink(), PathScripts.PathFeatureExtensions.Extension::getWire(), GCS::ConstraintAngleViaPoint::grad(), length(), Mod.PartDesign.Scripts.FilletArc.Vector::norm(), and GCS::Parabola::Value().
double GCS::DeriVector2::length | ( | double & | dlength | ) | const |
References dx, dy, and length().
Referenced by PathScripts.PathStock.StockFromBase::execute(), PathScripts.PathDressupDogbone.ObjectDressup::execute(), PathScripts.PathFeatureExtensions.Extension::getSubLink(), PathScripts.PathFeatureExtensions.Extension::getWire(), and Mod.PartDesign.Scripts.FilletArc.Vector::norm().
DeriVector2 GCS::DeriVector2::linCombi | ( | double | m1, |
const DeriVector2 & | v2, | ||
double | m2 | ||
) | const |
References DeriVector2(), dx, and dy.
Referenced by GCS::Ellipse::CalculateNormal(), and GCS::Hyperbola::CalculateNormal().
DeriVector2 GCS::DeriVector2::mult | ( | double | val | ) | const |
References DeriVector2(), dx, and dy.
Referenced by GCS::Hyperbola::CalculateNormal().
DeriVector2 GCS::DeriVector2::multD | ( | double | val, |
double | dval | ||
) | const |
References DeriVector2(), dx, and dy.
Referenced by GCS::Line::Value(), GCS::Circle::Value(), GCS::Ellipse::Value(), GCS::Hyperbola::Value(), and GCS::Parabola::Value().
DeriVector2 GCS::DeriVector2::rotate90ccw | ( | ) | const |
References DeriVector2(), dx, and dy.
Referenced by GCS::Line::CalculateNormal(), GCS::BSpline::CalculateNormal(), GCS::Circle::Value(), GCS::Ellipse::Value(), GCS::Hyperbola::Value(), and GCS::Parabola::Value().
DeriVector2 GCS::DeriVector2::rotate90cw | ( | ) | const |
References DeriVector2(), dx, and dy.
double GCS::DeriVector2::scalarProd | ( | const DeriVector2 & | v2, |
double * | dprd = nullptr |
||
) | const |
DeriVector2 GCS::DeriVector2::subtr | ( | const DeriVector2 & | v2 | ) | const |
References DeriVector2(), dx, and dy.
Referenced by GCS::Line::CalculateNormal(), GCS::Circle::CalculateNormal(), GCS::Ellipse::CalculateNormal(), GCS::Hyperbola::CalculateNormal(), GCS::Parabola::CalculateNormal(), GCS::BSpline::CalculateNormal(), GCS::Ellipse::getRadMaj(), GCS::Hyperbola::getRadMaj(), GCS::Line::Value(), GCS::Ellipse::Value(), GCS::Hyperbola::Value(), and GCS::Parabola::Value().
DeriVector2 GCS::DeriVector2::sum | ( | const DeriVector2 & | v2 | ) | const |
References DeriVector2(), dx, and dy.
Referenced by GCS::Ellipse::CalculateNormal(), GCS::Hyperbola::CalculateNormal(), GCS::Line::Value(), GCS::Circle::Value(), GCS::Ellipse::Value(), GCS::Hyperbola::Value(), and GCS::Parabola::Value().
double GCS::DeriVector2::dx |
double GCS::DeriVector2::dy |
double GCS::DeriVector2::x |
Referenced by Mod.PartDesign.Scripts.FilletArc.Vector::add(), GCS::System::calculateAngleViaPoint(), GCS::Ellipse::CalculateNormal(), GCS::System::calculateNormalAtPoint(), DraftGui.DraftToolBar::changeXValue(), importSVG.svgHandler::characters(), PathScripts.PathInspect.GCodeEditorDialog::cleanup(), Mod.PartDesign.Scripts.FilletArc.Vector::cross(), DeriVector2(), PathScripts.PostUtils.GCodeEditorDialog::done(), Mod.PartDesign.Scripts.FilletArc.Vector::dot(), GCS::ConstraintAngleViaPoint::error(), getNormalized(), GCS::ConstraintAngleViaPoint::grad(), Mod.PartDesign.Scripts.FilletArc.Vector::length(), Mod.PartDesign.Scripts.FilletArc.Vector::mult(), Mod.PartDesign.Scripts.FilletArc.Vector::norm(), PathScripts.PathDressupHoldingTags.Tag::originAt(), DraftGui.DraftToolBar::pointUi(), DraftGui.DraftToolBar::reset_ui_values(), 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 GCS::DeriVector2::y |
Referenced by Mod.PartDesign.Scripts.FilletArc.Vector::add(), GCS::System::calculateAngleViaPoint(), GCS::Ellipse::CalculateNormal(), GCS::System::calculateNormalAtPoint(), DraftGui.DraftToolBar::changeYValue(), importSVG.svgHandler::characters(), PathScripts.PathInspect.GCodeEditorDialog::cleanup(), Mod.PartDesign.Scripts.FilletArc.Vector::cross(), DeriVector2(), PathScripts.PostUtils.GCodeEditorDialog::done(), Mod.PartDesign.Scripts.FilletArc.Vector::dot(), GCS::ConstraintAngleViaPoint::error(), getNormalized(), GCS::ConstraintAngleViaPoint::grad(), Mod.PartDesign.Scripts.FilletArc.Vector::length(), Mod.PartDesign.Scripts.FilletArc.Vector::mult(), Mod.PartDesign.Scripts.FilletArc.Vector::norm(), PathScripts.PathDressupHoldingTags.Tag::originAt(), DraftGui.DraftToolBar::pointUi(), DraftGui.DraftToolBar::reset_ui_values(), Mod.PartDesign.Scripts.FilletArc.Vector::sub(), DraftGui.DraftToolBar::update_cartesian_coords(), DraftGui.DraftToolBar::update_spherical_coords(), DraftGui.DraftToolBar::updateSnapper(), and DraftGui.DraftToolBar::validatePoint().