|
Gin
|
Equations to calculate the shape of an ellipse and to calculate points on the edge of the ellipse and to see if points are inside or outside. More...
#include <gin_geometry.h>
Public Member Functions | |
| Ellipse (T x_, T y_, T a_, T b_) | |
| Creates a ellipse with a given centre and width / height. | |
| Ellipse (T a_, T b_) | |
| Creates an ellipse centred at (0,0) with the specified width and height. | |
| bool | isPointOn (Point< T > pt, T accuracy=0.00001) |
| Checks if a point lies on the ellipse boundary. | |
| bool | isPointOutside (Point< T > pt) |
| Checks if a point lies outside the ellipse. | |
| bool | isPointInside (Point< T > pt) |
| Checks if a point lies inside the ellipse. | |
| Point< T > | pointAtAngle (T angle) |
| Calculates the point on the ellipse at the specified angle. | |
Public Attributes | |
| T | x = 0 |
| T | y = 0 |
| Centre coordinates of the ellipse. | |
| T | a = 0 |
| T | b = 0 |
| Semi-major and semi-minor axes (half width and height). | |
Equations to calculate the shape of an ellipse and to calculate points on the edge of the ellipse and to see if points are inside or outside.
| Ellipse< T >::Ellipse | ( | T | x_, |
| T | y_, | ||
| T | a_, | ||
| T | b_ ) |
| Ellipse< T >::Ellipse | ( | T | a_, |
| T | b_ ) |
Checks if a point lies on the ellipse boundary.
| pt | The point to test |
| accuracy | Tolerance for the test (default: 0.00001) |
References a, b, Point< T >::getX(), Point< T >::getY(), square(), x, Point< T >::x, y, and Point< T >::y.
Checks if a point lies outside the ellipse.
| pt | The point to test |
References a, b, Point< T >::getX(), Point< T >::getY(), square(), x, Point< T >::x, y, and Point< T >::y.
Checks if a point lies inside the ellipse.
| pt | The point to test |
References a, b, Point< T >::getX(), Point< T >::getY(), square(), x, Point< T >::x, y, and Point< T >::y.
| T Ellipse< T >::x = 0 |
Referenced by Ellipse(), isPointInside(), isPointOn(), isPointOutside(), and pointAtAngle().
| T Ellipse< T >::y = 0 |
Centre coordinates of the ellipse.
Referenced by Ellipse(), isPointInside(), isPointOn(), isPointOutside(), and pointAtAngle().
| T Ellipse< T >::a = 0 |
Referenced by Ellipse(), Ellipse(), isPointInside(), isPointOn(), isPointOutside(), and pointAtAngle().
| T Ellipse< T >::b = 0 |
Semi-major and semi-minor axes (half width and height).
Referenced by Ellipse(), Ellipse(), isPointInside(), isPointOn(), isPointOutside(), and pointAtAngle().