![]() |
ToyGine2 26.2.0
Game Engine for retro consoles
|
Geometry types and utilities: sections (intervals), circles, ellipses, and related APIs. More...
Classes | |
| class | Circle |
| Circle in 2D with center and radius. More... | |
| class | Ellipse |
| Axis-aligned ellipse in 2D with center and semi-axes. More... | |
| class | Section |
| One-dimensional interval [start, end] over a numeric endpoint type. More... | |
Concepts | |
| concept | CircleComponent |
| Concept satisfied when T is a component type allowed as toy::geometry::Circle template parameter. | |
| concept | EllipseComponent |
| Concept satisfied when T is a component type allowed as toy::geometry::Ellipse template parameter. | |
| concept | SectionEndpoint |
| Concept satisfied when T is an endpoint type allowed as toy::geometry::Section template parameter. | |
Functions | |
| template<CircleComponent T> | |
| constexpr bool | operator== (const Circle< T > &left, const Circle< T > &right) noexcept |
| Equality of two circles: same center and radius (tolerance-based for float, exact for fixed-point). | |
| template<CircleComponent T> | |
| constexpr bool | operator!= (const Circle< T > &left, const Circle< T > &right) noexcept |
| Inequality of two circles. | |
| template<EllipseComponent T> | |
| constexpr bool | operator== (const Ellipse< T > &left, const Ellipse< T > &right) noexcept |
| Equality of two ellipses: same center and radiuses (tolerance-based for float, exact for fixed-point). | |
| template<EllipseComponent T> | |
| constexpr bool | operator!= (const Ellipse< T > &left, const Ellipse< T > &right) noexcept |
| Inequality of two ellipses. | |
| template<SectionEndpoint T> | |
| constexpr bool | operator== (const Section< T > &left, const Section< T > &right) noexcept |
| Equality of two sections: exact comparison for integral and fixed-point, approximate for floating-point. | |
| template<SectionEndpoint T> | |
| constexpr bool | operator!= (const Section< T > &left, const Section< T > &right) noexcept |
| Inequality of two sections. | |
| template<CircleComponent T> | |
| Circle (const math::Vector2< T > &, const T &) -> Circle< T > | |
Deduction guide: enables Circle(center, radius) without an explicit template argument when both arguments have the same toy::geometry::CircleComponent type. | |
| template<EllipseComponent T> | |
| Ellipse (const math::Vector2< T > &, const math::Vector2< T > &) -> Ellipse< T > | |
Deduction guide: enables Ellipse(center, radiuses) without an explicit template argument when both arguments have the same toy::geometry::EllipseComponent type. | |
| template<SectionEndpoint T> | |
| Section (const T &, const T &) -> Section< T > | |
Deduction guide: enables Section(a, b) without an explicit template argument when both arguments have the same toy::geometry::SectionEndpoint type. | |
Geometry types and utilities: sections (intervals), circles, ellipses, and related APIs.
| toy::geometry::Circle | ( | const math::Vector2< T > & | , |
| const T & | ) -> Circle< T > |
Deduction guide: enables Circle(center, radius) without an explicit template argument when both arguments have the same toy::geometry::CircleComponent type.
| T | Component type; must satisfy toy::geometry::CircleComponent. |
| toy::geometry::Ellipse | ( | const math::Vector2< T > & | , |
| const math::Vector2< T > & | ) -> Ellipse< T > |
Deduction guide: enables Ellipse(center, radiuses) without an explicit template argument when both arguments have the same toy::geometry::EllipseComponent type.
| T | Component type; must satisfy toy::geometry::EllipseComponent. |
|
nodiscardconstexprnoexcept |
Inequality of two circles.
| T | Component type; must satisfy toy::geometry::CircleComponent. |
| left | First circle. |
| right | Second circle. |
true if left and right differ, i.e. !(left == right).
|
nodiscardconstexprnoexcept |
Inequality of two ellipses.
| T | Component type; must satisfy toy::geometry::EllipseComponent. |
| left | First ellipse. |
| right | Second ellipse. |
true if left and right differ, i.e. !(left == right).
|
nodiscardconstexprnoexcept |
Inequality of two sections.
| T | Endpoint type; must satisfy toy::geometry::SectionEndpoint. |
| left | First section. |
| right | Second section. |
true if left and right have different bounds, i.e. !(left == right).
|
nodiscardconstexprnoexcept |
Equality of two circles: same center and radius (tolerance-based for float, exact for fixed-point).
| T | Component type; must satisfy toy::geometry::CircleComponent. |
| left | First circle. |
| right | Second circle. |
true if left and right have equal center and radius.
|
nodiscardconstexprnoexcept |
Equality of two ellipses: same center and radiuses (tolerance-based for float, exact for fixed-point).
| T | Component type; must satisfy toy::geometry::EllipseComponent. |
| left | First ellipse. |
| right | Second ellipse. |
true if left and right have equal center and radiuses.
|
nodiscardconstexprnoexcept |
Equality of two sections: exact comparison for integral and fixed-point, approximate for floating-point.
For floating-point T compares bounds with math::isEqual. For signed integral and fixed-point T compares left.start with right.start and left.end with right.end exactly.
| T | Endpoint type; must satisfy toy::geometry::SectionEndpoint. |
| left | First section. |
| right | Second section. |
true if left and right have equal bounds (exact for integral/fixed-point, within default epsilon for floating-point).| toy::geometry::Section | ( | const T & | , |
| const T & | ) -> Section< T > |
Deduction guide: enables Section(a, b) without an explicit template argument when both arguments have the same toy::geometry::SectionEndpoint type.
| T | Endpoint type; must satisfy toy::geometry::SectionEndpoint. |