Transform.Scale

This commit is contained in:
2014-03-13 01:32:09 +01:00
parent 21b2e3bdc1
commit 99e1b4f8d6
5 changed files with 12 additions and 8 deletions
+3 -4
View File
@@ -285,12 +285,11 @@ void Renderer::AddTextToDraw()
//Add to draw shit vector
}
void Renderer::AddModelToDraw(std::shared_ptr<Model> _model, glm::vec3 _position, glm::quat _orientation)
void Renderer::AddModelToDraw(std::shared_ptr<Model> model, glm::vec3 position, glm::quat orientation, glm::vec3 scale)
{
glm::mat4 RotationMatrix = glm::toMat4(_orientation);
glm::mat4 ModelMatrix = glm::translate(glm::mat4(), _position) * RotationMatrix ;
glm::mat4 ModelMatrix = glm::translate(glm::mat4(), position) * glm::toMat4(orientation) * glm::scale(scale);
// You can now use ModelMatrix to build the MVP matrix
ModelsToRender.push_back(new ModelData(_model, ModelMatrix));
ModelsToRender.push_back(new ModelData(model, ModelMatrix));
}
void Renderer::AddPointLightToDraw(