Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
ToyMaker::VolumeBase_ Struct Reference

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

#include <spatial_query_basic_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
 Poor man's vtable which doesn't break Volume's ability to be aggregate initialized.
 

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()

static 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()

static 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

Poor man's vtable which doesn't break Volume's ability to be aggregate initialized.

See also
Volume::getVolumeRelativeBoxCorners()
Todo
I forget why I was doing this in the first place. Do we have a problem here?

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