Creates an Entity containing a Model.
More...
#include <Entity.h>
Creates an Entity containing a Model.
- Author
- Jamie Slowgrove
Entity::Entity |
( |
Model * |
model, |
|
|
float |
scaleValue |
|
) |
| |
Constructs a Entity Object. Creates a Entity Object with a Model using the shader file locations, the obj file location and OpenGL.
- Parameters
-
model | A pointer to the Model. |
scaleValue | The scale of the Model. |
void Entity::draw |
( |
glm::mat4 & |
viewMatrix, |
|
|
glm::mat4 & |
projMatrix |
|
) |
| |
Draw the Entity to the screen.
- Parameters
-
viewMatrix | A reference to the camera view matrix. |
projMatrix | A reference to the camera projection matrix. |
glm::vec3 Entity::getOrientation |
( |
| ) |
|
Getter # Gets the position of the Entity.
- Returns
- The orientation of the Entity.
glm::vec3 Entity::getPosition |
( |
| ) |
|
Getter # Gets the position of the Entity.
- Returns
- The position of the Entity.
float Entity::getScale |
( |
| ) |
|
Getter # Gets the scale of the Entity.
- Returns
- The scale of the Entity.
void Entity::move |
( |
glm::vec3 |
movement | ) |
|
Move the Entity.
- Parameters
-
movement | The amount to move by. |
void Entity::moveX |
( |
float |
movement | ) |
|
Move the Entity along the X axis.
- Parameters
-
movement | The amount to move by. |
void Entity::moveY |
( |
float |
movement | ) |
|
Move the Entity along the Y axis.
- Parameters
-
movement | The amount to move by. |
void Entity::moveZ |
( |
float |
movement | ) |
|
Move the Entity along the Z axis.
- Parameters
-
movement | The amount to move by. |
void Entity::rotateX |
( |
float |
angle | ) |
|
Rotate the Entity along the X axis.
- Parameters
-
angle | The rotation angle (Euler angle [Radians]). |
void Entity::rotateY |
( |
float |
angle | ) |
|
Rotate the Entity along the Y axis.
- Parameters
-
angle | The rotation angle (Euler angle [Radians]). |
void Entity::rotateZ |
( |
float |
angle | ) |
|
Rotate the Entity along the Z axis.
- Parameters
-
angle | The rotation angle (Euler angle [Radians]). |
void Entity::setMoveSpeed |
( |
float |
moveSpeed | ) |
|
Setter # Sets the moveSpeed of the Entity.
- Parameters
-
moveSpeed | The new moveSpeed. |
void Entity::setPosition |
( |
glm::vec3 |
position | ) |
|
Setter # Sets the position of the Entity.
- Parameters
-
position | The new position. |
void Entity::setPosition |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Setter # Sets the position of the Entity.
- Parameters
-
x | The X position. |
y | The Y position. |
z | The Z position. |
void Entity::setScale |
( |
float |
scaleValue | ) |
|
Setter # Sets the scale of the Entity.
- Parameters
-
virtual void Entity::update |
( |
float |
dt | ) |
|
|
pure virtual |
The movement speed of the Entity
glm::vec3 Entity::position |
|
protected |
The Position of the Model
float Entity::rotateSpeed |
|
protected |
The rotation speed of the Entity
glm::vec3 Entity::rotation |
|
protected |
The documentation for this class was generated from the following files: