GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::physics::InfinitePlaneShape3D Struct Reference

Infinite plane shape perpendicular to the local Y axis in 3-dimensional space. 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 PrincipalMomentsOfInertia3D calculatePrincipalMomentsOfInertia (Mass mass) const
 Calculate an estimate of the local moment of inertia of the shape given a certain mass.
GREM_ALWAYS_INLINE Optional< Box3D > getBoundingBox (const Transformation3D &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 Basis3D &basis) const
 Get the radius of the bounding sphere of the shape.
GREM_ALWAYS_INLINE Optional< Area > getReferenceArea (const Basis3D &basis, Direction3D 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.
RaycastResult3D castLocalRay (Length3D localRayOrigin, Direction3D localRayDirection, Distance maxLocalRayDistance) const
 Find the closest intersection of this shape with a given ray in local space.

Detailed Description

Infinite plane shape perpendicular to the local Y axis in 3-dimensional space.

Member Function Documentation

◆ calculateVolume()

GREM_ALWAYS_INLINE Volume grem::physics::InfinitePlaneShape3D::calculateVolume ( ) const
inlinenodiscard

Calculate an estimate of the volume of the shape.

Returns
the estimated volume of the shape.

◆ calculatePrincipalMomentsOfInertia()

GREM_ALWAYS_INLINE PrincipalMomentsOfInertia3D grem::physics::InfinitePlaneShape3D::calculatePrincipalMomentsOfInertia ( Mass mass) const
inlinenodiscard

Calculate an estimate of the local moment of inertia of the shape given a certain mass.

Parameters
massassumed mass of the shape.
Returns
the estimated moment of inertia in shape-local space.

◆ getBoundingBox()

GREM_ALWAYS_INLINE Optional< Box3D > grem::physics::InfinitePlaneShape3D::getBoundingBox ( const Transformation3D & transformation) const
inlinenodiscard

Get the axis-aligned bounding box of the shape given its position and orientation in the world.

Parameters
transformationtransformation of the shape in world space.
Returns
an axis-aligned bounding box in world space that would contain the entire shape if the shape was at the given position and orientation in the world, or an empty optional if the shape extends infinitely and cannot be fit inside a finite box.

◆ getBoundingRadius()

GREM_ALWAYS_INLINE Optional< Distance > grem::physics::InfinitePlaneShape3D::getBoundingRadius ( const Basis3D & basis) const
inlinenodiscard

Get the radius of the bounding sphere of the shape.

Parameters
basistransformation basis of the shape in world space.
Returns
the maximum distance from the origin of any point on the shape, or an empty optional if the shape extends infinitely and cannot be fit inside a finite sphere.

◆ getReferenceArea()

GREM_ALWAYS_INLINE Optional< Area > grem::physics::InfinitePlaneShape3D::getReferenceArea ( const Basis3D & basis,
Direction3D direction ) const
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.

Parameters
basistransformation basis of the shape in world space.
directiondirection to get the reference area for.
Returns
the reference area, or an empty optional if an area cannot be determined, e.g. because the shape is infinite.

◆ castLocalRay()

RaycastResult3D grem::physics::InfinitePlaneShape3D::castLocalRay ( Length3D localRayOrigin,
Direction3D localRayDirection,
Distance maxLocalRayDistance ) const
nodiscard

Find the closest intersection of this shape with a given ray in local space.

Parameters
localRayOriginoffset of the ray origin in shape-local space.
localRayDirectionunit direction vector of the ray in shape-local space. Must be a unit vector.
maxLocalRayDistancemaximum hit distance of the ray in shape-local space. Must be non-negative.
Returns
the result of the raycast.

The documentation for this struct was generated from the following file: