Annwvyn::AnnTriggerObject Class Reference

Object for representing a volume that trigger an event. More...

#include <AnnTriggerObject.hpp>

Inheritance diagram for Annwvyn::AnnTriggerObject:
Collaboration diagram for Annwvyn::AnnTriggerObject:

Public Member Functions

 AnnTriggerObject (const std::string &name)
 Class constructor. More...
 
std::string getName () const
 
virtual ~AnnTriggerObject ()
 Class destructor. More...
 
void setPosition (AnnVect3 pos) override
 
void setOrientation (AnnQuaternion orient) override
 Does nothing. More...
 
AnnVect3 getPosition () override
 Get position. More...
 
AnnQuaternion getOrientation () override
 Does nothing. More...
 
bool getContactInformation () const
 Get contact information. More...
 
void setShape (btCollisionShape *shp)
 Set the shape of the object. More...
 
- Public Member Functions inherited from Annwvyn::AnnAbstractMovable
virtual ~AnnAbstractMovable ()=default
 
- Public Member Functions inherited from Annwvyn::AnnAbstractTranslatable
virtual ~AnnAbstractTranslatable ()=default
 

Private Member Functions

void setContactInformation (bool contact)
 

Private Attributes

const std::string name
 
bool contactWithPlayer
 True if trigger triggers. More...
 
bool lastFrameContactWithPlayer
 State of the last frame. More...
 
std::unique_ptr< btRigidBody > body
 Pointer to the body. More...
 
std::unique_ptr< btCollisionShape > shape
 Pointer to the shape. More...
 

Friends

class AnnEngine
 
class AnnGameObjectManager
 
class AnnPhysicsEngine
 

Additional Inherited Members

Detailed Description

Object for representing a volume that trigger an event.

Definition at line 36 of file AnnTriggerObject.hpp.

Constructor & Destructor Documentation

◆ AnnTriggerObject()

AnnTriggerObject::AnnTriggerObject ( const std::string name)

Class constructor.

Definition at line 21 of file AnnTriggerObject.cpp.

◆ ~AnnTriggerObject()

AnnTriggerObject::~AnnTriggerObject ( )
virtual

Class destructor.

Definition at line 35 of file AnnTriggerObject.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ getContactInformation()

bool AnnTriggerObject::getContactInformation ( ) const

Get contact information.

Definition at line 57 of file AnnTriggerObject.cpp.

◆ getName()

std::string AnnTriggerObject::getName ( ) const

Definition at line 30 of file AnnTriggerObject.cpp.

◆ getOrientation()

AnnQuaternion AnnTriggerObject::getOrientation ( )
overridevirtual

Does nothing.

Implements Annwvyn::AnnAbstractMovable.

Definition at line 69 of file AnnTriggerObject.cpp.

◆ getPosition()

AnnVect3 AnnTriggerObject::getPosition ( )
overridevirtual

Get position.

Implements Annwvyn::AnnAbstractTranslatable.

Definition at line 62 of file AnnTriggerObject.cpp.

◆ setContactInformation()

void AnnTriggerObject::setContactInformation ( bool  contact)
private

For engine : Set contact state

Parameters
contactContact state

Definition at line 95 of file AnnTriggerObject.cpp.

◆ setOrientation()

void AnnTriggerObject::setOrientation ( AnnQuaternion  orient)
overridevirtual

Does nothing.

Implements Annwvyn::AnnAbstractMovable.

Definition at line 49 of file AnnTriggerObject.cpp.

Here is the call graph for this function:

◆ setPosition()

void AnnTriggerObject::setPosition ( AnnVect3  pos)
overridevirtual

Set position form Vector 3D

Parameters
pos3D vector positioning the object

Implements Annwvyn::AnnAbstractTranslatable.

Definition at line 41 of file AnnTriggerObject.cpp.

Here is the call graph for this function:

◆ setShape()

void AnnTriggerObject::setShape ( btCollisionShape *  shp)

Set the shape of the object.

Definition at line 76 of file AnnTriggerObject.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ AnnEngine

friend class AnnEngine
friend

Definition at line 73 of file AnnTriggerObject.hpp.

◆ AnnGameObjectManager

friend class AnnGameObjectManager
friend

Definition at line 74 of file AnnTriggerObject.hpp.

◆ AnnPhysicsEngine

friend class AnnPhysicsEngine
friend

Definition at line 75 of file AnnTriggerObject.hpp.

Member Data Documentation

◆ body

std::unique_ptr<btRigidBody> Annwvyn::AnnTriggerObject::body
private

Pointer to the body.

Definition at line 84 of file AnnTriggerObject.hpp.

◆ contactWithPlayer

bool Annwvyn::AnnTriggerObject::contactWithPlayer
private

True if trigger triggers.

Definition at line 78 of file AnnTriggerObject.hpp.

◆ lastFrameContactWithPlayer

bool Annwvyn::AnnTriggerObject::lastFrameContactWithPlayer
private

State of the last frame.

Definition at line 81 of file AnnTriggerObject.hpp.

◆ name

const std::string Annwvyn::AnnTriggerObject::name
private

Definition at line 67 of file AnnTriggerObject.hpp.

◆ shape

std::unique_ptr<btCollisionShape> Annwvyn::AnnTriggerObject::shape
private

Pointer to the shape.

Definition at line 87 of file AnnTriggerObject.hpp.


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