Creating Matrix3D objects

There are three main ways of creating or retrieving Matrix3D objects:

  1. Use the Matrix3D() constructor method to instantiate a new matrix. The Matrix3D() constructor takes a Vector object containing 16 numeric values and places each value into a cell of the matrix. For example:

    var rotateMatrix:Matrix3D = new Matrix3D(1,0,0,1, 0,1,0,1, 0,0,1,1, 0,0,0,1);
    
  2. Set the value the z property of a display object. Then retrieve the transformation matrix from the transform.matrix3D property of that object.

  3. Retrieve the Matrix3D object that controls the display of 3D objects on the stage by getting the value of the perspectiveProjection.matrix3D property of the root display object.