Level H Engine
Public Member Functions | Private Attributes | List of all members
BoundingSphereComponent Class Reference

A class that handles the bounding sphere component. More...

#include <BoundingSphereComponent.h>

Inheritance diagram for BoundingSphereComponent:
Inheritance graph
Collaboration diagram for BoundingSphereComponent:
Collaboration graph

Public Member Functions

virtual ~BoundingSphereComponent ()
 A virtual destructor. More...
 
void initaliseBoundingSphere (std::string meshID)
 A function to initalise the bounding sphere from a mesh. More...
 
float getBoundingSphereRadius ()
 A function to return the radius of the bounding sphere. More...
 
void scaleBoundingSphere (Vec3 scale)
 A function to scale the sphere. More...
 
virtual void onAwake ()
 A virtual function for the componets awake. More...
 
virtual void onDestroy ()
 A virtual function for the componets destroy. More...
 
void setNextPos (Vec3 inNextPos)
 A function to set the position of the sphere for the next loop for use with collision. More...
 
Vec3 getNextPos ()
 A function to get the position of the sphere for the next loop for use with collision. More...
 
- Public Member Functions inherited from Component
virtual ~Component ()
 A virtual destructor. More...
 
std::weak_ptr< GameObjectgetGameObject ()
 A function to get the game object linked with the component. More...
 
virtual void onUpdate ()
 A virtual function for the componets update. More...
 
virtual void onRender ()
 A virtual function for the componets render. More...
 
void setDestroyed (bool inDestroyed)
 A function to set the componets destroyed boolean. More...
 
bool getDestroyed ()
 A function to get the componets destroyed boolean. More...
 
std::string getID ()
 A function to set the components type ID. More...
 

Private Attributes

float initialSphereRad
 The initial radius of the bounding sphere. More...
 
float sphereRad
 The radius of the bounding sphere. More...
 
Vec3 nextPos
 The position in the next loop. More...
 

Additional Inherited Members

- Protected Attributes inherited from Component
std::string id
 The ID of the component type. More...
 

Detailed Description

A class that handles the bounding sphere component.

Constructor & Destructor Documentation

◆ ~BoundingSphereComponent()

BoundingSphereComponent::~BoundingSphereComponent ( )
virtual

A virtual destructor.

Member Function Documentation

◆ getBoundingSphereRadius()

float BoundingSphereComponent::getBoundingSphereRadius ( )
inline

A function to return the radius of the bounding sphere.

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

◆ getNextPos()

Vec3 BoundingSphereComponent::getNextPos ( )
inline

A function to get the position of the sphere for the next loop for use with collision.

Returns
The position of the sphere next loop.
Here is the caller graph for this function:

◆ initaliseBoundingSphere()

void BoundingSphereComponent::initaliseBoundingSphere ( std::string  meshID)

A function to initalise the bounding sphere from a mesh.

Parameters
meshIDThe ID of the mesh.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onAwake()

void BoundingSphereComponent::onAwake ( )
virtual

A virtual function for the componets awake.

Reimplemented from Component.

Here is the caller graph for this function:

◆ onDestroy()

void BoundingSphereComponent::onDestroy ( )
virtual

A virtual function for the componets destroy.

Reimplemented from Component.

Here is the caller graph for this function:

◆ scaleBoundingSphere()

void BoundingSphereComponent::scaleBoundingSphere ( Vec3  scale)
inline

A function to scale the sphere.

Parameters
Thescale vector.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNextPos()

void BoundingSphereComponent::setNextPos ( Vec3  inNextPos)
inline

A function to set the position of the sphere for the next loop for use with collision.

Parameters
inNextPosThe position of the sphere next loop.
Here is the caller graph for this function:

Member Data Documentation

◆ initialSphereRad

float BoundingSphereComponent::initialSphereRad
private

The initial radius of the bounding sphere.

◆ nextPos

Vec3 BoundingSphereComponent::nextPos
private

The position in the next loop.

◆ sphereRad

float BoundingSphereComponent::sphereRad
private

The radius of the bounding sphere.


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