updateMatrixWorld method

void updateMatrixWorld([
  1. bool force = false
])
override

Implementation

updateMatrixWorld([bool force = false]) {
  if (this.object != null) {
    this.object.updateMatrixWorld(force);

    if (this.object.parent == null) {
      print(
          'TransformControls: The attached 3D object must be a part of the scene graph.');
    } else {
      this.object.parent.matrixWorld.decompose(
          this._parentPosition, this._parentQuaternion, this._parentScale);
    }

    this.object.matrixWorld.decompose(
        this.worldPosition, this.worldQuaternion, this._worldScale);

    this._parentQuaternionInv.copy(this._parentQuaternion).invert();
    this._worldQuaternionInv.copy(this.worldQuaternion).invert();
  }

  this.camera.updateMatrixWorld(force);

  this
      .camera
      .matrixWorld
      .decompose(this.cameraPosition, this.cameraQuaternion, _cameraScale);

  this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize();

  super.updateMatrixWorld(force);
}