Level H Engine
|
Creates a Boid object. NOTE - This is a HEAVILY modifed version of code from a previous assignment (It was not built for 3D initaliy) More...
#include <Boid.h>
Public Member Functions | |
Boid (std::string inSpriteID, Vec2 inDirection, float inMoveSpeed, Vec2 inPosition) | |
Constructs the 2D Boid Object. More... | |
Boid (int boidIndex, std::string inMesh, std::string inBoidTexture, std::string inBoidVertexShader, std::string inBoidFragmentShader, Vec3 inDirection, float inMoveSpeed, Vec3 inPosition) | |
Constructs the 3D Boid Object. More... | |
Boid (int boidIndex, std::string inMesh, std::string inBoidVertexShader, std::string inBoidFragmentShader, Vec3 inDirection, float inMoveSpeed, Vec3 inPosition) | |
Constructs the 3D Boid Object. More... | |
~Boid () | |
Destructs the Boid Object deleting the Boid Object from memory. More... | |
void | update2D () |
A function that updates the 2D Boid. More... | |
void | update3D () |
A function that updates the 3D Boid. More... | |
void | draw2D () |
Draw the 2D Boid to the screen. More... | |
void | setPosition2D (Vec2 inPosition) |
Sets the position of the 2D Boid. More... | |
void | setPosition3D (Vec3 inPosition) |
Sets the position of the 3D Boid. More... | |
void | setPosition2D (float inX, float inY) |
Sets the position of the 2D Boid. More... | |
void | setPosition3D (float inX, float inY, float inZ) |
Sets the position of the 3D Boid. More... | |
void | move2D (Vec2 movement) |
Move the 2D Boid. More... | |
void | move3D (Vec3 movement) |
Move the 3D Boid. More... | |
void | move2DX (float movement) |
Move the 2D Boid along the X axis. More... | |
void | move2DY (float movement) |
Move the 2D Boid along the Y axis. More... | |
void | move3DX (float movement) |
Move the 2D Boid along the X axis. More... | |
void | move3DY (float movement) |
Move the 3D Boid along the Y axis. More... | |
void | move3DZ (float movement) |
Move the 3D Boid along the Z axis. More... | |
void | setMoveSpeed (float inMoveSpeed) |
Sets the moveSpeed of the Boid. More... | |
void | setDirection2D (Vec2 inDirection) |
Sets the direction of the 2D Boid. More... | |
void | setDirection3D (Vec3 inDirection) |
Sets the direction of the 3D Boid. More... | |
float | getMoveSpeed () |
Gets the moveSpeed of the Boid. More... | |
Vec2 | getPosition2D () |
Gets the position of the 2D Boid. More... | |
Vec3 | getPosition3D () |
Gets the position of the 3D Boid. More... | |
Vec2 | getDirection2D () |
Gets the direction of the 2D Boid. More... | |
Vec3 | getDirection3D () |
Gets the direction of the 3D Boid. More... | |
std::shared_ptr< GameObject > | getObject () |
Gets the Boid 3D game object ID. More... | |
Private Attributes | |
std::string | spriteID |
The 2D sprite ID. More... | |
std::shared_ptr< GameObject > | object |
A shared pointer to the 3D game object. More... | |
Vec2 | direction2D |
The 2D direction of the Particle. More... | |
Vec3 | direction3D |
The 3D direction of the Particle. More... | |
Vec2 | position2D |
The 2D Position of the Particle. More... | |
Vec3 | position3D |
The 3D Position of the Particle. More... | |
float | moveSpeed |
The movement speed of the Particle. More... | |
Creates a Boid object. NOTE - This is a HEAVILY modifed version of code from a previous assignment (It was not built for 3D initaliy)
Boid::Boid | ( | int | boidIndex, |
std::string | inMesh, | ||
std::string | inBoidTexture, | ||
std::string | inBoidVertexShader, | ||
std::string | inBoidFragmentShader, | ||
Vec3 | inDirection, | ||
float | inMoveSpeed, | ||
Vec3 | inPosition | ||
) |
Constructs the 3D Boid Object.
boidIndex | The 3D boid index number. |
meshID | The path of the mesh for the boid |
meshID | The path of the texture for the boid. |
meshID | The path of the vertex shader for the boid. |
meshID | The path of the fragment shader for the boid. |
direction | The direction of the Sprite. |
moveSpeed | The move speed of the Sprite. |
position | The position of the Sprite. |
Boid::Boid | ( | int | boidIndex, |
std::string | inMesh, | ||
std::string | inBoidVertexShader, | ||
std::string | inBoidFragmentShader, | ||
Vec3 | inDirection, | ||
float | inMoveSpeed, | ||
Vec3 | inPosition | ||
) |
Constructs the 3D Boid Object.
boidIndex | The 3D boid index number. |
meshID | The path of the mesh for the boid |
meshID | The path of the vertex shader for the boid. |
meshID | The path of the fragment shader for the boid. |
direction | The direction of the Sprite. |
moveSpeed | The move speed of the Sprite. |
position | The position of the Sprite. |
void Boid::draw2D | ( | ) |
float Boid::getMoveSpeed | ( | ) |
Gets the moveSpeed of the Boid.
std::shared_ptr< GameObject > Boid::getObject | ( | ) |
void Boid::move2D | ( | Vec2 | movement | ) |
Move the 2D Boid.
movement | The amount to move by. |
void Boid::move2DX | ( | float | movement | ) |
Move the 2D Boid along the X axis.
movement | The amount to move by. |
void Boid::move2DY | ( | float | movement | ) |
Move the 2D Boid along the Y axis.
movement | The amount to move by. |
void Boid::move3D | ( | Vec3 | movement | ) |
Move the 3D Boid.
movement | The amount to move by. |
void Boid::move3DX | ( | float | movement | ) |
Move the 2D Boid along the X axis.
movement | The amount to move by. |
void Boid::move3DY | ( | float | movement | ) |
Move the 3D Boid along the Y axis.
movement | The amount to move by. |
void Boid::move3DZ | ( | float | movement | ) |
Move the 3D Boid along the Z axis.
movement | The amount to move by. |
void Boid::setDirection2D | ( | Vec2 | inDirection | ) |
Sets the direction of the 2D Boid.
direction | The new direction. |
void Boid::setDirection3D | ( | Vec3 | inDirection | ) |
Sets the direction of the 3D Boid.
direction | The new direction. |
void Boid::setMoveSpeed | ( | float | inMoveSpeed | ) |
Sets the moveSpeed of the Boid.
moveSpeed | The new moveSpeed. |
void Boid::setPosition2D | ( | Vec2 | inPosition | ) |
Sets the position of the 2D Boid.
position | The new position. |
void Boid::setPosition2D | ( | float | inX, |
float | inY | ||
) |
Sets the position of the 2D Boid.
x | The X position. |
y | The Y position. |
void Boid::setPosition3D | ( | Vec3 | inPosition | ) |
Sets the position of the 3D Boid.
position | The new position. |
void Boid::setPosition3D | ( | float | inX, |
float | inY, | ||
float | inZ | ||
) |
Sets the position of the 3D Boid.
x | The X position. |
y | The Y position. |
y | The Y position. |
void Boid::update2D | ( | ) |
void Boid::update3D | ( | ) |
|
private |
The 2D direction of the Particle.
|
private |
The 3D direction of the Particle.
|
private |
The movement speed of the Particle.
|
private |
A shared pointer to the 3D game object.
|
private |
The 2D Position of the Particle.
|
private |
The 3D Position of the Particle.
|
private |
The 2D sprite ID.