#include <sgEntity.h>
Public Member Functions | |
sgEntity (sgEntity *p, sgEntity *n, sgView *v) | |
sgEntity * | createObjEntity (const char *name, sgAction *a=NULL) |
sgEntity * | createCamEntity (sgAction *a=NULL) |
sgEntity * | createPanEntity (sgAction *a=NULL) |
void | destroy () |
void | destroyAll () |
Public Attributes | |
sgObject * | obj |
sgCamera * | cam |
sgPanel * | pan |
sgAction * | act |
sgEntity * | next |
sgEntity * | prev |
sgView * | view |
Entity class. Container class for the different engine objects for easy creation and handling.
Constructor. Creates an empty enity.
p | the previous entity in the linked object list | |
n | the next entity in the linked object list |
Create camera entity. Creates a new entity consisting of just a camera and makes it next of this.
a | pointer to the action which will be assigned to the new entity. |
Create object entity. Creates a new entity with an object loaded from a model file or a predefined name and makes it next of this.
name | name of the entity or the file to load it from | |
a | pointer to the action which will be assigned to the new entity. |
Create panel entity. Creates a new entity consisting of a panel and makes it next of this.
a | pointer to the action which will be assigned to the new entity. |
void sgEntity::destroy | ( | ) |
Destroy. Destroys this object.
void sgEntity::destroyAll | ( | ) |
Destroy All. Destroys this and all objects connected to it.
Action. Pointer to the action handled by this entity or NULL if there is none.
Camera. Pointer to the camera handled by this entity or NULL if there is none.
Next. Pointer to the next entity within the object list or NULL if there is none.
Object. Pointer to the object handled by this entity or NULL if there is none.
Panel. Pointer to the panel handled by this entity or NULL if there is none.
Previous. Pointer to the previous entity within the object list or NULL if there is none.
View. Pointer to the view, which is needed to access its functionality.