![]() |
Atoms Crowd
7.0.0
|
#include <ImathSphere.h>
Public Member Functions | |
Constructors | |
| constexpr ATOMSMATH_HOSTDEVICE | Sphere3 () |
| Default is center at (0,0,0) and radius of 0. | |
| constexpr ATOMSMATH_HOSTDEVICE | Sphere3 (const Vec3< T > &c, T r) |
| Initialize to a given center and radius. | |
Manipulation | |
| ATOMSMATH_HOSTDEVICE void | circumscribe (const Box< Vec3< T >> &box) |
Utility Methods | |
| ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | intersect (const Line3< T > &l, Vec3< T > &intersection) const |
| ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | intersectT (const Line3< T > &l, T &t) const |
Public Attributes | |
Direct access to member fields | |
| Vec3< T > | center |
| Center. | |
| T | radius |
| Radius. | |
A 3D sphere
Set the center and radius of the sphere so that it tightly encloses Box b.
| ATOMSMATH_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 |
| ATOMSMATH_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 |