SclViewport getExtents
Overview
You use this command to find the extents of the viewport in the x, y, and z directions.
Synopsis
SclViewport getExtents <$viewportHandle> <minx> <maxx> <miny> <maxy> <minz> <maxz>
Description
Get the extents for the viewport referred to by the handle. The viewport extents for the x, y, and z directions are returned into the named variables.
Arguments
- getExtents
- <$viewportHandle>
- <minx> and <maxx>
- <miny> and <maxy>
- <minz> and <maxz>
A literal string to identify the function.
The reference handle to the viewport to return the extents of.
Returns the minimum and maximum values along the x axis direction.
Returns the minimum and maximum values along the y axis direction.
Returns the minimum and maximum values along the z axis direction.
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 extents for a viewport set vp [SclViewport getActive] SclViewport getExtents $vp minX maxX minY maxY minZ maxZ puts "Current extents are X $minX - $maxX Y $minY - $maxY Z $minZ - $maxZ" set minX [expr $minX - 50]; set maxX [expr $maxX + 50]; set minY [expr $minY - 50]; set maxY [expr $maxY + 50]; set minZ [expr $minZ - 50]; set maxZ [expr $maxZ + 50]; SclViewport setExtents $vp $minX $maxX $minY $maxY $minZ $maxZ SclViewport getExtents $vp minX maxX minY maxY minZ maxZ puts "Extents are now X $minX - $maxX Y $minY - $maxY Z $minZ - $maxZ" |