setTransformationMatrices method

dynamic setTransformationMatrices([
  1. dynamic camera = null,
  2. dynamic gizmos = null
])
  • Set values in transformation object
    • @param {Matrix4} camera Transformation to be applied to the camera
      • @param {Matrix4} gizmos Transformation to be applied to gizmos

Implementation

setTransformationMatrices([camera = null, gizmos = null]) {
  if (camera != null) {
    if (_transformation['camera'] != null) {
      _transformation['camera']!.copy(camera);
    } else {
      _transformation['camera'] = camera.clone();
    }
  } else {
    _transformation.remove('camera');
  }

  if (gizmos != null) {
    if (_transformation['gizmos'] != null) {
      _transformation['gizmos']!.copy(gizmos);
    } else {
      _transformation['gizmos'] = gizmos.clone();
    }
  } else {
    _transformation.remove('gizmos');
  }
}