Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
StereoDisplayRegion Class Reference

This is a special DisplayRegion wrapper that actually includes a pair of DisplayRegions internally: the left and right eyes. More...

Inheritance diagram for StereoDisplayRegion:
DisplayRegion TypedReferenceCount DrawableRegion TypedObject ReferenceCount

Public Member Functions

DisplayRegion getLeftEye ()
 Returns a pointer to the left DisplayRegion managed by this stereo object. More...
 
DisplayRegion getRightEye ()
 Returns a pointer to the right DisplayRegion managed by this stereo object. More...
 
- Public Member Functions inherited from DisplayRegion
 clearCullCallback ()
 Removes the callback set by an earlier call to set_cull_callback(). More...
 
 clearDrawCallback ()
 Removes the callback set by an earlier call to set_draw_callback(). More...
 
float getBottom (int i)
 Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput. More...
 
NodePath getCamera (Thread current_thread)
 Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated. More...
 
CallbackObject getCullCallback ()
 Returns the CallbackObject set by set_cull_callback(). More...
 
CullTraverser getCullTraverser ()
 Returns the CullTraverser that will be used to draw the contents of this DisplayRegion. More...
 
LVecBase4 getDimensions (int i)
 Retrieves the coordinates of the DisplayRegion's rectangle within its GraphicsOutput. More...
 
CallbackObject getDrawCallback ()
 Returns the CallbackObject set by set_draw_callback(). More...
 
bool getIncompleteRender ()
 Returns the incomplete_render flag. More...
 
float getLeft (int i)
 Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput. More...
 
int getLensIndex ()
 Returns the specific lens of the associated Camera that will be used for rendering this scene. More...
 
int getNumRegions ()
 Returns the number of regions, see set_num_regions. More...
 
GraphicsPipe getPipe ()
 Returns the GraphicsPipe that this DisplayRegion is ultimately associated with, or NULL if no pipe is associated. More...
 
int getPixelHeight (int i)
 Returns the height of the DisplayRegion in pixels. More...
 
LVecBase2i getPixelSize (int i)
 Returns the size of the DisplayRegion in pixels. More...
 
int getPixelWidth (int i)
 Returns the width of the DisplayRegion in pixels. More...
 
float getRight (int i)
 Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput. More...
 
bool getScissorEnabled ()
 Returns whether or not scissor testing is enabled for this region. More...
 
Texture getScreenshot ()
 Captures the most-recently rendered image from the framebuffer and returns it as a Texture, or NULL on failure. More...
 
bool getScreenshot (PNMImage image)
 Captures the most-recently rendered image from the framebuffer into the indicated PNMImage. More...
 
int getSort ()
 Returns the sort value associated with the DisplayRegion. More...
 
Lens::StereoChannel getStereoChannel ()
 Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair, or whether it is a normal, monocular image. More...
 
int getTargetTexPage ()
 Returns the target page number associated with this particular DisplayRegion, or -1 if it is not associated with a page. More...
 
int getTextureReloadPriority ()
 Returns the priority which is assigned to asynchronous texture reload requests. More...
 
int getTexViewOffset ()
 Returns the current texture view offset for this DisplayRegion. More...
 
float getTop (int i)
 Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput. More...
 
GraphicsOutput getWindow ()
 Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no window is associated. More...
 
bool isActive ()
 Returns the active flag associated with the DisplayRegion. More...
 
bool isStereo ()
 Returns true if this is a StereoDisplayRegion, false otherwise. More...
 
PandaNode makeCullResultGraph ()
 Returns a special scene graph constructed to represent the results of the last frame's cull operation. More...
 
 output (Ostream out)
 
bool saveScreenshot (const Filename filename, str image_comment)
 Saves a screenshot of the region to the indicated filename. More...
 
