libdonut
2.3.2
Application framework for cross-platform game development in C++20
|
Namespaces | |
application | |
audio | |
base64 | |
events | |
graphics | |
json | |
numbers | |
obj | |
random | |
reflection | |
unicode | |
xml | |
Classes | |
class | AtlasPacker |
Axis-aligned rectangle packer for expandable square texture atlases. More... | |
class | Color |
Normalized floating-point RGBA color type with 32 bits per component. More... | |
class | File |
Unique handle to a file in the virtual Filesystem. More... | |
struct | FilesystemOptions |
Configuration options for a virtual Filesystem. More... | |
class | Filesystem |
Persistent system for managing the virtual filesystem. More... | |
class | LinearMemoryResource |
class | LinearAllocator |
class | LinearBuffer |
class | LooseQuadtree |
Quadtree-based space subdivision container, optimized for intersection queries between 2D axis-aligned boxes. More... | |
struct | Overloaded |
Visitor type for combining callable objects, such as lambdas, into an overload set. More... | |
struct | LineSegment |
Generic line segment between two points. More... | |
struct | Sphere |
Generic sphere shape with a center and radius. More... | |
struct | Circle |
Flat 2D circle shape with a center and radius. More... | |
struct | Capsule |
Generic capsule shape with a center line segment and radius. More... | |
struct | Box |
Generic axis-aligned box shape with minimum and maximum extents. More... | |
struct | Rectangle |
Flat 2D axis-aligned rectangle shape with a position and size. More... | |
class | Time |
Time duration value wrapper. More... | |
class | UniqueHandle |
Generic nullable RAII resource handle with exclusive ownership of a resource that is automatically destroyed on handle destruction. More... | |
class | Variant |
Tagged union value type that holds a value of one of the given types. More... | |
struct | Monostate |
Unit type for representing an empty alternative in Variant. More... | |
struct | BadVariantAccess |
Exception type that is thrown on an attempt to erroneously access an inactive alternative of a Variant when using a safe access function such as Variant::get(). More... | |
Typedefs | |
template<std::size_t Index, typename B > | |
using | linear_buffer_alternative_t = typename linear_buffer_alternative< Index, B >::type |
template<length_t L, typename T > | |
using | Point = vec< L, T > |
Generic point in space. More... | |
template<length_t L, typename T > | |
using | Length = vec< L, T > |
Generic length in space. More... | |
template<std::size_t Index, typename V > | |
using | variant_alternative_t = typename variant_alternative< Index, V >::type |
Get the type of the variant alternative with a given index in a variant type. More... | |
Enumerations | |
enum class | FilesystemMountPriority { LOWER , HIGHER } |
Mount priority for a newly mounted archive to a virtual Filesystem, relative to all previously mounted archives. More... | |
Functions | |
template<typename... Functors> | |
Overloaded (Functors...) -> Overloaded< Functors... > | |
template<length_t L, typename T > | |
constexpr Box< L, T > | getAabbOf (const LineSegment< L, T > &line) noexcept |
Get the axis-aligned bounding box of a line segment. More... | |
template<length_t L, typename T > | |
constexpr Box< L, T > | getAabbOf (const Sphere< L, T > &sphere) noexcept |
Get the axis-aligned bounding box of a sphere. More... | |
template<typename T > | |
constexpr Box< 2, T > | getAabbOf (const Circle< T > &circle) noexcept |
Get the axis-aligned bounding box of a circle. More... | |
template<length_t L, typename T > | |
constexpr Box< L, T > | getAabbOf (const Capsule< L, T > &capsule) noexcept |
Get the axis-aligned bounding box of a capsule. More... | |
template<length_t L, typename T > | |
constexpr Box< L, T > | getAabbOf (const Box< L, T > &box) noexcept |
Get the axis-aligned bounding box of an axis-aligned box. More... | |
template<typename T > | |
constexpr Box< 2, T > | getAabbOf (const Rectangle< T > &rectangle) noexcept |
Get the axis-aligned bounding box of a rectangle. More... | |
template<length_t L, typename T > | |
constexpr bool | intersects (const Sphere< L, T > &a, const Sphere< L, T > &b) noexcept |
Check if two spheres intersect. More... | |
template<typename T > | |
constexpr bool | intersects (const Circle< T > &a, const Circle< T > &b) noexcept |
Check if two cirlces intersect. More... | |
template<length_t L, typename T > | |
constexpr bool | intersects (const Box< L, T > &a, const Box< L, T > &b) noexcept |
Check if two axis-aligned boxes intersect. More... | |
template<typename T > | |
constexpr bool | intersects (const Rectangle< T > &a, const Rectangle< T > &b) noexcept |
Check if two rectangles intersect. More... | |
template<typename T > | |
constexpr bool | intersects (const Circle< T > &a, const Sphere< 2, T > &b) noexcept |
Check if a circle intersects with a sphere. More... | |
template<typename T > | |
constexpr bool | intersects (const Sphere< 2, T > &a, const Circle< T > &b) noexcept |
Check if a sphere intersects with a circle. More... | |
template<typename T > | |
constexpr bool | intersects (const Rectangle< T > &a, const Box< 2, T > &b) noexcept |
Check if a rectangle intersects with an axis-aligned box. More... | |
template<typename T > | |
constexpr bool | intersects (const Box< 2, T > &a, const Rectangle< T > &b) noexcept |
Check if an axis-aligned box intersects with a rectangle. More... | |
template<length_t L, typename T > | |
constexpr bool | intersects (const Sphere< L, T > &a, const Box< L, T > &b) noexcept |
Check if a sphere intersects with an axis-aligned box. More... | |
template<length_t L, typename T > | |
constexpr bool | intersects (const Box< L, T > &a, const Sphere< L, T > &b) noexcept |
Check if an axis-aligned box intersects with a sphere. More... | |
template<typename T > | |
constexpr bool | intersects (const Circle< T > &a, const Box< 2, T > &b) noexcept |
Check if a circle intersects with an axis-aligned box. More... | |
template<typename T > | |
constexpr bool | intersects (const Box< 2, T > &a, const Circle< T > &b) noexcept |
Check if an axis-aligned box intersects with a circle. More... | |
template<typename T > | |
constexpr bool | intersects (const Sphere< 2, T > &a, const Rectangle< T > &b) noexcept |
Check if a sphere intersects with a rectangle. More... | |
template<typename T > | |
constexpr bool | intersects (const Rectangle< T > &a, const Sphere< 2, T > &b) noexcept |
Check if a rectangle intersects with a sphere. More... | |
template<typename T > | |
constexpr bool | intersects (const Circle< T > &a, const Rectangle< T > &b) noexcept |
Check if a circle intersects with a rectangle. More... | |
template<typename T > | |
constexpr bool | intersects (const Rectangle< T > &a, const Circle< T > &b) noexcept |
Check if a rectangle intersects with a circle. More... | |
template<length_t L, typename T > | |
constexpr bool | intersects (const Sphere< L, T > &a, const Capsule< L, T > &b) noexcept |
Check if a sphere intersects with a capsule. More... | |
template<length_t L, typename T > | |
constexpr bool | intersects (const Capsule< L, T > &a, const Sphere< L, T > &b) noexcept |
Check if a capsule intersects with a sphere. More... | |
template<typename T > | |
constexpr bool | intersects (const Circle< T > &a, const Capsule< 2, T > &b) noexcept |
Check if a circle intersects with a capsule. More... | |
template<typename T > | |
constexpr bool | intersects (const Capsule< 2, T > &a, const Circle< T > &b) noexcept |
Check if a capsule intersects with a circle. More... | |
template<length_t L, typename T > | |
constexpr bool | intersects (const Sphere< L, T > &a, const LineSegment< L, T > &b) noexcept |
Check if a sphere intersects with a line segment. More... | |
template<length_t L, typename T > | |
constexpr bool | intersects (const LineSegment< L, T > &a, const Sphere< L, T > &b) noexcept |
Check if a line segment intersects with a sphere. More... | |
template<typename T > | |
constexpr bool | intersects (const Circle< T > &a, const LineSegment< 2, T > &b) noexcept |
Check if a circle intersects with a line segment. More... | |
template<typename T > | |
constexpr bool | intersects (const LineSegment< 2, T > &a, const Circle< T > &b) noexcept |
Check if a line segment intersects with a circle. More... | |
template<typename T , typename Period > | |
constexpr Time< T, Period > | operator* (Time< T, Period > a, T b) noexcept |
template<typename T , typename Period > | |
constexpr Time< T, Period > | operator* (T a, Time< T, Period > b) noexcept |
template<typename T , typename Period > | |
constexpr Time< T, Period > | operator/ (Time< T, Period > a, T b) noexcept |
template<length_t L, typename T , typename Period > | |
constexpr vec< L, T > | operator* (vec< L, T > a, Time< T, Period > b) noexcept |
template<length_t L, typename T , typename Period > | |
constexpr vec< L, T > | operator* (Time< T, Period > a, vec< L, T > b) noexcept |
template<length_t L, typename T , typename Period > | |
constexpr vec< L, T > | operator/ (vec< L, T > a, Time< T, Period > b) noexcept |
template<length_t L, typename T , typename Period > | |
constexpr vec< L, T > | operator/ (Time< T, Period > a, vec< L, T > b) noexcept |
constexpr bool | operator== (Monostate, Monostate) noexcept |
Compare two monostates for equality. More... | |
constexpr std::strong_ordering | operator<=> (Monostate, Monostate) noexcept |
Compare two monostates. More... | |
template<typename Visitor , detail::derived_from_template_specialization_of< Variant > V> | |
constexpr decltype(auto) | visit (Visitor &&visitor, V &&variant) |
Call a visitor functor with the currently active underlying value of a variant. More... | |
template<typename T , typename... Ts> | |
constexpr bool | holds_alternative (const Variant< Ts... > &variant) noexcept |
Check if a variant currently holds the alternative with the given type. More... | |
template<typename T , typename... Ts> | |
constexpr T & | get (Variant< Ts... > &variant) |
Access the underlying value with the given type of a variant. More... | |
template<typename T , typename... Ts> | |
constexpr const T & | get (const Variant< Ts... > &variant) |
Access the underlying value with the given type of a variant. More... | |
template<std::size_t Index, typename... Ts> | |
constexpr variant_alternative_t< Index, Variant< Ts... > > & | get (Variant< Ts... > &variant) |
Access the underlying value with the given index of a variant. More... | |
template<std::size_t Index, typename... Ts> | |
constexpr const variant_alternative_t< Index, Variant< Ts... > > & | get (const Variant< Ts... > &variant) |
Access the underlying value with the given index of a variant. More... | |
template<typename T , typename... Ts> | |
constexpr T * | get_if (Variant< Ts... > *variant) noexcept |
Access the underlying value with the given type of a variant if it is the currently active alternative. More... | |
template<typename T , typename... Ts> | |
constexpr const T * | get_if (const Variant< Ts... > *variant) noexcept |
Access the underlying value with the given type of a variant if it is the currently active alternative. More... | |
template<std::size_t Index, typename... Ts> | |
constexpr variant_alternative_t< Index, Variant< Ts... > > * | get_if (Variant< Ts... > *variant) noexcept |
Access the underlying value with the given index of a variant if it is the currently active alternative. More... | |
template<std::size_t Index, typename... Ts> | |
constexpr const variant_alternative_t< Index, Variant< Ts... > > * | get_if (const Variant< Ts... > *variant) noexcept |
Access the underlying value with the given index of a variant if it is the currently active alternative. More... | |
template<typename... Ts> | |
constexpr bool | operator== (const Variant< Ts... > &a, const Variant< Ts... > &b) |
Compare two variants for equality. More... | |
template<typename... Ts> | |
constexpr bool | operator!= (const Variant< Ts... > &a, const Variant< Ts... > &b) |
Compare two variants for inequality. More... | |
template<typename... Ts> | |
constexpr bool | operator< (const Variant< Ts... > &a, const Variant< Ts... > &b) |
Check if a variant is less than another variant. More... | |
template<typename... Ts> | |
constexpr bool | operator<= (const Variant< Ts... > &a, const Variant< Ts... > &b) |
Check if a variant is less than or equal to another variant. More... | |
template<typename... Ts> | |
constexpr bool | operator> (const Variant< Ts... > &a, const Variant< Ts... > &b) |
Check if a variant is greater than another variant. More... | |
template<typename... Ts> | |
constexpr bool | operator>= (const Variant< Ts... > &a, const Variant< Ts... > &b) |
Check if a variant is greater than or equal to another variant. More... | |
template<typename... Ts> | |
constexpr std::common_comparison_category_t< std::compare_three_way_result_t< Ts >... > | operator<=> (const Variant< Ts... > &a, const Variant< Ts... > &b) |
Compare two variants. More... | |
template<typename V > | |
constexpr detail::Matcher< V > | match (V &&variant) |
Choose a function overload to execute based on the active alternative of a variant. More... | |
Variables | |
template<typename T , typename B > | |
constexpr bool | linear_buffer_has_alternative_v = linear_buffer_has_alternative<T, B>::value |
template<typename T , typename B > | |
constexpr std::size_t | linear_buffer_index_v = linear_buffer_index<T, B>::value |
template<typename B > | |
constexpr std::size_t | linear_buffer_size_v = linear_buffer_size<B>::value |
template<typename T , typename V > | |
constexpr bool | variant_has_alternative_v = variant_has_alternative<T, V>::value |
Check if a variant type has a given type as one of its possible alternatives. More... | |
template<typename T , typename V > | |
constexpr std::size_t | variant_index_v = variant_index<T, V>::value |
Get the index of the variant alternative with a given type in a variant type. More... | |
template<typename V > | |
constexpr std::size_t | variant_size_v = variant_size<V>::value |
Get the number of alternative types of a variant type. More... | |
using donut::linear_buffer_alternative_t = typedef typename linear_buffer_alternative<Index, B>::type |
using donut::Point = typedef vec<L, T> |
Generic point in space.
L | number of vector dimensions. |
T | component type for vector coordinates. |
using donut::Length = typedef vec<L, T> |
Generic length in space.
L | number of vector dimensions. |
T | component type for vector coordinates. |
using donut::variant_alternative_t = typedef typename variant_alternative<Index, V>::type |
Get the type of the variant alternative with a given index in a variant type.
Index | index of the variant alternative type to get. |
V | variant type. |
|
strong |
Mount priority for a newly mounted archive to a virtual Filesystem, relative to all previously mounted archives.
donut::Overloaded | ( | Functors... | ) | -> Overloaded< Functors... > |
|
constexprnoexcept |
Get the axis-aligned bounding box of a line segment.
line | line segment to get the bounding box of. |
|
constexprnoexcept |
Get the axis-aligned bounding box of a sphere.
sphere | sphere to get the bounding box of. |
|
constexprnoexcept |
Get the axis-aligned bounding box of a circle.
circle | circle to get the bounding box of. |
|
constexprnoexcept |
Get the axis-aligned bounding box of a capsule.
capsule | capsule to get the bounding box of. |
|
constexprnoexcept |
Get the axis-aligned bounding box of an axis-aligned box.
box | axis-aligned box to get the bounding box of. |
|
constexprnoexcept |
Get the axis-aligned bounding box of a rectangle.
rectangle | rectangle to get the bounding box of. |
|
constexprnoexcept |
Check if two spheres intersect.
a | first sphere. |
b | second sphere. |
|
constexprnoexcept |
Check if two cirlces intersect.
a | first circle. |
b | second circle. |
|
constexprnoexcept |
Check if two axis-aligned boxes intersect.
a | first box. |
b | second box. |
|
constexprnoexcept |
Check if two rectangles intersect.
a | first rectangle. |
b | second rectangle. |
|
constexprnoexcept |
Check if a circle intersects with a sphere.
a | circle. |
b | sphere. |
|
constexprnoexcept |
Check if a sphere intersects with a circle.
a | sphere. |
b | circle. |
|
constexprnoexcept |
Check if a rectangle intersects with an axis-aligned box.
a | rectangle. |
b | box. |
|
constexprnoexcept |
Check if an axis-aligned box intersects with a rectangle.
a | box. |
b | rectangle. |
|
constexprnoexcept |
Check if a sphere intersects with an axis-aligned box.
a | sphere. |
b | box. |
|
constexprnoexcept |
Check if an axis-aligned box intersects with a sphere.
a | box. |
b | sphere. |
|
constexprnoexcept |
Check if a circle intersects with an axis-aligned box.
a | circle. |
b | box. |
|
constexprnoexcept |
Check if an axis-aligned box intersects with a circle.
a | box. |
b | circle. |
|
constexprnoexcept |
Check if a sphere intersects with a rectangle.
a | sphere. |
b | rectangle. |
|
constexprnoexcept |
Check if a rectangle intersects with a sphere.
a | rectangle. |
b | sphere. |
|
constexprnoexcept |
Check if a circle intersects with a rectangle.
a | circle. |
b | rectangle. |
|
constexprnoexcept |
Check if a rectangle intersects with a circle.
a | rectangle. |
b | circle. |
|
constexprnoexcept |
Check if a sphere intersects with a capsule.
a | sphere. |
b | capsule. |
|
constexprnoexcept |
Check if a capsule intersects with a sphere.
a | capsule. |
b | sphere. |
|
constexprnoexcept |
Check if a circle intersects with a capsule.
a | circle. |
b | capsule. |
|
constexprnoexcept |
Check if a capsule intersects with a circle.
a | capsule. |
b | circle. |
|
constexprnoexcept |
Check if a sphere intersects with a line segment.
a | sphere. |
b | line segment. |
|
constexprnoexcept |
Check if a line segment intersects with a sphere.
a | line segment. |
b | sphere. |
|
constexprnoexcept |
Check if a circle intersects with a line segment.
a | circle. |
b | line segment. |
|
constexprnoexcept |
Check if a line segment intersects with a circle.
a | line segment. |
b | circle. |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
Compare two monostates for equality.
This function always returns true, since monostates are empty unit values containing no state, meaning they are always equal.
Compare two monostates.
This function always returns equal, since monostates are empty unit values containing no state, meaning they are always equal.
|
constexpr |
Call a visitor functor with the currently active underlying value of a variant.
visitor | callable object that is overloaded to accept any of the variant alternatives as a parameter. |
variant | variant whose underlying value to pass to the visitor. |
BadVariantAccess | if the variant is in the valueless by exception state. |
any | exception thrown by the visitor. |
|
constexprnoexcept |
Check if a variant currently holds the alternative with the given type.
Check if a variant currently holds the alternative with the given index.
T | alternative type to check for. Must be one of the variant's listed alternative types. |
variant | the variant to check. |
Index | alternative index to check for. Must be within the range of the variant's list of alternative types. |
variant | the variant to check. |
|
constexpr |
Access the underlying value with the given type of a variant.
T | type of the currently active value to get. Must be one of the variant's listed alternative types. |
variant | the variant to get the value of. |
BadVariantAccess | if the variant does not currently hold a value of the given type. |
|
constexpr |
Access the underlying value with the given type of a variant.
T | type of the currently active value to get. Must be one of the variant's listed alternative types. |
variant | the variant to get the value of. |
BadVariantAccess | if the variant does not currently hold a value of the given type. |
|
constexpr |
Access the underlying value with the given index of a variant.
Index | alternative index of the currently active value to get. Must be within the range of the variant's list of alternative types. |
variant | the variant to get the value of. |
BadVariantAccess | if the variant does not currently hold the given alternative. |
|
constexpr |
Access the underlying value with the given index of a variant.
Index | alternative index of the currently active value to get. Must be within the range of the variant's list of alternative types. |
variant | the variant to get the value of. |
BadVariantAccess | if the variant does not currently hold the given alternative. |
|
constexprnoexcept |
Access the underlying value with the given type of a variant if it is the currently active alternative.
T | type of the value to get. Must be one of the variant's listed alternative types. |
variant | non-owning pointer to the variant to get the value of. Must not be nullptr. |
|
constexprnoexcept |
Access the underlying value with the given type of a variant if it is the currently active alternative.
T | type of the value to get. Must be one of the variant's listed alternative types. |
variant | non-owning read-only pointer to the variant to get the value of. Must not be nullptr. |
|
constexprnoexcept |
Access the underlying value with the given index of a variant if it is the currently active alternative.
Index | alternative index of the value to get. Must be within the range of the variant's list of alternative types. |
variant | non-owning pointer to the variant to get the value of. Must not be nullptr. |
|
constexprnoexcept |
Access the underlying value with the given index of a variant if it is the currently active alternative.
Index | alternative index of the value to get. Must be within the range of the variant's list of alternative types. |
variant | non-owning read-only pointer to the variant to get the value of. Must not be nullptr. |
|
constexpr |
Compare two variants for equality.
a | first variant. |
b | second variant. |
any | exception thrown by the underlying comparison operator of the relevant alternative type. |
|
constexpr |
Compare two variants for inequality.
a | first variant. |
b | second variant. |
any | exception thrown by the underlying comparison operator of the relevant alternative type. |
|
constexpr |
Check if a variant is less than another variant.
a | first variant. |
b | second variant. |
any | exception thrown by the underlying comparison operator of the relevant alternative type. |
|
constexpr |
Check if a variant is less than or equal to another variant.
a | first variant. |
b | second variant. |
any | exception thrown by the underlying comparison operator of the relevant alternative type. |
|
constexpr |
Check if a variant is greater than another variant.
a | first variant. |
b | second variant. |
any | exception thrown by the underlying comparison operator of the relevant alternative type. |
|
constexpr |
Check if a variant is greater than or equal to another variant.
a | first variant. |
b | second variant. |
any | exception thrown by the underlying comparison operator of the relevant alternative type. |
|
constexpr |
Compare two variants.
a | first variant. |
b | second variant. |
any | exception thrown by the underlying comparison operator of the relevant alternative type. |
|
constexpr |
Choose a function overload to execute based on the active alternative of a variant.
variant | forwarding reference to the variant to match on. |
any | exception thrown when forwarding the variant to the returned object. |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Check if a variant type has a given type as one of its possible alternatives.
T | alternative type to check for. |
V | variant type. |
|
inlineconstexpr |
Get the index of the variant alternative with a given type in a variant type.
T | type of the variant alternative to get the index of. |
V | variant type. |
|
inlineconstexpr |
Get the number of alternative types of a variant type.
V | variant type. |