| 480 | } |
| 481 | |
| 482 | void Object::SetTransformationMatrix(const mat4 &transform) { |
| 483 | if (transform_ != transform) { |
| 484 | translation_ = transform.GetTranslationPart(); |
| 485 | rotation_ = QuaternionFromMat4(transform); |
| 486 | LOG_ASSERT(!IsNan(rotation_[0])); |
| 487 | scale_[0] = length(transform * vec4(1, 0, 0, 0)); |
| 488 | scale_[1] = length(transform * vec4(0, 1, 0, 0)); |
| 489 | scale_[2] = length(transform * vec4(0, 0, 1, 0)); |
| 490 | UpdateTransform(); |
| 491 | Moved(Object::kAll); |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | void Object::GetDisplayName(char *buf, int buf_size) { |
| 496 | if (GetName().empty()) { |
no test coverage detected