Filename saveScreenshotDefault (str prefix)
 Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed. More...
 
 setActive (bool active)
 Sets the active flag associated with the DisplayRegion. More...
 
 setCamera (const NodePath camera)
 Sets the camera that is associated with this DisplayRegion. More...
 
 setCubeMapIndex (int cube_map_index)
 Deprecated; replaced by set_target_tex_page(). More...
 
 setCullCallback (CallbackObject object)
 Sets the CallbackObject that will be notified when the DisplayRegion is visited during the cull traversal. More...
 
 setCullTraverser (CullTraverser trav)
 Specifies the CullTraverser that will be used to draw the contents of this DisplayRegion. More...
 
 setDimensions (const LVecBase4 dimensions)
 Changes the portion of the framebuffer this DisplayRegion corresponds to. More...
 
 setDimensions (float l, float r, float b, float t)
 Changes the portion of the framebuffer this DisplayRegion corresponds to. More...
 
 setDimensions (int i, const LVecBase4 dimensions)
 Changes the portion of the framebuffer this DisplayRegion corresponds to. More...
 
 setDimensions (int i, float l, float r, float b, float t)
 Changes the portion of the framebuffer this DisplayRegion corresponds to. More...
 
 setDrawCallback (CallbackObject object)
 Sets the CallbackObject that will be notified when the contents of DisplayRegion is drawn during the draw traversal. More...
 
 setIncompleteRender (bool incomplete_render)
 Sets the incomplete_render flag. More...
 
 setLensIndex (int index)
 Sets the lens index, allows for multiple lenses to be attached to a camera. More...
 
 setNumRegions (int i)
 Sets the number of regions that this DisplayRegion indicates. More...
 
 setScissorEnabled (bool scissor_enabled)
 Sets whether or not scissor testing is enabled for this region. More...
 
 setSort (int sort)
 Sets the sort value associated with the DisplayRegion. More...
 
 setStereoChannel (Lens::StereoChannel stereo_channel)
 Specifies whether the DisplayRegion represents the left or right channel of a stereo pair, or whether it is a normal, monocular image. More...
 
 setTargetTexPage (int page)
 This is a special parameter that is only used when rendering the faces of a cube map or multipage and/or multiview texture. More...
 
 setTextureReloadPriority (int texture_reload_priority)
 Specifies an integer priority which is assigned to any asynchronous texture reload requests spawned while processing this DisplayRegion. More...
 
 setTexViewOffset (int tex_view_offset)
 Sets the current texture view offset for this DisplayRegion. More...
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count. More...
 
 ref ()
 Explicitly increments the reference count. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
bool unref ()
 Explicitly decrements the reference count. More...
 
- Public Member Functions inherited from DrawableRegion
 disableClears ()
 Disables both the color and depth clear. More...
 
bool getClearActive (int n)
 Gets the clear-active flag for any bitplane. More...
 
const LColor getClearColor ()
 Returns the current clear color value. More...
 
bool getClearColorActive ()
 Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. More...
 
float getClearDepth ()
 Returns the current clear depth value. More...
 
bool getClearDepthActive ()
 Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame. More...
 
unsigned int getClearStencil ()
 Returns the current clear stencil value. More...
 
bool getClearStencilActive ()
 Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. More...
 
const LColor getClearValue (int n)
 Returns the clear value for any bitplane. More...
 
float getPixelFactor ()
 Returns the amount by which the height and width of the region will be scaled internally, based on the zoom factor set by set_pixel_zoom(). More...
 
float getPixelZoom ()
 Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not. More...
 
bool isAnyClearActive ()
 Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear. More...
 
 setClearActive (int n, bool clear_aux_active)
 Sets the clear-active flag for any bitplane. More...
 
 setClearColor (const LColor color)
 Sets the clear color to the indicated value. More...
 
 setClearColorActive (bool clear_color_active)
 Toggles the flag that indicates whether the color buffer should be cleared every frame. More...
 
 setClearDepth (float depth)
 Sets the clear depth to the indicated value. More...
 
 setClearDepthActive (bool clear_depth_active)
 Toggles the flag that indicates whether the depth buffer should be cleared every frame. More...
 
 setClearStencil (unsigned int stencil)
 
 setClearStencilActive (bool clear_stencil_active)
 Toggles the flag that indicates whether the stencil buffer should be cleared every frame. More...
 
 setClearValue (int n, const LColor clear_value)
 Sets the clear value for any bitplane. More...
 
 setPixelZoom (float pixel_zoom)
 Sets the amount by which the pixels of the region are scaled internally when filling the image interally. More...
 
bool supportsPixelZoom ()
 Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored. More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from DisplayRegion
static TypeHandle getClassType ()
 
static Filename makeScreenshotFilename (str prefix)
 Synthesizes a suitable default filename for passing to save_screenshot(). More...
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from DrawableRegion
static int getRenderbufferType (int plane)
 Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane. More...
 

Public Attributes

