VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::BoundingSphere Class Reference

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 &center, float radius)
const Vector3center () const
BoundingSphere clone () const
bool containsPoint (const Vector3 &point) const
BoundingSpherecopy (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 &center)
void setRadius (const float radius)

Detailed Description

Bounding sphere defined by center and radius for intersection and containment tests.

Definition at line 14 of file boundingSphere.h.

Constructor & Destructor Documentation

◆ BoundingSphere() [1/2]

visutwin::canvas::BoundingSphere::BoundingSphere ( )

Definition at line 12 of file boundingSphere.cpp.

Referenced by clone(), copy(), and intersectsBoundingSphere().

◆ BoundingSphere() [2/2]

visutwin::canvas::BoundingSphere::BoundingSphere ( const Vector3 & center,
float radius )

Definition at line 16 of file boundingSphere.cpp.

References center(), and radius().

Member Function Documentation

◆ center()

const Vector3 & visutwin::canvas::BoundingSphere::center ( ) const
inline

◆ clone()

BoundingSphere visutwin::canvas::BoundingSphere::clone ( ) const
nodiscard

Definition at line 27 of file boundingSphere.cpp.

References BoundingSphere().

◆ containsPoint()

bool visutwin::canvas::BoundingSphere::containsPoint ( const Vector3 & point) const
nodiscard

Definition at line 32 of file boundingSphere.cpp.

References visutwin::canvas::Vector3::lengthSquared().

◆ copy()

BoundingSphere & visutwin::canvas::BoundingSphere::copy ( const BoundingSphere & src)

Definition at line 20 of file boundingSphere.cpp.

References BoundingSphere().

◆ intersectsBoundingSphere()

bool visutwin::canvas::BoundingSphere::intersectsBoundingSphere ( const BoundingSphere & sphere) const
nodiscard

◆ intersectsRay()

bool visutwin::canvas::BoundingSphere::intersectsRay ( const Ray & ray,
Vector3 * point = nullptr ) const

◆ radius()

float visutwin::canvas::BoundingSphere::radius ( ) const
inline

◆ setCenter()

void visutwin::canvas::BoundingSphere::setCenter ( const Vector3 & center)
inline

Definition at line 21 of file boundingSphere.h.

References center().

◆ setRadius()

void visutwin::canvas::BoundingSphere::setRadius ( const float radius)
inline

Definition at line 24 of file boundingSphere.h.

References radius().


The documentation for this class was generated from the following files: