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

A set of numbers describing a ray with its source at some finite point in the world, projected in a direction for some positive length. More...

#include <types.hpp>

Public Member Functions

bool isSensible () const
 Tests whether the ray is sensible (as opposed to invalid).
bool isPositiveStrict () const
 Tests whether the ray actually travels any distance from its origin.

Public Attributes

glm::vec3 mStart { 0.f }
 A point representing the starting point of the ray.
glm::vec3 mDirection { 0.f, 0.f, -1.f }
 The direction the ray is pointing in.
float mLength { std::numeric_limits<float>::infinity() }
 The length of the ray, infinite by default.

Detailed Description

A set of numbers describing a ray with its source at some finite point in the world, projected in a direction for some positive length.

Member Function Documentation

◆ isPositiveStrict()

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

Tests whether the ray actually travels any distance from its origin.

Return values
trueThe ray travels some length away from its origin;
falseThe ray does not travel any length away from its origin

◆ isSensible()

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

Tests whether the ray is sensible (as opposed to invalid).

Return values
trueThe ray is sensible;
falseThe ray isn't sensible;

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