DisplayRegion left_eye
 Returns a pointer to the left DisplayRegion managed by this stereo object. More...
 
DisplayRegion right_eye
 Returns a pointer to the right DisplayRegion managed by this stereo object. More...
 
- Public Attributes inherited from DisplayRegion
bool active
 Returns the active flag associated with the DisplayRegion. More...
 
NodePath camera
 Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated. More...
 
CallbackObject cull_callback
 Returns the CallbackObject set by set_cull_callback(). More...
 
CullTraverser cull_traverser
 Returns the CullTraverser that will be used to draw the contents of this DisplayRegion. More...
 
LVecBase4 dimensions
 Retrieves the coordinates of the DisplayRegion's rectangle within its GraphicsOutput. More...
 
CallbackObject draw_callback
 Returns the CallbackObject set by set_draw_callback(). More...
 
bool incomplete_render
 Returns the incomplete_render flag. More...
 
int lens_index
 Returns the specific lens of the associated Camera that will be used for rendering this scene. More...
 
GraphicsPipe pipe
 Returns the GraphicsPipe that this DisplayRegion is ultimately associated with, or NULL if no pipe is associated. More...
 
LVecBase2i pixel_size
 Returns the size of the DisplayRegion in pixels. More...
 
bool scissor_enabled
 Returns whether or not scissor testing is enabled for this region. More...
 
int sort
 Returns the sort value associated with the DisplayRegion. More...
 
bool stereo
 Returns true if this is a StereoDisplayRegion, false otherwise. More...
 
Lens::StereoChannel stereo_channel
 Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair, or whether it is a normal, monocular image. More...
 
int target_tex_page
 Returns the target page number associated with this particular DisplayRegion, or -1 if it is not associated with a page. More...
 
int tex_view_offset
 Returns the current texture view offset for this DisplayRegion. More...
 
int texture_reload_priority
 Returns the priority which is assigned to asynchronous texture reload requests. More...
 
GraphicsOutput window
 Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no window is associated. More...
 
- Public Attributes inherited from TypedObject
TypeHandle type
 Returns the TypeHandle representing this object's type. More...
 
- Public Attributes inherited from ReferenceCount
int ref_count
 The current reference count. More...
 
- Public Attributes inherited from DrawableRegion
const LColor clear_color
 Returns the current clear color value. More...
 
float clear_depth
 Returns the current clear depth value. More...
 
unsigned int clear_stencil
 Returns the current clear stencil value. More...
 
float pixel_factor
 Returns the amount by which the height and width of the region will be scaled internally, based on the zoom factor set by set_pixel_zoom(). More...
 
float pixel_zoom
 Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not. More...
 

Additional Inherited Members

- Public Types inherited from DrawableRegion
enum  RenderTexturePlane {
  RTP_stencil = 0, RTP_depth_stencil = 1, RTP_color = 2, RTP_aux_rgba_0 = 3,
  RTP_aux_rgba_1 = 4, RTP_aux_rgba_2 = 5, RTP_aux_rgba_3 = 6, RTP_aux_hrgba_0 = 7,
  RTP_aux_hrgba_1 = 8, RTP_aux_hrgba_2 = 9, RTP_aux_hrgba_3 = 10, RTP_aux_float_0 = 11,
  RTP_aux_float_1 = 12, RTP_aux_float_2 = 13, RTP_aux_float_3 = 14, RTP_depth = 15,
  RTP_COUNT = 16
}
 

Detailed Description

This is a special DisplayRegion wrapper that actually includes a pair of DisplayRegions internally: the left and right eyes.

The DisplayRegion represented here does not have a physical association with the window, but it pretends it does. Instead, it maintains a pointer to the left and right DisplayRegions separately.

Operations on the StereoDisplayRegion object affect both left and right eyes together. To access the left or right eyes independently, use get_left_eye() and get_right_eye().

Member Function Documentation

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getLeftEye()

DisplayRegion getLeftEye ( )

Returns a pointer to the left DisplayRegion managed by this stereo object.

◆ getRightEye()

DisplayRegion getRightEye ( )

Returns a pointer to the right DisplayRegion managed by this stereo object.

Member Data Documentation

◆ left_eye

DisplayRegion left_eye

Returns a pointer to the left DisplayRegion managed by this stereo object.

◆ right_eye

DisplayRegion right_eye

Returns a pointer to the right DisplayRegion managed by this stereo object.