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

Holds parameters describing a spherical spatial query volume. More...

#include <types.hpp>

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

Public Member Functions

std::array< glm::vec3, 8 > getVolumeRelativeBoxCorners () const
 Gets an array of coordinates of corners of a box just encapsulating the sphere.
bool isSensible () const
 Tests whether this volume's parameters are sensible (as opposed to invalid or infinite).
bool isPositiveStrict () const
 Tests whether this volume's parameters are strictly positive.
Public Member Functions inherited from ToyMaker::Volume< VolumeSphere >
std::array< glm::vec3, 8 > getVolumeRelativeBoxCorners () const
 Poor man's vtable cont'd.
bool isSensible () const
 Poor man's vtable cont'd.
bool isPositiveStrict () const
 Poor man's vtable cont'd.
Public Member Functions inherited from ToyMaker::VolumeBase_
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.

Public Attributes

float mRadius {0.f}
 The radius of the sphere.

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 parameters describing a spherical spatial query volume.

Member Function Documentation

◆ getVolumeRelativeBoxCorners()

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

Gets an array of coordinates of corners of a box just encapsulating the sphere.

Returns
std::array<glm::vec3, 8> An array of coordinates of a box containing the sphere.

◆ isPositiveStrict()

bool ToyMaker::VolumeSphere::isPositiveStrict ( ) const
inline

Tests whether this volume's parameters are strictly positive.

Return values
trueThe sphere's radius is strictly positive;
falseThe sphere's radius is not strictly positive;

◆ isSensible()

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

Tests whether this volume's parameters are sensible (as opposed to invalid or infinite).

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

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