|
Engine
|
Defines a model used for rendering. More...
#include <model.h>
Public Member Functions | |
| Eigen::Matrix< GLfloat, 4, 4 > | GetModelMatrix () |
| void | SetModelMatrix (Eigen::Matrix< GLfloat, 4, 4 > model) |
| Mesh | GetMesh () |
| Material | GetMaterial () |
| Eigen::Matrix< GLfloat, 3, 3 > | GetNormalMatrix () |
Protected Member Functions | |
| Model () | |
Protected Attributes | |
| Mesh | m_mesh |
| Eigen::Matrix< GLfloat, 4, 4 > | m_model_matrix |
| Material | m_material |
| Eigen::Matrix< GLfloat, 3, 3 > | m_normal_matrix |
Defines a model used for rendering.
Model is the base class for all entities that are rendered in a scene. It stores properites such as the mesh, material properties, textures, etc. It also holds the model matrix which handles transforming the mesh from local coordinates to world coordinates. See Here for more details.
|
protected |
Builds a Model with an empty mesh and identity model matrix
| Material Model::GetMaterial | ( | ) |
#return material for this mesh
| Mesh Model::GetMesh | ( | ) |
| Eigen::Matrix< GLfloat, 4, 4 > Model::GetModelMatrix | ( | ) |
| Eigen::Matrix< GLfloat, 3, 3 > Model::GetNormalMatrix | ( | ) |
| void Model::SetModelMatrix | ( | Eigen::Matrix< GLfloat, 4, 4 > | model | ) |
Sets the model matrix
| model | Matrix to be set as the model matrix |
|
protected |
The mesh for this model
|
protected |
The model matrix. This handles transforming from local model coordinates to world coordinates
|
protected |
The normal matrix. Used in rendering light interaction with surface