GetCameraRFromLookAt

function [Rw2oc] = GetCameraRFromLookAt(Twoc, Pi , Up, nCamOriginZFw)

Description: Returns the camera transformations matrix from LooAt data. All input parameters can be column vectors (1row per camera), if inputs parameters have nCams rows the output will be 4x4xnCams matrix.
Out parameters:
  • Rw2oc = Camera rotation matrix [mat 3x3xnCams] ]
 
In parameters: 
  • Twoc = Translation camera vector (camera position) [X Y Z]
  • Pi = Point of interest [X Y Z]
  • Up = Camera UP vector [X Y Z]  ([0 0 1] -> Up is +Z axis)
  • optional nCamOriginZFw = Indicates where the original camera is pointing. Allowed values: 1 = +Z, -1 = -Z (Default = -1)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: