createStandardWorldToView MethodStatic

Create a rotation matrix for one of the 8 standard views.

  • Default is TOP view (local X = world X, local Y = world Y, local Z = world Z).
  • To change view from the TOP to one of the other 7 standard views, we need to multiply "world data" to the corresponding matrix1 provided by createStandardWorldToView(index, false) and then matrix1.multiply(world data) will return "local data".
  • To change view back to the TOP, we need to multiply "local data" to the corresponding matrix2 provided by createStandardWorldToView(index, true) and then matrix2.multiply(local data) will returns "world data".
  • Note: No matter how you rotate the world axis, local X is always pointing right, local Y is always pointing up, and local Z is always pointing toward you.

createStandardWorldToView(index: StandardViewIndex, invert: booleanfalse, result?: Matrix3d): Matrix3d

Parameter Type Description
index StandardViewIndex standard view index StandardViewIndex.Top, Bottom, Left, Right, Front, Back, Iso, RightIso
invert boolean if false (default), the return matrix is world to local (view) and if true, the the return
matrix is local (view) to world.
result Matrix3d optional result.

Returns - Matrix3d

Defined in

Last Updated: 21 November, 2024