Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor::BoundingSphere Class Reference

#include <BoundingSphere.hpp>

Inheritance diagram for castor::BoundingSphere:
Inheritance graph
[legend]
Collaboration diagram for castor::BoundingSphere:
Collaboration graph
[legend]

Public Member Functions

CU_API BoundingSphere ()=default
 
CU_API BoundingSphere (Point3f const &center, float radius)
 Specified constructor.
 
CU_API BoundingSphere (BoundingBox const &box)
 Constructor from a BoundingBox.
 
CU_API void load (Point3f const &center, float radius)
 Reinitialises the sphere box.
 
CU_API void load (BoundingBox const &box)
 Reinitialises the sphere box from a BoundingBox.
 
CU_API bool isWithin (Point3f const &point) const override
 Tests if a vertex is within the container, id est inside it but not on it's limits.
 
CU_API bool isOnLimits (Point3f const &point) const override
 Tests if a vertex is on the limits of this container, and not within.
 
float getRadius () const
 
- Public Member Functions inherited from castor::BoundingContainer< Dimension >
CU_API BoundingContainer ()=default
 
CU_API BoundingContainer (BoundingContainer const &)=default
 
CU_API BoundingContainer (BoundingContainer &&) noexcept=default
 
CU_API BoundingContaineroperator= (BoundingContainer const &)=default
 
CU_API BoundingContaineroperator= (BoundingContainer &&) noexcept=default
 
virtual CU_API ~BoundingContainer () noexcept=default
 
 BoundingContainer (MyPoint center)
 Constructor from center.
 
virtual CU_API bool isWithin (MyPoint const &point) const =0
 Tests if a vertex is within the container, id est inside it but not on it's limits.
 
virtual CU_API bool isOnLimits (MyPoint const &point) const =0
 Tests if a vertex is on the limits of this container, and not within.
 
MyPoint const & getCenter () const
 

Additional Inherited Members

- Public Types inherited from castor::BoundingContainer< Dimension >
using MyPoint = Point< float, Dimension >
 
- Protected Member Functions inherited from castor::BoundingContainer< Dimension >
void setCenter (MyPoint center) noexcept
 

Constructor & Destructor Documentation

◆ BoundingSphere() [1/3]

CU_API castor::BoundingSphere::BoundingSphere ( )
default

◆ BoundingSphere() [2/3]

CU_API castor::BoundingSphere::BoundingSphere ( Point3f const & center,
float radius )

Specified constructor.

Parameters
[in]centerThe center of the sphere.
[in]radiusThe radius of the sphere.

◆ BoundingSphere() [3/3]

CU_API castor::BoundingSphere::BoundingSphere ( BoundingBox const & box)
explicit

Constructor from a BoundingBox.

Parameters
[in]boxThe BoundingBox.

Member Function Documentation

◆ getRadius()

float castor::BoundingSphere::getRadius ( ) const
inline
Returns
The radius.

◆ isOnLimits()

CU_API bool castor::BoundingSphere::isOnLimits ( Point3f const & point) const
override

Tests if a vertex is on the limits of this container, and not within.

Parameters
[in]pointThe vertex to test.
Returns
true if the vertex is on the limits of the container, false if not.

◆ isWithin()

CU_API bool castor::BoundingSphere::isWithin ( Point3f const & point) const
override

Tests if a vertex is within the container, id est inside it but not on it's limits.

Parameters
[in]pointThe vertex to test.
Returns
true if the vertex is within the container, false if not.

◆ load() [1/2]

CU_API void castor::BoundingSphere::load ( BoundingBox const & box)

Reinitialises the sphere box from a BoundingBox.

Parameters
[in]boxThe BoundingBox.

◆ load() [2/2]

CU_API void castor::BoundingSphere::load ( Point3f const & center,
float radius )

Reinitialises the sphere box.

Parameters
[in]centerThe center.
[in]radiusThe radius.

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