|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
Bounding sphere defined by center and radius for intersection and containment tests. More...
#include <core/shape/boundingSphere.h>
Public Member Functions | |
| BoundingSphere () | |
| BoundingSphere (const Vector3 ¢er, float radius) | |
| const Vector3 & | center () const |
| BoundingSphere | clone () const |
| bool | containsPoint (const Vector3 &point) const |
| BoundingSphere & | copy (const BoundingSphere &src) |
| bool | intersectsBoundingSphere (const BoundingSphere &sphere) const |
| bool | intersectsRay (const Ray &ray, Vector3 *point=nullptr) const |
| float | radius () const |
| void | setCenter (const Vector3 ¢er) |
| void | setRadius (const float radius) |
Bounding sphere defined by center and radius for intersection and containment tests.
Definition at line 14 of file boundingSphere.h.
| visutwin::canvas::BoundingSphere::BoundingSphere | ( | ) |
Definition at line 12 of file boundingSphere.cpp.
Referenced by clone(), copy(), and intersectsBoundingSphere().
| visutwin::canvas::BoundingSphere::BoundingSphere | ( | const Vector3 & | center, |
| float | radius ) |
Definition at line 16 of file boundingSphere.cpp.
|
inline |
Definition at line 20 of file boundingSphere.h.
Referenced by BoundingSphere(), visutwin::canvas::OrientedBox::intersectsBoundingSphere(), and setCenter().
|
nodiscard |
Definition at line 27 of file boundingSphere.cpp.
References BoundingSphere().
|
nodiscard |
Definition at line 32 of file boundingSphere.cpp.
References visutwin::canvas::Vector3::lengthSquared().
| BoundingSphere & visutwin::canvas::BoundingSphere::copy | ( | const BoundingSphere & | src | ) |
Definition at line 20 of file boundingSphere.cpp.
References BoundingSphere().
|
nodiscard |
Definition at line 61 of file boundingSphere.cpp.
References BoundingSphere(), and visutwin::canvas::Vector3::lengthSquared().
| bool visutwin::canvas::BoundingSphere::intersectsRay | ( | const Ray & | ray, |
| Vector3 * | point = nullptr ) const |
Definition at line 38 of file boundingSphere.cpp.
References visutwin::canvas::Ray::direction(), visutwin::canvas::Vector3::dot(), visutwin::canvas::Vector3::normalized(), and visutwin::canvas::Ray::origin().
|
inline |
Definition at line 23 of file boundingSphere.h.
Referenced by BoundingSphere(), visutwin::canvas::OrientedBox::intersectsBoundingSphere(), and setRadius().
|
inline |
Definition at line 21 of file boundingSphere.h.
References center().
|
inline |
Definition at line 24 of file boundingSphere.h.
References radius().