LibreCAD
|
#include <geobezier.h>
Public Member Functions | |
Bezier (const Coordinate &point_a, const Coordinate &point_b, const Coordinate &point_c) | |
Bezier (const Bezier &bez) | |
virtual const std::vector < Coordinate > | getCP () const override |
getCP Returns the control points of the bezier More... | |
virtual const Area | boundingBox () const override |
boundingBox of the bezier More... | |
virtual Coordinate | nearestPointOnPath (const Coordinate &coord) const override |
nearestPointOnPath of the bezier More... | |
virtual Coordinate | nearestPointOnEntity (const Coordinate &coord) const override |
nearestPointOnEntity of the bezier More... | |
virtual Coordinate | CasteljauAt (std::vector< Coordinate > points, double t) const override |
CasteljauAt Coordinate of bezier at time t. More... | |
virtual Coordinate | DirectValueAt (double t) const override |
DirectValueAt Coordinate of bezier at time t calculated numerically. More... | |
virtual const std::vector < Coordinate > | Curve (double precession) override |
Curve Creates a bezier curve for drawing with some precession value. More... | |
virtual const double | length () const override |
length of the Bezier More... | |
virtual const Coordinate | tangent (double t) const override |
tangent of the bezeir More... | |
virtual const Coordinate | normal (double t) const override |
normal of the bezier at time t More... | |
virtual std::vector< BB_CSPtr > | splitHalf () const override |
splitHalf Splits the bezier into two halves. More... | |
virtual BB_CSPtr | splitAtT (double t) const override |
splitAtT Splits bezier at specific time. More... | |
virtual BB_CSPtr | offset (const geo::Coordinate &offset) const override |
offset offsets the bezier. More... | |
virtual BB_CSPtr | rotate (const geo::Coordinate ¢er, double angle) const override |
rotate the bezier at specific center and some angle More... | |
virtual BB_CSPtr | scale (const geo::Coordinate ¢er, const geo::Coordinate &factor) const override |
scale the bezier at specific center by some factor More... | |
virtual BB_CSPtr | move (const geo::Coordinate &offset) const override |
move the bezeir by some offset More... | |
virtual BB_CSPtr | mirror (const geo::Coordinate &axis1, const geo::Coordinate &axis2) const override |
mirror a bezier around a line More... | |
![]() | |
BezierBase () | |
virtual | ~BezierBase () |
virtual void | accept (GeoEntityVisitor &v) const override |
![]() | |
virtual | ~Base ()=default |
![]() | |
virtual | ~Visitable ()=default |
Private Member Functions | |
std::vector< double > | nearestPointTValue (const Coordinate &coord) const override |
Bezier::nearestPointTValue. More... | |
const lc::geo::Coordinate | returnCasesForNearestPoint (double min_distance, const lc::geo::Coordinate &coord, const Coordinate &ret) const override |
Bezier::returnCasesForNearestPoint. More... | |
Private Attributes | |
Coordinate | _pointA |
Coordinate | _pointB |
Coordinate | _pointC |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Bezier &bez) |
Definition at line 15 of file geobezier.h.
Bezier::Bezier | ( | const Coordinate & | point_a, |
const Coordinate & | point_b, | ||
const Coordinate & | point_c | ||
) |
Bezier::Bezier | ( | const Bezier & | bez | ) |
Definition at line 10 of file geobezier.cpp.
|
overridevirtual |
boundingBox of the bezier
Implements lc::geo::BezierBase.
Definition at line 21 of file geobezier.cpp.
|
overridevirtual |
CasteljauAt Coordinate of bezier at time t.
points | Vector of CP of bezier |
t | Time t |
Implements lc::geo::BezierBase.
Definition at line 145 of file geobezier.cpp.
|
overridevirtual |
Curve Creates a bezier curve for drawing with some precession value.
precession | of the curve |
Implements lc::geo::BezierBase.
Definition at line 165 of file geobezier.cpp.
|
overridevirtual |
DirectValueAt Coordinate of bezier at time t calculated numerically.
t | Time t |
Implements lc::geo::BezierBase.
Definition at line 157 of file geobezier.cpp.
|
overridevirtual |
getCP Returns the control points of the bezier
Implements lc::geo::BezierBase.
Definition at line 16 of file geobezier.cpp.
|
overridevirtual |
length of the Bezier
Implements lc::geo::BezierBase.
Definition at line 174 of file geobezier.cpp.
|
overridevirtual |
mirror a bezier around a line
axis1 | first coordinate of line to be mirrored about |
axis2 | second coordinate of line to be mirrored about |
Implements lc::geo::BezierBase.
Definition at line 246 of file geobezier.cpp.
|
overridevirtual |
move the bezeir by some offset
offset | coordinate of move |
Implements lc::geo::BezierBase.
Definition at line 209 of file geobezier.cpp.
|
overridevirtual |
nearestPointOnEntity of the bezier
coord | Coordinate to be compared with |
Implements lc::geo::BezierBase.
Definition at line 76 of file geobezier.cpp.
|
overridevirtual |
nearestPointOnPath of the bezier
coord | Coordinate to be compared with |
Implements lc::geo::BezierBase.
Definition at line 49 of file geobezier.cpp.
|
overrideprivatevirtual |
coord | The pointt from where nearest point is to be found |
Implements lc::geo::BezierBase.
Definition at line 102 of file geobezier.cpp.
|
overridevirtual |
normal of the bezier at time t
t | time t |
Implements lc::geo::BezierBase.
Definition at line 227 of file geobezier.cpp.
|
overridevirtual |
offset offsets the bezier.
offset | offsect coordinate |
Implements lc::geo::BezierBase.
Definition at line 265 of file geobezier.cpp.
|
overrideprivatevirtual |
Bezier::returnCasesForNearestPoint.
distance | at minimum T |
coord | coordinate from where the minimum distance is to be found |
ret | coordinate value at minimum T |
Implements lc::geo::BezierBase.
Definition at line 127 of file geobezier.cpp.
|
overridevirtual |
rotate the bezier at specific center and some angle
center | of rotation |
angle | of rotation |
Implements lc::geo::BezierBase.
Definition at line 194 of file geobezier.cpp.
|
overridevirtual |
scale the bezier at specific center by some factor
center | of scale |
factor | of scale |
Implements lc::geo::BezierBase.
Definition at line 201 of file geobezier.cpp.
|
overridevirtual |
splitAtT Splits bezier at specific time.
t | Time t |
Implements lc::geo::BezierBase.
Definition at line 284 of file geobezier.cpp.
|
overridevirtual |
splitHalf Splits the bezier into two halves.
Implements lc::geo::BezierBase.
Definition at line 254 of file geobezier.cpp.
|
overridevirtual |
tangent of the bezeir
t | time T |
Implements lc::geo::BezierBase.
Definition at line 217 of file geobezier.cpp.
|
friend |
Definition at line 149 of file geobezier.h.
|
private |
Definition at line 155 of file geobezier.h.
|
private |
Definition at line 156 of file geobezier.h.
|
private |
Definition at line 157 of file geobezier.h.