Flat 2D ellipse shape with a center and axis-aligned radii.
More...
#include <GREM/core/geometry.hpp>
|
| using | Component = T |
| | Scalar coordinate component type.
|
|
| template<typename U> |
| GREM_ALWAYS_INLINE constexpr | operator Ellipse< U > () const noexcept |
| | Convert this ellipse to an equivalent ellipse of another scalar type.
|
| constexpr | operator Ellipsoid< 2, T > () const noexcept |
| | Convert this ellipse to an equivalent 2D ellipsoid.
|
| bool | operator== (const Ellipse &other) const =default |
| | Compare this ellipse to another for equality.
|
| constexpr bool | contains (const Point< 2, T > &point) const noexcept |
| | Check if a given point is contained within the extents of this ellipse.
|
| constexpr Box< 2, T > | getBoundingBox () const noexcept |
| | Get the axis-aligned bounding box of the ellipse.
|
| constexpr Ellipsoid< 2, T > | toEllipsoid () const noexcept |
| | Convert this shape to an equivalent ellipsoid.
|
|
| Point< 2, T > | center |
| | Position of the center of the ellipse.
|
| Length< 2, T > | radii |
| | Radii of the ellipse along each axis.
|
|
| static constexpr size_t | RANK = 2 |
| | Number of dimensions of the vector space.
|
template<typename T>
struct grem::Ellipse< T >
Flat 2D ellipse shape with a center and axis-aligned radii.
- Template Parameters
-
| T | scalar coordinate component type. |
◆ Component
Scalar coordinate component type.
◆ operator Ellipse< U >()
template<typename T>
template<typename U>
|
|
inlineexplicitconstexprnoexcept |
Convert this ellipse to an equivalent ellipse of another scalar type.
- Returns
- the converted ellipse.
◆ operator Ellipsoid< 2, T >()
Convert this ellipse to an equivalent 2D ellipsoid.
- Returns
- the ellipse as an ellipsoid.
◆ operator==()
Compare this ellipse to another for equality.
- Parameters
-
| other | the ellipse to compare this ellipse to. |
- Returns
- true if the ellipses are equal, false otherwise.
◆ contains()
template<typename T>
|
|
inlinenodiscardconstexprnoexcept |
Check if a given point is contained within the extents of this ellipse.
- Parameters
-
- Returns
- true if the ellipse contains the given point, false otherwise.
◆ getBoundingBox()
template<typename T>
|
|
inlinenodiscardconstexprnoexcept |
Get the axis-aligned bounding box of the ellipse.
- Returns
- an axis-aligned box that contains the entire ellipse.
◆ toEllipsoid()
template<typename T>
|
|
inlinenodiscardconstexprnoexcept |
Convert this shape to an equivalent ellipsoid.
- Returns
- an ellipsoid that is equivalent to this shape.
◆ RANK
Number of dimensions of the vector space.
◆ center
Position of the center of the ellipse.
◆ radii
Radii of the ellipse along each axis.
The documentation for this struct was generated from the following file: