updateMatrixWorld method

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

Implementation

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

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

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

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

  camera.updateMatrixWorld(force);

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

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

  super.updateMatrixWorld(force);
}