|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Line segment shape parallel to the local Y axis. More...
#include <GREM/physics/Shape.hpp>
Public Member Functions | |
| GREM_ALWAYS_INLINE Volume | calculateVolume () const |
| Calculate an estimate of the volume of the shape. | |
| GREM_ALWAYS_INLINE PrincipalMomentsOfInertia< N > | calculatePrincipalMomentsOfInertia (Mass mass) const |
| Calculate an estimate of the local moment of inertia of the shape given a certain mass. | |
| GREM_ALWAYS_INLINE 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. | |
| GREM_ALWAYS_INLINE Optional< Distance > | getBoundingRadius (const Basis< N > &basis) const |
| Get the radius of the bounding sphere of the shape. | |
| GREM_ALWAYS_INLINE 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. | |
| GREM_ALWAYS_INLINE 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. | |
| GREM_ALWAYS_INLINE bool | containsLocalPoint (Length< N > localPoint) const |
| Check if a local point relative to the origin of the shape is contained within the shape. | |
| GREM_ALWAYS_INLINE 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. | |
Public Attributes | |
| Distance | halfLength |
| Half of the line segment's length along its local Y axis. Must be positive. | |
Line segment shape parallel to the local Y axis.
| N | number of dimensions of the world space (must be 2 or 3). |
|
inlinenodiscard |
Calculate an estimate of the volume of the shape.
|
inlinenodiscard |
Calculate an estimate of the local moment of inertia of the shape given a certain mass.
| mass | assumed mass of the shape. |
|
inlinenodiscard |
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. |
|
inlinenodiscard |
Get the radius of the bounding sphere of the shape.
| basis | transformation basis of the shape in world space. |
|
inlinenodiscard |
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. |
|
inlinenodiscard |
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. |
|
inlinenodiscard |
Check if a local point relative to the origin of the shape is contained within the shape.
| localPoint | point in shape-local space to check. |
| BadVariantAccess | if the underlying shape type is not convex. |
|
inlinenodiscard |
Get the local offset from the origin of the shape to the farthest point on the shape in a certain local direction.
| localDirection | unit vector in shape-local space of the direction to evaluate. Must be a unit vector. |
| BadVariantAccess | if the underlying shape type is not convex. |
| Distance grem::physics::LineSegmentShape< N >::halfLength |
Half of the line segment's length along its local Y axis. Must be positive.