createRigidViewAxesZTowardsEye MethodStatic

Create a rigid matrix (columns and rows are unit length and pairwise perpendicular) for the given eye coordinate.

  • column 2 is parallel to (x,y,z).
  • column 0 is perpendicular to column 2 and is in the xy plane.
  • column 1 is perpendicular to both. It is the "up" vector on the view plane.
  • Multiplying the returned matrix times a local (view) vector gives the world vector.
  • Multiplying transpose of the returned matrix times a world vector gives the local (view) vector.
  • If you want to rotate a given plane (which contains (0,0,0)) to the xy-plane, pass coordinates of the normal vector of your plane into createRigidViewAxesZTowardsEye. The transpose of the returned Matrix3d can be used to rotate your plane to the xy-plane. If plane does not contain (0,0,0) then the plane is rotated to a plane parallel to the xy-plane.

createRigidViewAxesZTowardsEye(x: number, y: number, z: number, result?: Matrix3d): Matrix3d

Parameter Type Description
x number eye x coordinate
y number eye y coordinate
z number eye z coordinate
result Matrix3d optional preallocated result

Returns - Matrix3d

Defined in

Last Updated: 14 November, 2024