Bases: object
Proxy of C++ PCore::LWViewportInfo class
Returns hither
and yon
which hold the near and far Z clipping distances for the nth viewport.
Returns a set of bit flags for the nth viewport. These can be any combination of the following:
lwsdk.LWVIEWF_CENTER
lwsdk.LWVIEWF_WEIGHTSHADE
lwsdk.LWVIEWF_XRAY
Returns the size of the grid spacing for the nth viewport, in metres.
!! NOT DOCUMENTED !!
Returns the standard handle size for the nth viewport, in pixels. This is the size used for example for drawing the translation and rotation tool handles.
!! NOT DOCUMENTED !!
Returns the matrices of the modelview
matrix and the inverse
of the modelview matrix for the nth viewport. The matrices follow the OpenGL convention of m[column][row] with column vectors. result
will be 1 if the asked for matrices were retrieved, 0 on failure which usually means that an inverse matrix was asked for for a matrix that could not be inverted.
The number of viewports visible in the Layout interface.
Returns the world size of the given number of pixels
at the reference position in world for the nth viewport. A sphere with a diameter of the returned size, placed at the reference position, will have a diameter of approximately the given number of pixels when projected.
Returns spot
vector with the viewing position of the nth viewport.
Computes the projected position of the given world
coordinates for the nth viewport. The computed winx
and winy
position is in pixels, relative to the upper-left corner of the viewport. result
will be 1 if the projection was successful, 0 otherwise. Note that the resulting coordinates may fall outside of the viewport.
Returns the matrices of the projection
matrix and the inverse
of the projection matrix for the nth viewport. The matrices follow the OpenGL convention of m[column][row] with column vectors. result
will be 1 if the asked for matrices were retrieved, 0 on failure which usually means that an inverse matrix was asked for for a matrix that could not be inverted.
Returns the left
, top
, width
and height
of the pixel coordinates of the nth viewport.
The type of view in the nth viewport. It will be one of the following:
lwsdk.LVVIEWT_NONE
lwsdk.LVVIEWT_TOP
lwsdk.LVVIEWT_BOTTOM
lwsdk.LVVIEWT_BACK
lwsdk.LVVIEWT_FRONT
lwsdk.LVVIEWT_RIGHT
lwsdk.LVVIEWT_LEFT
lwsdk.LVVIEWT_PERSPECTIVE
lwsdk.LVVIEWT_LIGHT
lwsdk.LVVIEWT_CAMERA
lwsdk.LVVIEWT_SCHEMATIC
Computes the world coordinates of a given pixel position of the nth viewport. The winz
value ranges from 0 for a spot on the near clipping plane, to 1 for a spot on the far clipping plane. Note that drawing on the near or far clipping plane may cause flickering due to floating point imprecision causing random clipping. Returns 1 if the projection was successful, 0 otherwise. Failure is typically caused by the viewport having a non-invertible modelview or projection matrix.
For viewports which have a view through a scene item (lwsdk.LWVIEWT_LIGHT
and lwsdk.LWVIEWT_CAMERA
) the ID of the item is returned. Otherwise lwsdk.LWITEM_NULL
is returned.
Returns the view level for the nth viewport. The returned value is one of the lwsdk.LWOVIS_*
values.
!! NOT DOCUMENTED !!
Returns the 3x3 transformation from viewport coordinates to world coordinates for the nth viewport. Note that from LW9.0, the LWViewportInfo::projection()
and LWViewportInfo::modelview()
functions should be preferred, as this method may not produce correct results for non-perspective camera views.