|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Wrapper of another shape with a local transformation applied to it. More...
#include <GREM/physics/Shape.hpp>
Public Member Functions | |
| 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. | |
Public Attributes | |
| SharedPointer< Shape< N > > | shape |
| Shape being transformed. Must not be nullptr. | |
| Length< N > | localOffset {} |
| Local offset of the transformed shape relative to the outer shape. | |
| Orientation< N > | localOrientation {} |
| Local orientation of the transformed shape relative to the outer shape. | |
| Scale< N > | localScale {Scalar{1}} |
| Local scale of the transformed shape relative to the outer shape. Each component must be positive. | |
Wrapper of another shape with a local transformation applied to it.
| N | number of dimensions of the world space (must be 2 or 3). |
|
nodiscard |
Calculate an estimate of the volume of the shape.
|
nodiscard |
Calculate an estimate of the local moment of inertia of the shape given a certain mass.
| mass | assumed mass of the shape. |
|
nodiscard |
Get the axis-aligned bounding box of the shape given its position and orientation in the world.
| transformation | transformation of the shape in world space. |
|
nodiscard |
Get the radius of the bounding sphere of the shape.
| basis | transformation basis of the shape in world space. |
|
nodiscard |
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.
| basis | transformation basis of the shape in world space. |
| direction | direction to get the reference area for. |
|
nodiscard |
Find the closest intersection of this shape with a given ray in local space.
| localRayOrigin | offset of the ray origin in shape-local space. |
| localRayDirection | unit direction vector of the ray in shape-local space. Must be a unit vector. |
| maxLocalRayDistance | maximum hit distance of the ray in shape-local space. Must be non-negative. |
| SharedPointer<Shape<N> > grem::physics::LocallyTransformedShape< N >::shape |
Shape being transformed. Must not be nullptr.
| Length<N> grem::physics::LocallyTransformedShape< N >::localOffset {} |
Local offset of the transformed shape relative to the outer shape.
| Orientation<N> grem::physics::LocallyTransformedShape< N >::localOrientation {} |
Local orientation of the transformed shape relative to the outer shape.
| Scale<N> grem::physics::LocallyTransformedShape< N >::localScale {Scalar{1}} |
Local scale of the transformed shape relative to the outer shape. Each component must be positive.