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

◆ circular_bounds() [2/2]

std::function< bool(glm::vec3)> MayaFlux::Kinesis::circular_bounds ( glm::vec3  center,
float  radius 
)
inlinenoexcept

Containment test for a sphere.

Parameters
centerWorld-space center.
radiusRadius in world units.

Definition at line 308 of file Bounds.hpp.

309{
310 float r2 = radius * radius;
311 return [center, r2](const glm::vec3& p) {
312 glm::vec3 d = p - center;
313 return glm::dot(d, d) <= r2;
314 };
315}