globalTransformationMatrix3D property

Matrix3D globalTransformationMatrix3D

The global 3D transformation matrix of this display object.

Note: You can get the global transformation matrix either with the globalTransformationMatrix or the globalTransformationMatrix3D getter. You only need to use a 3D transformation matrix if you are working with 3D display objects.

Implementation

Matrix3D get globalTransformationMatrix3D {
  var result = Matrix3D.fromIdentity();

  for (var obj = this; obj != null; obj = obj.parent) {
    if (obj is DisplayObjectContainer3D) {
      result.concat(obj.projectionMatrix3D);
    }
    result.concat2D(obj.transformationMatrix);
  }

  return result;
}