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

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

#include <BoundingBoxComponent.h>

Inheritance diagram for BoundingBoxComponent:
Inheritance graph
Collaboration diagram for BoundingBoxComponent:
Collaboration graph

Public Member Functions

virtual ~BoundingBoxComponent ()
 A virtual destructor. More...
 
void initaliseBoundingBox (std::string meshID)
 A function to initalise the bounding box from a mesh. More...
 
Vec3 getBoundingBoxDimensions ()
 A function to return the dimensions of the bounding box. More...
 
void scaleBoundingBox (Vec3 scale)
 A function to scale the bounding box. 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 box for the next loop for use with collision. More...
 
Vec3 getNextPos ()
 A function to get the position of the box 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

Vec3 initialBoxDim
 The initial dimensions of the bouncing box. More...
 
Vec3 boxDim
 The dimensions of the bouncing box. 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 box component.

Constructor & Destructor Documentation

◆ ~BoundingBoxComponent()

BoundingBoxComponent::~BoundingBoxComponent ( )
virtual

A virtual destructor.

Member Function Documentation

◆ getBoundingBoxDimensions()

Vec3 BoundingBoxComponent::getBoundingBoxDimensions ( )
inline

A function to return the dimensions of the bounding box.

Returns
The dimensions of the bounding box.
Here is the caller graph for this function:

◆ getNextPos()

Vec3 BoundingBoxComponent::getNextPos ( )
inline

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

Returns
The position of the box next loop.

◆ initaliseBoundingBox()

void BoundingBoxComponent::initaliseBoundingBox ( std::string  meshID)

A function to initalise the bounding box 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 BoundingBoxComponent::onAwake ( )
virtual

A virtual function for the componets awake.

Reimplemented from Component.

Here is the caller graph for this function:

◆ onDestroy()

void BoundingBoxComponent::onDestroy ( )
virtual

A virtual function for the componets destroy.

Reimplemented from Component.

Here is the caller graph for this function:

◆ scaleBoundingBox()

void BoundingBoxComponent::scaleBoundingBox ( Vec3  scale)
inline

A function to scale the bounding box.

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

◆ setNextPos()

void BoundingBoxComponent::setNextPos ( Vec3  inNextPos)
inline

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

Parameters
inNextPosThe position of the box next loop.

Member Data Documentation

◆ boxDim

Vec3 BoundingBoxComponent::boxDim
private

The dimensions of the bouncing box.

◆ initialBoxDim

Vec3 BoundingBoxComponent::initialBoxDim
private

The initial dimensions of the bouncing box.

◆ nextPos

Vec3 BoundingBoxComponent::nextPos
private

The position in the next loop.


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