SclViewport setCameraUpVector
Overview
You use this command to specify the x, y, and z coordinates of the up vector of the camera for the viewport.
Synopsis
SclViewport setCameraUpVector <$viewportHandle> <$x> <$y> <$z>
Description
Set the up vector position of the camera for the viewport referred to by the handle. The camera up vector values in each direction are specified by the parameters x, y, and z.
The camera up vector describes the direction of a vector pointing up from the top of the camera. This provides additional orientation information for the camera to make sure that 'up' is in the required direction. Without this additional vector, the direction from camera to target is insufficient to define how the scene will appear. The up vector does not have units. Values like x=0, y=1, z=0 are practical when looking at data in plan view.
Arguments
- setCameraUpVector
- <$viewportHandle>
- <$x>
- <$y>
- <$z>
A literal string to identify the function.
The reference handle to the viewport that you want to set the camera up vector for.
The x value of the camera up vector.
The y value of the camera up vector.
The z value of the camera up vector.
Returns
If successful, this command returns $SCL_OK. If the viewport handle is not valid, an error message is returned.
Examples
# Get and set the camera up vector for a viewport set vp [SclViewport getActive] SclViewport section $vp SclViewport getCameraUpVector $vp xPos yPos zPos puts "Camera up vector is at X=$xPos ; Y=$yPos ; Z=$zPos" # Move the camera up vector 2 metres higher SclViewport setCameraUpVector $vp $xPos [expr $yPos + 2] $zPos SclViewport getCameraUpVector $vp xPos yPos zPos puts "Camera up vector is now X=$xPos ; Y=$yPos ; Z=$zPos" |