MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ overlaps_ray()

bool MayaFlux::Kinesis::BoundingSphere::overlaps_ray ( const Ray ray) const
inlinenoexcept

Returns true if the ray passes through or originates inside the sphere.

Parameters
rayWorld-space ray with normalized direction.

Definition at line 119 of file Bounds.hpp.

120 {
121 glm::vec3 oc = ray.origin - center;
122 float b = glm::dot(oc, ray.direction);
123 float c = glm::dot(oc, oc) - radius * radius;
124 return b * b - c >= 0.0F;
125 }
size_t b

References b, center, and radius.