Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
|
Geometrical, mathematical functions and related structs used to answer some simple questions about shapes situated somewhere in the world. More...
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include "spatial_query_basic_types.hpp"
#include "core/ecs_world.hpp"
Go to the source code of this file.
Classes | |
struct | ToyMaker::ObjectBounds |
A component defining the true bounds of a spatially queryable object situated somewhere in the world. More... | |
union | ToyMaker::ObjectBounds::TrueVolume |
A union of supported volume structs. More... | |
class | ToyMaker::AxisAlignedBounds |
An object containing a coarse simplified representation, AABB, of spatially queryable objects. More... | |
Namespaces | |
namespace | ToyMaker |
Namespace containing all class definitions and functions related to the ToyMaker engine. | |
Functions | |
std::array< AreaTriangle, 12 > | ToyMaker::computeBoxFaceTriangles (const std::array< glm::vec3, 8 > &boxCorners) |
Generates a list of triangles making up the surface of a box situated somewhere in the world, given the coordinates of its corners. | |
std::pair< bool, glm::vec3 > | ToyMaker::computeIntersection (const Ray &ray, const Plane &plane) |
Returns a bool-vector pair, with bool indicating whether a point of intersection was found, and the vector containing the point of intersection. | |
std::pair< bool, glm::vec3 > | ToyMaker::computeIntersection (const Ray &ray, const AreaTriangle &triangle) |
Returns a bool-vector pair, with bool indicating whether a point of intersection was found, and the vector containing the point of intersection. | |
std::pair< uint8_t, std::pair< glm::vec3, glm::vec3 > > | ToyMaker::computeIntersections (const Ray &ray, const AxisAlignedBounds &axisAlignedBounds) |
Returns an unsigned int and vector-pair pair, with unsigned indicating whether any and how many points of intersection were found with the AABB, and the vector containing the points of intersection. | |
bool | ToyMaker::overlaps (const glm::vec3 &point, const AxisAlignedBounds &bounds) |
Returns an unsigned int and vector pair pair, with int indicating whether and how many points of intersection were found, and the vector containing the points of intersection. | |
bool | ToyMaker::overlaps (const Ray &ray, const AxisAlignedBounds &bounds) |
Returns whether ray overlaps with bounds . | |
bool | ToyMaker::overlaps (const AxisAlignedBounds &one, const AxisAlignedBounds &two) |
Returns whether one overlaps two . | |
bool | ToyMaker::contains (const glm::vec3 &point, const AxisAlignedBounds &bounds) |
Returns whether point is contained by bounds . | |
bool | ToyMaker::contains (const Ray &ray, const AxisAlignedBounds &bounds) |
Returns whether ray is contained by bounds . | |
bool | ToyMaker::contains (const AxisAlignedBounds &one, const AxisAlignedBounds &two) |
Returns whether one is contained by two . | |
ToyMaker::NLOHMANN_JSON_SERIALIZE_ENUM (ObjectBounds::TrueVolumeType, { {ObjectBounds::TrueVolumeType::BOX, "box"}, {ObjectBounds::TrueVolumeType::SPHERE, "sphere"}, {ObjectBounds::TrueVolumeType::CAPSULE, "capsule"}, }) inline void to_json(nlohmann | |
void | ToyMaker::from_json (const nlohmann::json &json, ObjectBounds &objectBounds) |
void | ToyMaker::to_json (nlohmann::json &json, const AxisAlignedBounds &axisAlignedBounds) |
void | ToyMaker::from_json (const nlohmann::json &json, AxisAlignedBounds &objectBounds) |
Geometrical, mathematical functions and related structs used to answer some simple questions about shapes situated somewhere in the world.