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::VolumeBox Struct Reference

Holds the parameters describing the spatial query volume of a simple three-dimensionsal box. More...

#include <spatial_query_basic_types.hpp>

Inheritance diagram for ToyMaker::VolumeBox:
ToyMaker::Volume< VolumeBox > ToyMaker::VolumeBase_

Public Member Functions

std::array< glm::vec3, 8 > getVolumeRelativeBoxCorners () const
 Returns an array of coordinates corresponding to the corners of the box.
 
bool isSensible () const
 Tests whether the values representing the box are valid (as opposed to invalid, infinite, or degenerate).
 
- Public Member Functions inherited from ToyMaker::Volume< VolumeBox >
std::array< glm::vec3, 8 > getVolumeRelativeBoxCorners () const
 Poor man's vtable cont'd.
 
- Public Member Functions inherited from ToyMaker::VolumeBase_
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.
 

Public Attributes

glm::vec3 mDimensions {0.f, 0.f, 0.f}
 The dimensions of the box, its width, height, and depth.
 

Additional Inherited Members

- Static Public Member Functions inherited from ToyMaker::VolumeBase_
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

Holds the parameters describing the spatial query volume of a simple three-dimensionsal box.

Member Function Documentation

◆ getVolumeRelativeBoxCorners()

std::array< glm::vec3, 8 > ToyMaker::VolumeBox::getVolumeRelativeBoxCorners ( ) const
inline

Returns an array of coordinates corresponding to the corners of the box.

Returns
std::array<glm::vec3, 8> An array of box corner coordinates.

◆ isSensible()

bool ToyMaker::VolumeBox::isSensible ( ) const
inline

Tests whether the values representing the box are valid (as opposed to invalid, infinite, or degenerate).

Return values
trueThe box is sensible;
falseThe box is not sensible;

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