| 78 | } |
| 79 | |
| 80 | void Transform::set_matrix(const glm::mat4 &matrix) |
| 81 | { |
| 82 | glm::vec3 skew; |
| 83 | glm::vec4 perspective; |
| 84 | glm::decompose(matrix, scale, rotation, translation, skew, perspective); |
| 85 | |
| 86 | invalidate_world_matrix(); |
| 87 | } |
| 88 | |
| 89 | glm::mat4 Transform::get_matrix() const |
| 90 | { |