You are here: Surpac Concepts > Macros > SCL > Viewport and Layers > SclViewport > SclViewport getCameraUpVector
GEOVIA Surpac

SclViewport getCameraUpVector

Overview

You use this command to get the up vector x, y, and z coordinates of the camera for the viewport.

Synopsis

SclViewport getCameraUpVector <$viewportHandle> <x> <y> <z>

Description

Get the up vector position of the camera for the viewport referred to by the handle. The camera up vector values in each direction are returned into the named Tcl variables x, y, and z.

Arguments

  • getCameraUpVector
  • A literal string to identify the function.

  • <$viewportHandle>
  • The reference handle to the viewport that you want to get the camera up vector of.

  • <x>
  • Returns the x value of the camera up vector.

  • <y>
  • Returns the y value of the camera up vector.

  • <z>
  • Returns 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 getCameraUpVector $vp xPos yPos zPos
puts "Camera up vector is at X=$xPos ; Y=$yPos ; Z=$zPos"
# Change the up vector
SclViewport setCameraUpVector $vp 0 1 1
SclViewport getCameraUpVector $vp xPos yPos zPos
puts "Camera up vector is now X=$xPos ; Y=$yPos ; Z=$zPos"