![]() |
AireEngine
A 3D Open-World Game Engine
|
#include <Model.h>


Public Member Functions | |
| Model (std::vector< MeshPtr > meshes, std::map< string, BoneInfo > m_BoneInfoMap, int m_BoneCounter=0) | |
| void | AssignRigidbodyBox (float aWidth, float aHeight, float aDepth) |
| void | AssignRigidbodyBall (float aRadius) |
| void | SetGravity (bool gravityOn, float gravityValue) |
| void | SetCollision (bool aCollidable) |
| void | SetStatic (bool aStatic) |
| auto & | GetBoneInfoMap () |
| int & | GetBoneCount () |
| void | translate (glm::vec3 direction) |
| void | scale (glm::vec3 val) |
| void | rotate (float degree, glm::vec3 axis) |
| glm::vec3 | getPosition () |
| void | renderInstanced (ShaderProgram &shader, Aire::Camera &camera, glm::mat4 transform) |
| void | render (ShaderProgram &shader, Aire::Camera &camera) |
| render the model | |
| uint32_t | getSize () |
Public Member Functions inherited from Aire::Resource | |
| Resource () | |
| Default constructor. | |
| virtual | ~Resource () |
| Default destructor. | |
| bool | isLoadToGpu () |
| ResourceState | getState () |
| void | setState (ResourceState state) |
Public Attributes | |
| bool | isStatic = true |
| Flag indicating whether the model is static. | |
| std::vector< MeshPtr > | meshes |
| List of meshes. | |
| bool | gammaCorrection |
| Flag indicating whether the model use gamma correction. | |
| glm::mat4 | modelMatrix |
| Model matrix for the model. | |
| Rigidbody * | rb = nullptr |
| Rigid body that might be associated with the model. | |
Additional Inherited Members | |
Protected Attributes inherited from Aire::Resource | |
| ResourceState | resourceState |
A 3D model that combines several meshes and materials Supports animation.
|
inline |
Create a new model
| meshes | List of meshes to include in the model |
| m_BoneInfoMap | Map from bone name to bone info object |
| m_BoneCounter | The number of bones in the model skeleton |
Assign a rigidbody to the model
| aRadius | Radius of the rigidbody ball |

Assign a rigidbody to the model
| aWidth | Width of the rigidbody box |
| aHeight | Height of the rigidbody box |
| aDepth | Depth of the rigidbody box |

|
inline |
Dunction to get the bone counter
|
inline |
Function to get the bone info map
| glm::vec3 Aire::Model::getPosition | ( | ) |
|
virtual |
Implements Aire::Resource.
| void Aire::Model::render | ( | ShaderProgram & | shader, |
| Aire::Camera & | camera ) |
render the model
Render the whole model
| shader | Shader program to use for rendering |
| camera | The camera associated with the player |
| shader | shader that will be used to process the model |
| camera | camera information |


| void Aire::Model::renderInstanced | ( | ShaderProgram & | shader, |
| Aire::Camera & | camera, | ||
| glm::mat4 | transform ) |
Render a model instance
| shader | Shader program to use for rendering |
| camera | The camera associated with the player |
| transform | Transform for the model instance |


Function to apply rotation on the model
| degree | The degrees of rotation to apply to the model |
| axis | The rotation direction |
| void Aire::Model::scale | ( | glm::vec3 | val | ) |
Function to apply (non-uniform) scale on the model
| val | Scale vector |
Set the collision settings for the model via the rigidbody
| aCollidable | Enable / Disable collision (True by default) |
Set the gravity settings for the model via the rigidbody
| gravityOn | Enables gravity |
| gravityValue | Strength of the gravity |
Set the rigidbody settings to say a rigidbody is static
| aCollidable | Enable / Disable static (False by default) |
| void Aire::Model::translate | ( | glm::vec3 | direction | ) |
Function to apply translation on the model
| position | Translation vector |