Bomberman
Public Member Functions | Public Attributes | List of all members
BBM::PositionComponent Class Reference

A basic position component. More...

#include <PositionComponent.hpp>

Inheritance diagram for BBM::PositionComponent:
Collaboration diagram for BBM::PositionComponent:

Public Member Functions

float getX () const
 Get the X position of this entity. More...
 
float getY () const
 Get the Y position of this entity. More...
 
float getZ () const
 Get the Z position of this entity. More...
 
WAL::Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
 PositionComponent (WAL::Entity &entity)
 Create a new PositionComponent linked to a specific entity. More...
 
 PositionComponent (WAL::Entity &entity, Vector3f pos)
 Create a new PositionComponent at a certain position. More...
 
 PositionComponent (WAL::Entity &entity, float x, float y, float z)
 Create a new PositionComponent at a certain position. More...
 
 PositionComponent (const PositionComponent &)=default
 A position component is copy constructable. More...
 
 ~PositionComponent () override=default
 A default destructor. More...
 
PositionComponentoperator= (const PositionComponent &)=delete
 A position component is not assignable. More...
 
- Public Member Functions inherited from WAL::Component
Componentoperator= (const Component &)=delete
 A component can't be assigned. More...
 
virtual ~Component ()=default
 A virtual destructor. More...
 
virtual void onStart ()
 The entity or this component has just been enabled. More...
 
virtual void onStop ()
 The entity or this component has just been disable. More...
 

Public Attributes

Vector3f position
 Get the editable position of this entity. More...
 

Additional Inherited Members

- Protected Member Functions inherited from WAL::Component
 Component (Entity &entity)
 A component can't be instantiated, it should be derived. More...
 
 Component (const Component &)=default
 A component can't be instantiated, it should be derived. More...
 
- Protected Attributes inherited from WAL::Component
Entity_entity
 The entity that own this component. More...
 

Detailed Description

A basic position component.

Constructor & Destructor Documentation

◆ PositionComponent() [1/4]

BBM::PositionComponent::PositionComponent ( WAL::Entity entity)
explicit

Create a new PositionComponent linked to a specific entity.

◆ PositionComponent() [2/4]

BBM::PositionComponent::PositionComponent ( WAL::Entity entity,
Vector3f  pos 
)

Create a new PositionComponent at a certain position.

◆ PositionComponent() [3/4]

BBM::PositionComponent::PositionComponent ( WAL::Entity entity,
float  x,
float  y,
float  z 
)

Create a new PositionComponent at a certain position.

◆ PositionComponent() [4/4]

BBM::PositionComponent::PositionComponent ( const PositionComponent )
default

A position component is copy constructable.

◆ ~PositionComponent()

BBM::PositionComponent::~PositionComponent ( )
overridedefault

A default destructor.

Member Function Documentation

◆ clone()

WAL::Component * BBM::PositionComponent::clone ( WAL::Entity entity) const
overridevirtual

Clone a component for another or the same entity.

Parameters
entityThe entity that owns the ne component.

Implements WAL::Component.

◆ getX()

float BBM::PositionComponent::getX ( ) const

Get the X position of this entity.

◆ getY()

float BBM::PositionComponent::getY ( ) const

Get the Y position of this entity.

◆ getZ()

float BBM::PositionComponent::getZ ( ) const

Get the Z position of this entity.

◆ operator=()

PositionComponent& BBM::PositionComponent::operator= ( const PositionComponent )
delete

A position component is not assignable.

Member Data Documentation

◆ position

Vector3f BBM::PositionComponent::position

Get the editable position of this entity.


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