|
template<typename T>
requires (same_as<T, Shape<N>>) |
| GREM_ALWAYS_INLINE constexpr | ConvexShapeView (const T &shape) noexcept |
| | Construct a convex shape view.
|
template<typename T>
requires (!same_as<T, Shape<N>> && variant_has_alternative_v<T, value_type> && convex_shape<T, N>) |
| GREM_ALWAYS_INLINE constexpr | ConvexShapeView (const T &shape) noexcept |
| | Construct a convex shape view.
|
| GREM_ALWAYS_INLINE constexpr | ConvexShapeView (ShapeView< N > shape) |
| | Construct a shape view.
|
| bool | containsLocalPoint (Length< N > localPoint) const |
| | Check if a local point relative to the origin of the shape is contained within the shape.
|
| Length< N > | getLocalSupportPointOffset (Direction< N > localDirection) const |
| | Get the local offset from the origin of the shape to the farthest point on the shape in a certain local direction.
|
template<typename T>
requires (same_as<T, Shape<N>>) |
| GREM_ALWAYS_INLINE constexpr | ShapeView (const T &shape) noexcept |
| | Construct a shape view.
|
template<typename T>
requires (!same_as<T, Shape<N>> && variant_has_alternative_v<T, value_type>) |
| GREM_ALWAYS_INLINE constexpr | ShapeView (const T &shape) noexcept |
| | Construct a shape view.
|
| GREM_ALWAYS_INLINE constexpr const void * | data () const noexcept |
| | Get an untyped pointer to the data of the underlying shape.
|
| GREM_ALWAYS_INLINE constexpr index_type | index () const noexcept |
| | Get the type index of the underlying shape.
|
| constexpr bool | valueless_by_exception () const noexcept |
| | Check if the shape view is in the valueless by exception state.
|
template<typename T>
requires (variant_has_alternative_v<T, value_type>) |
| constexpr bool | is () const noexcept |
| | Check if the shape view currently references the alternative with the given type.
|
template<typename T>
requires (variant_has_alternative_v<T, value_type>) |
| constexpr const T & | as () const &noexcept |
| | Access the underlying value with the given type without a safety check.
|
template<typename T>
requires (variant_has_alternative_v<T, value_type>) |
| constexpr const T & | get () const & |
| | Access the underlying value with the given type.
|
template<typename T>
requires (variant_has_alternative_v<T, value_type>) |
| constexpr const T * | get_if () const noexcept |
| | Access the underlying shape with the given type if it is the currently active alternative.
|
| bool | isConvexShapeType () const noexcept |
| | Check if the shape held by this wrapper is a convex shape type.
|
| bool | isConvexPolytopeShapeType () const noexcept |
| | Check if the shape held by this wrapper is a convex polytope shape type.
|
| Volume | calculateVolume () const |
| | Calculate an estimate of the volume of the shape.
|
| PrincipalMomentsOfInertia< N > | calculatePrincipalMomentsOfInertia (Mass mass) const |
| | Calculate an estimate of the local moment of inertia of the shape given a certain mass.
|
| Optional< Box< N > > | getBoundingBox (const Transformation< N > &transformation) const |
| | Get the axis-aligned bounding box of the shape given its position and orientation in the world.
|
| Optional< Distance > | getBoundingRadius (const Basis< N > &basis) const |
| | Get the radius of the bounding sphere of the shape.
|
| Optional< Area > | getReferenceArea (const Basis< N > &basis, Direction< N > direction) const |
| | Get an estimate of the reference area of the shape for a certain direction, typically calculated as the area of the largest cross section orthogonal to the given direction.
|
| RaycastResult< N > | castLocalRay (Length< N > localRayOrigin, Direction< N > localRayDirection, Distance maxLocalRayDistance) const |
| | Find the closest intersection of this shape with a given ray in local space.
|
template<size_t N>
class grem::physics::ConvexShapeView< N >
View of a generic convex shape.
- Template Parameters
-
| N | number of dimensions of the world space (must be 2 or 3). |