5 #define _USE_MATH_DEFINES 10 #include "../tools/MathToolbox.hpp" 11 #include "../tools/errorhandler.hpp" 96 value_type pointX = dCos * deltaX + dSin * deltaY;
97 value_type pointY = -dSin * deltaX + dCos * deltaY;
114 printWarning(
"Radius of Ellipse2D was given as negative value - silently using the absolute value instead.");
122 printWarning(
"Radius.getX() of Ellipse2D was given as NaN value - silently using Zero instead.");
127 printWarning(
"Radius.getY() of Ellipse2D was given as NaN value - silently using Zero instead.");
132 printWarning(
"Rotation of Ellipse2D was given as NaN value - silently using Zero instead.");
138 ") was outside of its [-pi,pi] definition range - silently normalizing it back into that range (" +
Point2D::value_type value_type
The type of the stored x, y coordinates, and the rotation.
std::string toString(UINT16 digits=2) const
Text output for debugging.
const Point2D & getCenter() const
Returns the center point of this Ellipse.
void verifyNumericRanges()
bool containsPoint(const Point2D &point) const
Returns true if the given Point2D is inside this ellipse or on its outline.
value_type getRotation() const
void setRotation(value_type r)
void setXY(value_type x, value_type y)
void setRadius(const Point2D &p)
Sets the radius of this Ellipse. Must be non-negative.
const Point2D & getRadius() const
Returns the radius of this Ellipse.
Ellipse2D()
Constructor for an all-zero Ellipse2D.
std::string toString() const
void printWarning(std::string message)