OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Entity.h
Go to the documentation of this file.
1 
8 #ifndef _ENTITY_H_
9 #define _ENTITY_H_
10 
11 class Entity {
12  public:
13  Entity(int i, int r, glm::vec3 po, glm::vec3 ro)
14  : id(i), room(r), pos(po), rot(ro), cache(-1), cacheType(-1),
15  sprite(0), animation(0), frame(0) { }
16  void display(glm::mat4 VP);
17 
18  int getID() { return id; }
19  int getRoom() { return room; }
20  glm::vec3 getPosition() { return pos; }
21  glm::vec3 getRotation() { return rot; }
22 
23  int getSprite() { return sprite; }
24  void setSprite(int i) { sprite = i; }
25  int getAnimation() { return animation; }
26  void setAnimation(int i) { animation = i; frame = 0; }
27  int getFrame() { return frame; }
28  void setFrame(int i) { frame = i; }
29 
30  static void setShowEntitySprites(bool s) { showEntitySprites = s; }
31  static bool getShowEntitySprites() { return showEntitySprites; }
32  static void setShowEntityMeshes(bool s) { showEntityMeshes = s; }
33  static bool getShowEntityMeshes() { return showEntityMeshes; }
34  static void setShowEntityModels(bool s) { showEntityModels = s; }
35  static bool getShowEntityModels() { return showEntityModels; }
36 
37  private:
38  int id;
39  int room;
40  glm::vec3 pos;
41  glm::vec3 rot;
43 
44  int sprite;
45  int animation;
46  int frame;
47 
48  static bool showEntitySprites;
49  static bool showEntityMeshes;
50  static bool showEntityModels;
51 };
52 
53 #endif
54 
static bool getShowEntitySprites()
Definition: Entity.h:31
glm::vec3 rot
Definition: Entity.h:41
static bool showEntitySprites
Definition: Entity.h:48
void setAnimation(int i)
Definition: Entity.h:26
int sprite
Definition: Entity.h:44
glm::vec3 getRotation()
Definition: Entity.h:21
int cache
Definition: Entity.h:42
int getAnimation()
Definition: Entity.h:25
int cacheType
Definition: Entity.h:42
static bool showEntityMeshes
Definition: Entity.h:49
int frame
Definition: Entity.h:46
static void setShowEntityMeshes(bool s)
Definition: Entity.h:32
void setFrame(int i)
Definition: Entity.h:28
glm::vec3 pos
Definition: Entity.h:40
Definition: Entity.h:11
int id
Definition: Entity.h:38
Entity(int i, int r, glm::vec3 po, glm::vec3 ro)
Definition: Entity.h:13
void setSprite(int i)
Definition: Entity.h:24
int animation
Definition: Entity.h:45
int room
Definition: Entity.h:39
void display(glm::mat4 VP)
Definition: Entity.cpp:24
int getID()
Definition: Entity.h:18
int getRoom()
Definition: Entity.h:19
int getFrame()
Definition: Entity.h:27
static bool showEntityModels
Definition: Entity.h:50
static void setShowEntityModels(bool s)
Definition: Entity.h:34
int getSprite()
Definition: Entity.h:23
glm::vec3 getPosition()
Definition: Entity.h:20
static bool getShowEntityModels()
Definition: Entity.h:35
static void setShowEntitySprites(bool s)
Definition: Entity.h:30
static bool getShowEntityMeshes()
Definition: Entity.h:33