|
vmmlib
1.13.0
Templatized C++ vector and matrix math library
|
Collaboration diagram for vmml::Ray< T >:Public Types | |
| typedef vector< 3, T > | vec3 |
| typedef vector< 4, T > | vec4 |
Public Member Functions | |
| Ray (const vec3 &origin, const vec3 &direction) | |
| Constructor. More... | |
| T | test (const vec4 &sphere) const |
| Ray-Sphere Intersection. More... | |
Constructor.
Definition at line 60 of file ray.hpp.
References vmml::Ray< T >::test().
Here is the call graph for this function:Ray-Sphere Intersection.
Optimized solution from "Real-time Rendering 3rd Edition"
| sphere | x,y,z center + radius of sphere |
Sphere behind the ray origin and ray origin outside the sphere
Squared distance from sphere center to the projection
Distance from the sphere center to the surface along the ray direction
Definition at line 83 of file ray.hpp.
Referenced by vmml::Ray< T >::Ray().
Here is the caller graph for this function: