Manager for the boids.
More...
#include <ai.h>
◆ BoidManager() [1/2]
Create a new boid manager.
- Parameters
-
| model | The model to associate with the boids |
| terrain | Terrain to link the boids to |
| rigidbodyHandler | A pointer to the rigidbody handler |
◆ BoidManager() [2/2]
Create a new boid manager.
- Parameters
-
| animator | The animator to associate with the boids |
| terrain | Terrain to link the boids to |
| rigidbodyHandler | A pointer to the rigidbody handler |
◆ addBoids()
| void BoidManager::addBoids |
( |
int | numBoids | ) |
|
Add a nmber of new boids.
- Parameters
-
| numBoids | The number of boids to add |
◆ getAnimator()
| Animator * Aire::BoidManager::getAnimator |
( |
| ) |
|
|
inline |
- Returns
- The animator associated with the boids
◆ getBoids()
| std::vector< Boid * > & Aire::BoidManager::getBoids |
( |
| ) |
|
|
inline |
- Returns
- The list of all boids associated with the manager
◆ getModel()
| Model * Aire::BoidManager::getModel |
( |
| ) |
|
|
inline |
- Returns
- The model used for the boids
◆ getTerrain()
| Terrain * Aire::BoidManager::getTerrain |
( |
| ) |
|
|
inline |
Get the terrain associated with the boids.
- Returns
- The terrain associated with the boids
◆ hasAnimator()
| bool Aire::BoidManager::hasAnimator |
( |
| ) |
|
|
inline |
- Returns
- True if the boids have an animator associated with them
◆ hasModel()
| bool Aire::BoidManager::hasModel |
( |
| ) |
|
|
inline |
- Returns
- True if the boids have a model associated with them
◆ renderBoids()
Render all boids.
- Parameters
-
| shader | Shader program to render the animation |
| camera | The camera associated with the player |
◆ setTrackPlayer()
| void Aire::BoidManager::setTrackPlayer |
( |
bool | trackPlayer | ) |
|
|
inline |
Make the boids track the player.
- Parameters
-
| trackPlayer | True if the boids should track the player |
◆ updateBoids()
| void BoidManager::updateBoids |
( |
float | deltaTime, |
|
|
glm::vec3 | playerPosition ) |
Update the position of the boids.
- Parameters
-
| deltaTime | The time delta to advance the boid simulation |
| playerPosition | The current position of the player in the world |
The documentation for this class was generated from the following files:
- source/utils/ai.h
- source/utils/ai.cpp