Meta_Viewport
A Viewport occupies a specified rectangle of a window (range 0 to 1) which renders the 3D scene from the specified eye points looking at the specified screen rectangles.
Public Types
Values for Idx_EyeOverride.
EyeOverride_None | No eye override, will draw both left and right as required (Symbols - C: "EyeOverrideNone" , Lua: __Viewport_EyeOverrideNone ) |
EyeOverride_Mono | Drawing is done as mono (Symbols - C: "EyeOverrideMono" , Lua: __Viewport_EyeOverrideMono ) |
EyeOverride_Left | Drawing is done only from the left eye (Symbols - C: "EyeOverrideLeft" , Lua: __Viewport_EyeOverrideLeft ) |
EyeOverride_Right | Drawing is done only from the right eye (Symbols - C: "EyeOverrideRight" , Lua: __Viewport_EyeOverrideRight ) |
Property index.
Idx_Enabled | bool - When enabled, viewport is drawn to the screen |
Idx_Rectangle | vec4f - The viewport bounds, scaled on the screen by the ViewportLayout size. (e.g. layout size 2.0, 1.0 , and child viewport width 1.0 will fill half the screen with the viewport) |
Idx_Camera | link - The camera from which the scene is rendered |
Idx_ProjectionMode | ProjectionMode (int) - The projection mode |
Idx_Screen_Mono | link - (for PhysicalScreen mode) Link to the physical screen for rendering mono |
Idx_Screen_Left | link - (for PhysicalScreen mode) Link to the physical screen for rendering the left eye |
Idx_Screen_Right | link - (for PhysicalScreen mode) Link to the physical screen for rendering the right eye |
Idx_FOV | float - (for other modes) The field of view |
Idx_ScreenWidth | float - (for other modes) The physical width of the screen being displayed on (for stereo separation calculations) |
Idx_ScreenOffset | vec2f - (for other modes) The screen offset |
Idx_HMD | bool - (for other modes) Whether the viewport is being used in a HMD, which makes the viewport calculation affect the camera transform directly, rather than skewing the projection for wall-based setups |
Idx_OrthographicZoom | float - (for Orthographic mode) The zoom factor |
Idx_EyeOverride | EyeOverride (int) - Overrides the eye drawn by this viewport |
Idx_Mirror | bool - When enabled, viewport is mirrored, which can be helpful for aligning tracker inputs with assemblies |
Values for Idx_ProjectionMode.
ProjectionMode_PhysicalScreen | Projection is defined by eye position and physical screen node (Symbols - C: "ProjectionModePhysicalScreen" , Lua: __Viewport_ProjectionModePhysicalScreen ) |
ProjectionMode_FOVAndWidth | Projection is defined by eye position, FOV, screen width and HMD flag (Symbols - C: "ProjectionModeFOVAndWidth" , Lua: __Viewport_ProjectionModeFOVAndWidth ) |
ProjectionMode_Orthographic | Projection is orthographic, from the eye position (Symbols - C: "ProjectionModeOrthographic" , Lua: __Viewport_ProjectionModeOrthographic ) |