Panda3D
|
This is a special DisplayRegion wrapper that actually includes a pair of DisplayRegions internally: the left and right eyes. More...
#include <pandadoc.hpp>
Public Member Functions | |
DisplayRegion | getLeftEye () |
Returns a pointer to the left DisplayRegion managed by this stereo object. | |
DisplayRegion | getRightEye () |
Returns a pointer to the right DisplayRegion managed by this stereo object. | |
![]() | |
clearCullCallback () | |
Removes the callback set by an earlier call to set_cull_callback(). | |
clearCullResult () | |
clearDrawCallback () | |
Removes the callback set by an earlier call to set_draw_callback(). | |
float | getBottom (int i) |
Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput. | |
NodePath | getCamera (Thread current_thread) |
Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated. | |
CallbackObject | getCullCallback () |
Returns the CallbackObject set by set_cull_callback(). | |
CullTraverser | getCullTraverser () |
Returns the CullTraverser that will be used to draw the contents of this DisplayRegion. | |
LVecBase4 | getDimensions (int i) |
Retrieves the coordinates of the DisplayRegion's rectangle within its GraphicsOutput. | |
CallbackObject | getDrawCallback () |
Returns the CallbackObject set by set_draw_callback(). | |
bool | getIncompleteRender () |
Returns the incomplete_render flag. | |
float | getLeft (int i) |
Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput. | |
int | getLensIndex () |
Returns the specific lens of the associated Camera that will be used for rendering this scene. | |
int | getNumRegions () |
Returns the number of regions, see set_num_regions. | |
GraphicsPipe | getPipe () |
Returns the GraphicsPipe that this DisplayRegion is ultimately associated with, or NULL if no pipe is associated. | |
int | getPixelHeight (int i) |
Returns the height of the DisplayRegion in pixels. | |
LVecBase2i | getPixelSize (int i) |
Returns the size of the DisplayRegion in pixels. | |
int | getPixelWidth (int i) |
Returns the width of the DisplayRegion in pixels. | |
float | getRight (int i) |
Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput. | |
bool | getScissorEnabled () |
Returns whether or not scissor testing is enabled for this region. | |
Texture | getScreenshot () |
Captures the most-recently rendered image from the framebuffer and returns it as a Texture, or NULL on failure. | |
bool | getScreenshot (PNMImage image) |
Captures the most-recently rendered image from the framebuffer into the indicated PNMImage. | |
int | getSort () |
Returns the sort value associated with the DisplayRegion. | |
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. | |
int | getTargetTexPage () |
Returns the target page number associated with this particular DisplayRegion, or -1 if it is not associated with a page. | |
int | getTextureReloadPriority () |
Returns the priority which is assigned to asynchronous texture reload requests. | |
int | getTexViewOffset () |
Returns the current texture view offset for this DisplayRegion. | |
float | getTop (int i) |
Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput. | |
GraphicsOutput | getWindow () |
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no window is associated. | |
bool | isActive () |
Returns the active flag associated with the DisplayRegion. | |
bool | isStereo () |
Returns true if this is a StereoDisplayRegion, false otherwise. | |
PandaNode | makeCullResultGraph () |
Returns a special scene graph constructed to represent the results of the last frame's cull operation. | |
output (Ostream out) | |
bool | saveScreenshot (const Filename filename, str image_comment) |
Saves a screenshot of the region to the indicated filename. | |
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. | |
setActive (bool active) | |
Sets the active flag associated with the DisplayRegion. | |
setCamera (const NodePath camera) | |
Sets the camera that is associated with this DisplayRegion. | |
setCubeMapIndex (int cube_map_index) | |
Deprecated; replaced by set_target_tex_page(). | |
setCullCallback (CallbackObject object) | |
Sets the CallbackObject that will be notified when the DisplayRegion is visited during the cull traversal. | |
setCullTraverser (CullTraverser trav) | |
Specifies the CullTraverser that will be used to draw the contents of this DisplayRegion. | |
setDimensions (const LVecBase4 dimensions) | |
Changes the portion of the framebuffer this DisplayRegion corresponds to. | |
setDimensions (float l, float r, float b, float t) | |
Changes the portion of the framebuffer this DisplayRegion corresponds to. | |
setDimensions (int i, const LVecBase4 dimensions) | |
Changes the portion of the framebuffer this DisplayRegion corresponds to. | |
setDimensions (int i, float l, float r, float b, float t) | |
Changes the portion of the framebuffer this DisplayRegion corresponds to. | |
setDrawCallback (CallbackObject object) | |
Sets the CallbackObject that will be notified when the contents of DisplayRegion is drawn during the draw traversal. | |
setIncompleteRender (bool incomplete_render) | |
Sets the incomplete_render flag. | |
setLensIndex (int index) | |
Sets the lens index, allows for multiple lenses to be attached to a camera. | |
setNumRegions (int i) | |
Sets the number of regions that this DisplayRegion indicates. | |
setScissorEnabled (bool scissor_enabled) | |
Sets whether or not scissor testing is enabled for this region. | |
setSort (int sort) | |
Sets the sort value associated with the DisplayRegion. | |
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. | |
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. | |
setTextureReloadPriority (int texture_reload_priority) | |
Specifies an integer priority which is assigned to any asynchronous texture reload requests spawned while processing this DisplayRegion. | |
setTexViewOffset (int tex_view_offset) | |
Sets the current texture view offset for this DisplayRegion. | |
![]() | |
TypeHandle | getType () |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. | |
![]() | |
int | getRefCount () |
Returns the current reference count. | |
ref () | |
Explicitly increments the reference count. | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
bool | unref () |
Explicitly decrements the reference count. | |
![]() | |
disableClears () | |
Disables both the color and depth clear. | |
bool | getClearActive (int n) |
Gets the clear-active flag for any bitplane. | |
const LColor | getClearColor () |
Returns the current clear color value. | |
bool | getClearColorActive () |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. | |
float | getClearDepth () |
Returns the current clear depth value. | |
bool | getClearDepthActive () |
Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame. | |
unsigned int | getClearStencil () |
Returns the current clear stencil value. | |
bool | getClearStencilActive () |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. | |
const LColor | getClearValue (int n) |
Returns the clear value for any bitplane. | |
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(). | |
float | getPixelZoom () |
Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not. | |
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. | |
setClearActive (int n, bool clear_aux_active) | |
Sets the clear-active flag for any bitplane. | |
setClearColor (const LColor color) | |
Sets the clear color to the indicated value. | |
setClearColorActive (bool clear_color_active) | |
Toggles the flag that indicates whether the color buffer should be cleared every frame. | |
setClearDepth (float depth) | |
Sets the clear depth to the indicated value. | |
setClearDepthActive (bool clear_depth_active) | |
Toggles the flag that indicates whether the depth buffer should be cleared every frame. | |
setClearStencil (unsigned int stencil) | |
setClearStencilActive (bool clear_stencil_active) | |
Toggles the flag that indicates whether the stencil buffer should be cleared every frame. | |
setClearValue (int n, const LColor clear_value) | |
Sets the clear value for any bitplane. | |
setPixelZoom (float pixel_zoom) | |
Sets the amount by which the pixels of the region are scaled internally when filling the image interally. | |
bool | supportsPixelZoom () |
Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
static Filename | makeScreenshotFilename (str prefix) |
Synthesizes a suitable default filename for passing to save_screenshot(). | |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static int | getRenderbufferType (int plane) |
Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane. | |
Public Attributes | |
DisplayRegion | left_eye |
Returns a pointer to the left DisplayRegion managed by this stereo object. | |
DisplayRegion | right_eye |
Returns a pointer to the right DisplayRegion managed by this stereo object. | |
![]() | |
bool | active |
Returns the active flag associated with the DisplayRegion. | |
NodePath | camera |
Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated. | |
CallbackObject | cull_callback |
Returns the CallbackObject set by set_cull_callback(). | |
CullTraverser | cull_traverser |
Returns the CullTraverser that will be used to draw the contents of this DisplayRegion. | |
LVecBase4 | dimensions |
Retrieves the coordinates of the DisplayRegion's rectangle within its GraphicsOutput. | |
CallbackObject | draw_callback |
Returns the CallbackObject set by set_draw_callback(). | |
bool | incomplete_render |
Returns the incomplete_render flag. | |
int | lens_index |
Returns the specific lens of the associated Camera that will be used for rendering this scene. | |
GraphicsPipe | pipe |
Returns the GraphicsPipe that this DisplayRegion is ultimately associated with, or NULL if no pipe is associated. | |
LVecBase2i | pixel_size |
Returns the size of the DisplayRegion in pixels. | |
bool | scissor_enabled |
Returns whether or not scissor testing is enabled for this region. | |
int | sort |
Returns the sort value associated with the DisplayRegion. | |
bool | stereo |
Returns true if this is a StereoDisplayRegion, false otherwise. | |
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. | |
int | target_tex_page |
Returns the target page number associated with this particular DisplayRegion, or -1 if it is not associated with a page. | |
int | tex_view_offset |
Returns the current texture view offset for this DisplayRegion. | |
int | texture_reload_priority |
Returns the priority which is assigned to asynchronous texture reload requests. | |
GraphicsOutput | window |
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no window is associated. | |
![]() | |
TypeHandle | type |
Returns the TypeHandle representing this object's type. | |
![]() | |
int | ref_count |
The current reference count. | |
![]() | |
const LColor | clear_color |
Returns the current clear color value. | |
float | clear_depth |
Returns the current clear depth value. | |
unsigned int | clear_stencil |
Returns the current clear stencil value. | |
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(). | |
float | pixel_zoom |
Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not. | |
Additional Inherited Members | |
![]() | |
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 } |
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().
|
static |
DisplayRegion getLeftEye | ( | ) |
Returns a pointer to the left DisplayRegion managed by this stereo object.
DisplayRegion getRightEye | ( | ) |
Returns a pointer to the right DisplayRegion managed by this stereo object.
DisplayRegion left_eye |
Returns a pointer to the left DisplayRegion managed by this stereo object.
DisplayRegion right_eye |
Returns a pointer to the right DisplayRegion managed by this stereo object.