LibreCAD
|
#include <geoellipse.h>
Public Member Functions | |
Ellipse (const Coordinate ¢er, const Coordinate &majorP, double minorRadius, double startAngle, double endAngle, bool reversed=false) | |
const Coordinate | center () const |
center, Returns Center point of Ellipse More... | |
const Coordinate | majorP () const |
majorP, Returns major point of the ellipse, relative to center More... | |
double | minorRadius () const |
minorRadius, Returns the minor radius of ellipse More... | |
double | startAngle () const |
startAngle, Returns Start elliptic!! angle of ellipse More... | |
double | endAngle () const |
endAngle, Return the end elliptic!! angle of ellipse More... | |
Coordinate | getPoint (const double &angle) const |
getPoint, return a point on ellipse with given elliptic angle More... | |
Coordinate | startPoint () const |
startPoint, start point of ellipse More... | |
Coordinate | endPoint () const |
endPoint, end point of ellipse More... | |
std::vector< Coordinate > | findPotentialNearestPoints (const Coordinate &coord) const |
findPotentialNearestPoints More... | |
Coordinate | nearestPointOnPath (const Coordinate &coord) const |
nearestPointOnPath, (ignore if it arc) More... | |
Coordinate | nearestPointOnEntity (const Coordinate &coord) const |
nearestPointOnEntity, ( not ignore arc) More... | |
bool | isArc () const |
isArc More... | |
bool | isReversed () const |
double | ratio () const |
ratio of major radius to minor radius More... | |
double | majorRadius () const |
Major Radius. More... | |
double | getAngle () const |
getAngle of MajorP More... | |
double | getEllipseAngle (const Coordinate &coord) const |
getEllipseAngle More... | |
bool | isAngleBetween (double angle) const |
Ellipse | georotate (const Coordinate ¢er, const double rotation_angle) const |
rotate an ellipse at a center by an angle More... | |
Ellipse | geoscale (const Coordinate ¢er, const Coordinate &factor) const |
scale an ellipse at some center by some factor More... | |
const maths::Equation | equation () const |
Returns the quadratic equation. More... | |
virtual void | accept (GeoEntityVisitor &v) const override |
Public Member Functions inherited from lc::geo::Base | |
virtual | ~Base ()=default |
Public Member Functions inherited from lc::Visitable | |
virtual | ~Visitable ()=default |
Private Attributes | |
const Coordinate | _center |
const Coordinate | _majorP |
const double | _minorRadius |
const double | _startAngle |
const double | _endAngle |
const bool | _isReversed |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Ellipse &e) |
Definition at line 14 of file geoellipse.h.
Ellipse::Ellipse | ( | const Coordinate & | center, |
const Coordinate & | majorP, | ||
double | minorRadius, | ||
double | startAngle, | ||
double | endAngle, | ||
bool | reversed = false |
||
) |
center | |
majorP | relative to center |
minorRadius | |
startAngle | |
endAngle | |
reversed |
Definition at line 10 of file geoellipse.cpp.
|
inlineoverridevirtual |
Implements lc::Visitable.
Reimplemented in lc::entity::Ellipse.
Definition at line 164 of file geoellipse.h.
const Coordinate Ellipse::center | ( | ) | const |
center, Returns Center point of Ellipse
Definition at line 20 of file geoellipse.cpp.
double Ellipse::endAngle | ( | ) | const |
endAngle, Return the end elliptic!! angle of ellipse
Definition at line 189 of file geoellipse.cpp.
Coordinate Ellipse::endPoint | ( | ) | const |
endPoint, end point of ellipse
Definition at line 202 of file geoellipse.cpp.
|
inline |
Returns the quadratic equation.
Definition at line 153 of file geoellipse.h.
std::vector< Coordinate > Ellipse::findPotentialNearestPoints | ( | const Coordinate & | coord | ) | const |
findPotentialNearestPoints
coord,the | point of which we search |
Definition at line 88 of file geoellipse.cpp.
Ellipse Ellipse::georotate | ( | const Coordinate & | center, |
const double | rotation_angle | ||
) | const |
rotate an ellipse at a center by an angle
center | of rotation |
rotation_angle |
Definition at line 82 of file geoellipse.cpp.
Ellipse Ellipse::geoscale | ( | const Coordinate & | center, |
const Coordinate & | factor | ||
) | const |
scale an ellipse at some center by some factor
center | of scaling |
factor | of scaling |
Definition at line 44 of file geoellipse.cpp.
double Ellipse::getAngle | ( | ) | const |
double Ellipse::getEllipseAngle | ( | const Coordinate & | coord | ) | const |
getEllipseAngle
coord,a | point on ellipse, not actually required to be on ellipse |
Definition at line 218 of file geoellipse.cpp.
Coordinate Ellipse::getPoint | ( | const double & | angle | ) | const |
getPoint, return a point on ellipse with given elliptic angle
angle,elliptic!! | angle in radians |
Definition at line 193 of file geoellipse.cpp.
|
inline |
Definition at line 127 of file geoellipse.h.
bool Ellipse::isArc | ( | ) | const |
isArc
Definition at line 214 of file geoellipse.cpp.
bool Ellipse::isReversed | ( | ) | const |
true | if the arc is reversed (clockwise), |
false | otherwise |
Definition at line 206 of file geoellipse.cpp.
const Coordinate Ellipse::majorP | ( | ) | const |
majorP, Returns major point of the ellipse, relative to center
Definition at line 24 of file geoellipse.cpp.
double Ellipse::majorRadius | ( | ) | const |
double Ellipse::minorRadius | ( | ) | const |
minorRadius, Returns the minor radius of ellipse
Definition at line 28 of file geoellipse.cpp.
Coordinate Ellipse::nearestPointOnEntity | ( | const Coordinate & | coord | ) | const |
nearestPointOnEntity, ( not ignore arc)
coord,the | point of which we search |
Definition at line 167 of file geoellipse.cpp.
Coordinate Ellipse::nearestPointOnPath | ( | const Coordinate & | coord | ) | const |
nearestPointOnPath, (ignore if it arc)
coord,the | point of which we search |
Definition at line 149 of file geoellipse.cpp.
double Ellipse::ratio | ( | ) | const |
ratio of major radius to minor radius
Definition at line 210 of file geoellipse.cpp.
double Ellipse::startAngle | ( | ) | const |
startAngle, Returns Start elliptic!! angle of ellipse
Definition at line 32 of file geoellipse.cpp.
Coordinate Ellipse::startPoint | ( | ) | const |
startPoint, start point of ellipse
Definition at line 199 of file geoellipse.cpp.
|
friend |
Definition at line 167 of file geoellipse.h.
|
private |
Definition at line 172 of file geoellipse.h.
|
private |
Definition at line 176 of file geoellipse.h.
|
private |
Definition at line 177 of file geoellipse.h.
|
private |
Definition at line 173 of file geoellipse.h.
|
private |
Definition at line 174 of file geoellipse.h.
|
private |
Definition at line 175 of file geoellipse.h.