ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
Loading...
Searching...
No Matches
ToyMaker::VolumeBase_ Struct Reference

The base class of all spatial query volumes. More...

#include <types.hpp>

Inheritance diagram for ToyMaker::VolumeBase_:
ToyMaker::Volume< VolumeBox > ToyMaker::Volume< VolumeCapsule > ToyMaker::Volume< VolumeSphere > ToyMaker::Volume< TDerived > ToyMaker::VolumeBox ToyMaker::VolumeCapsule ToyMaker::VolumeSphere

Public Member Functions

template<typename TDerived>
std::array< glm::vec3, 8 > getVolumeRelativeBoxCorners () const
 Gets corners of the object-relative bounding box that encapsulates the derived volume.
template<typename TDerived>
bool isSensible () const
 Returns whether or not the derived volume has sensible parameters (i.e., isn't infinite or invalid).
template<typename TDerived>
bool isPositiveStrict () const
 Returns whether or not the derived volume has strictly positive parameters.

Static Public Member Functions

static constexpr std::array< glm::vec3, 8 > GetCornerSignsArray ()
 Returns an array populated with axis-wise sign multipliers, where the positions on the array correspond to the corner of a box.
static std::array< glm::vec3, 8 > ComputeBoxCorners (const glm::vec3 &boxDimensions)
 Computes the model relative corners of a box, given the dimensions of the box.

Detailed Description

The base class of all spatial query volumes.

Provides functions and methods for retrieving and computing volume relative and axis aligned box corner coordinates.

Member Function Documentation

◆ ComputeBoxCorners()

std::array< glm::vec3, 8 > ToyMaker::VolumeBase_::ComputeBoxCorners ( const glm::vec3 & boxDimensions)
inlinestatic

Computes the model relative corners of a box, given the dimensions of the box.

Parameters
boxDimensionsA box's width, height, and depth.
Returns
std::array<glm::vec3, 8> An array of box corner coordinates.

◆ GetCornerSignsArray()

constexpr std::array< glm::vec3, 8 > ToyMaker::VolumeBase_::GetCornerSignsArray ( )
inlinestaticconstexpr

Returns an array populated with axis-wise sign multipliers, where the positions on the array correspond to the corner of a box.

Returns
constexpr std::array<glm::vec3, 8> Array of axis-wise sign multipliers for box corners.
See also
BoxCornerSpecifier
BoxCorner

◆ getVolumeRelativeBoxCorners()

template<typename TDerived>
std::array< glm::vec3, 8 > ToyMaker::VolumeBase_::getVolumeRelativeBoxCorners ( ) const
inline

Gets corners of the object-relative bounding box that encapsulates the derived volume.

Forces subclasses to implement their own version of this function without breaking their ability to be aggregate initialized.

See also
Volume::getVolumeRelativeBoxCorners()

◆ isPositiveStrict()

template<typename TDerived>
bool ToyMaker::VolumeBase_::isPositiveStrict ( ) const
inline

Returns whether or not the derived volume has strictly positive parameters.

Forces subclasses to implement their own version of this function without breaking their ability to be aggregate initialized

See also
Volume::isPositiveStrict()

◆ isSensible()

template<typename TDerived>
bool ToyMaker::VolumeBase_::isSensible ( ) const
inline

Returns whether or not the derived volume has sensible parameters (i.e., isn't infinite or invalid).

Forces subclasses to implement their own version of this function without breaking their ability to be aggregate initialized.

See also
Volume::isSensible()

The documentation for this struct was generated from the following file:
  • ToyMaker_Main/include/toymaker/engine/spatial_query/types.hpp