|
HDK
|
#include <ImathSphere.h>
Public Member Functions | |
Constructors | |
| IMATH_HOSTDEVICE constexpr | Sphere3 () |
| Default is center at (0,0,0) and radius of 0. More... | |
| IMATH_HOSTDEVICE constexpr | Sphere3 (const Vec3< T > &c, T r) |
| Initialize to a given center and radius. More... | |
Manipulation | |
| IMATH_HOSTDEVICE void | circumscribe (const Box< Vec3< T >> &box) |
Utility Methods | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | intersect (const Line3< T > &l, Vec3< T > &intersection) const |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | intersectT (const Line3< T > &l, T &t) const |
Public Attributes | |
Direct access to member fields | |
| Vec3< T > | center |
| Center. More... | |
| T | radius |
| Radius. More... | |
|
inline |
Default is center at (0,0,0) and radius of 0.
Definition at line 45 of file ImathSphere.h.
|
inline |
Initialize to a given center and radius.
Definition at line 48 of file ImathSphere.h.
|
inline |
Set the center and radius of the sphere so that it tightly encloses Box b.
Definition at line 98 of file ImathSphere.h.
| IMATH_CONSTEXPR14 bool Sphere3< T >::intersect | ( | const Line3< T > & | l, |
| Vec3< T > & | intersection | ||
| ) | const |
If the sphere and line l intersect, then compute the smallest t with t>=0 so that l(t) is a point on the sphere.
| [in] | l | The line |
| [out] | intersection | The point of intersection |
Definition at line 148 of file ImathSphere.h.
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Sphere3< T >::intersectT | ( | const Line3< T > & | l, |
| T & | t | ||
| ) | const |
If the sphere and line l intersect, then compute the smallest t with t>=0 so that l(t) is a point on the sphere.
| [in] | l | The line |
| [out] | t | The parameter of the line at the intersection point |
Definition at line 106 of file ImathSphere.h.
Radius.
Definition at line 37 of file ImathSphere.h.