SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
CollisionVolumeBSphere Class Reference

Represents a bounding sphere collision volume. More...

#include <CollisionVolumeBSphere.h>

Inheritance diagram for CollisionVolumeBSphere:
Inheritance graph

Public Member Functions

 CollisionVolumeBSphere (const CollisionVolumeBSphere &)=delete
 
CollisionVolumeBSphereoperator= (const CollisionVolumeBSphere &)=delete
 
void ComputeData (Model *mod, const Matrix &mat) override
 Computes the collision data for the bounding sphere.
 
const Vect & GetCenter () const
 Gets the center of the bounding sphere.
 
float GetRadius () const
 Gets the radius of the bounding sphere.
 
void DebugView (const Vect &col) const override
 
bool IntersectAccept (const CollisionVolume &other) const override
 
bool IntersectVisit (const CollisionVolumeBSphere &other) const override
 
bool IntersectVisit (const CollisionVolumeAABB &other) const override
 
bool IntersectVisit (const CollisionVolumeOBB &other) const override
 
- Public Member Functions inherited from CollisionVolume
 CollisionVolume (const CollisionVolume &)=delete
 
CollisionVolumeoperator= (const CollisionVolume &)=delete
 
virtual VolumeType GetType () const
 
- Public Member Functions inherited from Align16
void * operator new (size_t, void *p) noexcept
 
void * operator new (size_t size) noexcept
 
void operator delete (void *p)
 
void * operator new[] (size_t size) noexcept
 
void operator delete[] (void *p)
 
void * operator new (size_t size, int _BlockUse, char const *_FileName, int _LineNumber) noexcept
 
void operator delete (void *p, int _BlockUse, char const *_FileName, int _LineNumber)
 
void * operator new[] (size_t size, int _BlockUse, char const *_FileName, int _LineNumber) noexcept
 
void operator delete[] (void *p, int _BlockUse, char const *_FileName, int _LineNumber)
 

Private Attributes

Vect center
 The center of the bounding sphere.
 
float radius
 The radius of the bounding sphere.
 

Detailed Description

Represents a bounding sphere collision volume.

The CollisionVolumeBSphere class represents a bounding sphere collision volume. It provides methods to compute collision data, get the center and radius, and check intersections with other volumes.

Member Function Documentation

◆ ComputeData()

void CollisionVolumeBSphere::ComputeData ( Model * mod,
const Matrix & mat )
overridevirtual

Computes the collision data for the bounding sphere.

Parameters
modPointer to the model.
matThe transformation matrix.

Implements CollisionVolume.

◆ DebugView()

void CollisionVolumeBSphere::DebugView ( const Vect & col) const
overridevirtual

Implements CollisionVolume.

◆ GetCenter()

const Vect & CollisionVolumeBSphere::GetCenter ( ) const

Gets the center of the bounding sphere.

Returns
The center of the bounding sphere.
Here is the caller graph for this function:

◆ GetRadius()

float CollisionVolumeBSphere::GetRadius ( ) const

Gets the radius of the bounding sphere.

Returns
The radius of the bounding sphere.
Here is the caller graph for this function:

◆ IntersectAccept()

bool CollisionVolumeBSphere::IntersectAccept ( const CollisionVolume & other) const
overridevirtual

Implements CollisionVolume.

◆ IntersectVisit() [1/3]

bool CollisionVolumeBSphere::IntersectVisit ( const CollisionVolumeAABB & other) const
overridevirtual

Implements CollisionVolume.

◆ IntersectVisit() [2/3]

bool CollisionVolumeBSphere::IntersectVisit ( const CollisionVolumeBSphere & other) const
overridevirtual

Implements CollisionVolume.

◆ IntersectVisit() [3/3]

bool CollisionVolumeBSphere::IntersectVisit ( const CollisionVolumeOBB & other) const
overridevirtual

Implements CollisionVolume.


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