vmmlib
1.7.0
|
Public Types | |
typedef vector< 3, T > | vec3 |
typedef vector< 4, T > | vec4 |
Public Member Functions | |
intersection (const vec3 &origin, const vec3 &direction) | |
Constructors. More... | |
bool | test_sphere (const vec4 &sphere, T &t) const |
Ray Sphere Intersection - Optimized solution "Real-time Rendering 3rd Edition". More... | |
Definition at line 47 of file intersection.hpp.
|
inline |
Constructors.
[in] | origin | Ray origin |
[in] | direction | Ray direction |
Definition at line 59 of file intersection.hpp.
bool vmml::intersection< T >::test_sphere | ( | const vec4 & | sphere, |
T & | t | ||
) | const |
Ray Sphere Intersection - Optimized solution "Real-time Rendering 3rd Edition".
[in] | center | Sphere center |
[in] | radius | Sphere radius |
[out] | t | Intersection distance |
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 86 of file intersection.hpp.