Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
WorldObjectComponents Class Reference

#include <worldobjectcomponents.h>

Collaboration diagram for WorldObjectComponents:
[legend]

Public Member Functions

 WorldObjectComponents (WorldObject *worldObject)
 
WorldObjectworldObject ()
 
const WorldObjectworldObject () const
 
void addEngineSlot (std::shared_ptr< EngineSlot > engineSlot)
 
void removeEngineSlot (const EngineSlot *engineSlot)
 
std::shared_ptr< EngineSlotengineSlot (int index)
 
std::list< std::shared_ptr
< EngineSlot > > & 
engineSlots ()
 
EnginePower enginePower () const
 
Acceleration currentAcceleration () const
 
const EngineStateengineState () const
 
void setEngineState (const EngineState &engineState)
 
void addHardpoint (std::shared_ptr< Hardpoint > hardpoint)
 
void removeHardpoint (const Hardpoint *hardpoint)
 
std::shared_ptr< Hardpointhardpoint (int index)
 
std::list< std::shared_ptr
< Hardpoint > > & 
hardpoints ()
 
void fireAtPoint (const glm::vec3 &point)
 
void fireAtObject (WorldObject *worldObject)
 
void update (float deltaSec)
 

Protected Attributes

WorldObjectm_worldObject
 
std::list< std::shared_ptr
< EngineSlot > > 
m_engineSlots
 
std::list< std::shared_ptr
< Hardpoint > > 
m_hardpoints
 
EngineState m_engineState
 

Detailed Description

Module of the WorldObject that is responsible for managing all the components of a WorldObject (Engines, Weapons) and their respective slots. Also provides functions to trigger actions or retrieve values from a whole category of components. (like, fire all weapons, set all engines)


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