MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / SetTranslationRotationFast

Method SetTranslationRotationFast

Source/Objects/object.cpp:465–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465void Object::SetTranslationRotationFast(const vec3 &trans, const quaternion &rotation) {
466 bool changed_something = false;
467 if (translation_ != trans) {
468 translation_ = trans;
469 changed_something = true;
470 }
471 if (IsDifferentEnough(rotation_, rotation)) {
472 rotation_ = rotation;
473 LOG_ASSERT(!IsNan(rotation_[0]));
474 rotation_updated = true;
475 changed_something = true;
476 }
477 if (changed_something) {
478 UpdateTransform();
479 }
480}
481
482void Object::SetTransformationMatrix(const mat4 &transform) {
483 if (transform_ != transform) {

Callers

nothing calls this directly

Calls 2

IsDifferentEnoughFunction · 0.85
IsNanFunction · 0.85

Tested by

no test coverage detected