| 97 | } |
| 98 | |
| 99 | void RavEngine::Transform::Apply() |
| 100 | { |
| 101 | |
| 102 | //the list of transformations to apply |
| 103 | list<matrix4> translations; |
| 104 | GetParentMatrixStack(translations); |
| 105 | |
| 106 | //apply all the transforms |
| 107 | matrix4 finalMatrix(1); |
| 108 | for (auto& transform : translations) { |
| 109 | finalMatrix *= transform; |
| 110 | } |
| 111 | finalMatrix *= GenerateLocalMatrix(); |
| 112 | matrix = finalMatrix; |
| 113 | } |
| 114 | |
| 115 | bool Transform::HasParent() { |
| 116 | return !parent.isNull(); |