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, 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=0) const |
DeriVector2 | subtr (const DeriVector2 &v2) const |
DeriVector2 | sum (const DeriVector2 &v2) const |
Public Attributes | |
double | dx |
double | dy |
double | x |
double | y |
Detailed Description
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).
Constructor & Destructor Documentation
◆ DeriVector2() [1/4]
GCS::DeriVector2::DeriVector2 | ( | ) |
Referenced by DeriVector2(), divD(), getNormalized(), and length().
◆ DeriVector2() [2/4]
GCS::DeriVector2::DeriVector2 | ( | double | x, |
double | y | ||
) |
◆ DeriVector2() [3/4]
GCS::DeriVector2::DeriVector2 | ( | double | x, |
double | y, | ||
double | dx, | ||
double | dy | ||
) |
References DeriVector2(), dx, and dy.
◆ DeriVector2() [4/4]
Member Function Documentation
◆ divD()
DeriVector2 GCS::DeriVector2::divD | ( | double | val, |
double | dval | ||
) | const |
References DeriVector2(), dx, and dy.
Referenced by GCS::Parabola::Value().
◆ getNormalized()
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().
◆ length() [1/2]
double GCS::DeriVector2::length | ( | ) | const |
References DeriVector2(), dx, and dy.
Referenced by getNormalized(), GCS::Ellipse::getRadMaj(), GCS::Hyperbola::getRadMaj(), GCS::ConstraintAngleViaPoint::grad(), length(), and GCS::Parabola::Value().
◆ length() [2/2]
◆ linCombi()
DeriVector2 GCS::DeriVector2::linCombi | ( | double | m1, |
const DeriVector2 & | v2, | ||
double | m2 | ||
) | const |
Referenced by GCS::Ellipse::CalculateNormal(), and GCS::Hyperbola::CalculateNormal().
◆ mult()
DeriVector2 GCS::DeriVector2::mult | ( | double | val | ) | const |
Referenced by GCS::Hyperbola::CalculateNormal().
◆ multD()
DeriVector2 GCS::DeriVector2::multD | ( | double | val, |
double | dval | ||
) | const |
Referenced by GCS::Line::Value(), GCS::Circle::Value(), GCS::Ellipse::Value(), GCS::Hyperbola::Value(), and GCS::Parabola::Value().
◆ rotate90ccw()
DeriVector2 GCS::DeriVector2::rotate90ccw | ( | ) | const |
◆ rotate90cw()
DeriVector2 GCS::DeriVector2::rotate90cw | ( | ) | const |
◆ scalarProd()
double GCS::DeriVector2::scalarProd | ( | const DeriVector2 & | v2, |
double * | dprd = 0 |
||
) | const |
◆ subtr()
DeriVector2 GCS::DeriVector2::subtr | ( | const DeriVector2 & | v2 | ) | const |
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().
◆ sum()
DeriVector2 GCS::DeriVector2::sum | ( | const DeriVector2 & | v2 | ) | const |
Member Data Documentation
◆ dx
double GCS::DeriVector2::dx |
◆ dy
double GCS::DeriVector2::dy |
◆ x
double GCS::DeriVector2::x |
Referenced by GCS::System::calculateAngleViaPoint(), GCS::Ellipse::CalculateNormal(), GCS::System::calculateNormalAtPoint(), PathScripts.PathInspect.GCodeEditorDialog::cleanup(), PathScripts.PostUtils.GCodeEditorDialog::done(), GCS::ConstraintAngleViaPoint::error(), getNormalized(), and GCS::ConstraintAngleViaPoint::grad().
◆ y
double GCS::DeriVector2::y |
Referenced by GCS::System::calculateAngleViaPoint(), GCS::Ellipse::CalculateNormal(), GCS::System::calculateNormalAtPoint(), PathScripts.PathInspect.GCodeEditorDialog::cleanup(), PathScripts.PostUtils.GCodeEditorDialog::done(), GCS::ConstraintAngleViaPoint::error(), getNormalized(), and GCS::ConstraintAngleViaPoint::grad().
The documentation for this class was generated from the following files:
- src/Mod/Sketcher/App/planegcs/Geo.h
- src/Mod/Sketcher/App/planegcs/Geo.cpp