|
Flatland
|
#include <entity.h>


Public Types | |
| enum | EntityType { LAYER, MODEL } |
| Defines the type of entity. | |
Public Member Functions | |
| Entity (b2World *physics_world, const std::string &name) | |
| Constructor for the entity. More... | |
| const std::string & | GetName () const |
| b2World * | GetPhysicsWorld () |
| Get Box2D physics world. More... | |
| Entity (const Entity &)=delete | |
| Entity & | operator= (const Entity &)=delete |
| virtual EntityType | Type () const =0 |
| Get the type of entity, subclasses must override. More... | |
| virtual void | DebugVisualize () const =0 |
| Visualize the entity. | |
| virtual void | DebugOutput () const =0 |
| Print debug message for the entity. | |
Public Attributes | |
| b2World * | physics_world_ |
| Box2D physics world. | |
| std::string | name_ |
| name of the entity | |
This class defines a entity in the simulation world. It provides a class for high level physical things in the world to inherit from (layers and models)
| flatland_server::Entity::Entity | ( | b2World * | physics_world, |
| const std::string & | name | ||
| ) |
Constructor for the entity.
| [in] | physics_world | Box2D physics_world |
| [in] | name | name of the entity |
|
delete |
This class should be non-copyable. This will cause the destructor to be called twice for a given b2Body
| const std::string & flatland_server::Entity::GetName | ( | ) | const |
| b2World * flatland_server::Entity::GetPhysicsWorld | ( | ) |
Get Box2D physics world.
|
pure virtual |
Get the type of entity, subclasses must override.
Implemented in flatland_server::Layer, and flatland_server::Model.
1.8.11