| 427 | } |
| 428 | |
| 429 | void Object::UpdateTransform() { |
| 430 | LOG_ASSERT(!IsNan(rotation_[0])); |
| 431 | rotation_mat_ = Mat4FromQuaternion(rotation_); |
| 432 | mat4 translation_mat; |
| 433 | translation_mat.SetTranslation(translation_); |
| 434 | mat4 scale_mat; |
| 435 | scale_mat.SetScale(scale_); |
| 436 | transform_ = translation_mat * rotation_mat_ * scale_mat; |
| 437 | } |
| 438 | |
| 439 | void Object::SetTranslation(const vec3 &trans) { |
| 440 | if (translation_ != trans) { |
no test coverage detected