Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
StereoDisplayRegion Class Reference

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

#include "stereoDisplayRegion.h"

Inheritance diagram for StereoDisplayRegion:
DisplayRegion DisplayRegionBase DrawableRegion TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Member Functions

virtual void disable_clears ()
 Disables both the color and depth clear.
virtual TypeHandle force_init_type ()
DisplayRegionget_left_eye ()
 Returns a pointer to the left DisplayRegion managed by this stereo object.
DisplayRegionget_right_eye ()
 Returns a pointer to the right DisplayRegion managed by this stereo object.
virtual TypeHandle get_type () const
virtual bool is_stereo () const
 Returns true if this is a StereoDisplayRegion, false otherwise.
virtual void output (ostream &out) const
virtual PT (PandaNode) make_cull_result_graph()
virtual void set_active (bool active)
 Sets the active flag on both the left and right DisplayRegions to the indicated value.
virtual void set_camera (const NodePath &camera)
 Sets both the left and right DisplayRegions to the indicated camera.
virtual void set_clear_active (int n, bool clear_aux_active)
 Sets the clear-active flag for any bitplane.
virtual void set_clear_value (int n, const LColor &clear_value)
 Sets the clear value for any bitplane.
virtual void set_cube_map_index (int cube_map_index)
 Sets the cube_map_index on both the left and right DisplayRegions to the indicated value.
virtual void set_cull_traverser (CullTraverser *trav)
 Sets the CullTraverser for both the left and right DisplayRegions.
virtual void set_dimensions (const LVecBase4 &dimensions)
 Sets both the left and right DisplayRegions to the indicated dimensions.
virtual void set_incomplete_render (bool incomplete_render)
 Sets the incomplete_render flag on both the left and right DisplayRegions to the indicated value.
virtual void set_pixel_zoom (PN_stdfloat pixel_zoom)
 Sets the pixel_zoom for left and right eyes.
virtual void set_sort (int sort)
 Sets the indicated sort value on the overall DisplayRegion, the indicated sort value + 1 on the left eye, and the indicated sort value + 2 on the right eye.
virtual void set_stereo_channel (Lens::StereoChannel stereo_channel)
 Sets the stereo channels on the left and right eyes, and also sets the active flags independently on both eyes.
virtual void set_tex_view_offset (int tex_view_offset)
 Sets the current texture view offset for this DisplayRegion.
virtual void set_texture_reload_priority (int texture_reload_priority)
 Sets the texture_reload_priority on both the left and right DisplayRegions to the indicated value.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.

Protected Member Functions

 StereoDisplayRegion (GraphicsOutput *window, const LVecBase4 &dimensions, DisplayRegion *left, DisplayRegion *right)

Friends

class DisplayRegionPipelineReader
class GraphicsOutput

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().

Definition at line 37 of file stereoDisplayRegion.h.


Member Function Documentation

Disables both the color and depth clear.

See set_clear_color_active and set_clear_depth_active.

Reimplemented from DrawableRegion.

Definition at line 94 of file stereoDisplayRegion.cxx.

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

Definition at line 23 of file stereoDisplayRegion.I.

Referenced by GraphicsOutput::make_mono_display_region(), and GraphicsOutput::remove_display_region().

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

Definition at line 34 of file stereoDisplayRegion.I.

Referenced by GraphicsOutput::make_mono_display_region(), and GraphicsOutput::remove_display_region().

static void StereoDisplayRegion::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from DisplayRegion.

Definition at line 80 of file stereoDisplayRegion.h.

References DisplayRegion::init_type().

bool StereoDisplayRegion::is_stereo ( ) const [virtual]

Returns true if this is a StereoDisplayRegion, false otherwise.

Reimplemented from DisplayRegion.

Definition at line 132 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_active ( bool  active) [virtual]

Sets the active flag on both the left and right DisplayRegions to the indicated value.

Reimplemented from DisplayRegion.

Definition at line 156 of file stereoDisplayRegion.cxx.

References DisplayRegion::get_stereo_channel(), and set_stereo_channel().

void StereoDisplayRegion::set_camera ( const NodePath camera) [virtual]

Sets both the left and right DisplayRegions to the indicated camera.

Reimplemented from DisplayRegion.

Definition at line 143 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_clear_active ( int  n,
bool  clear_aux_active 
) [virtual]

Sets the clear-active flag for any bitplane.

Reimplemented from DrawableRegion.

Definition at line 54 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_clear_value ( int  n,
const LColor clear_value 
) [virtual]

Sets the clear value for any bitplane.

Reimplemented from DrawableRegion.

Definition at line 81 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_cube_map_index ( int  cube_map_index) [virtual]

Sets the cube_map_index on both the left and right DisplayRegions to the indicated value.

Reimplemented from DisplayRegion.

Definition at line 308 of file stereoDisplayRegion.cxx.

Sets the CullTraverser for both the left and right DisplayRegions.

Reimplemented from DisplayRegion.

Definition at line 295 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_dimensions ( const LVecBase4 dimensions) [virtual]

Sets both the left and right DisplayRegions to the indicated dimensions.

Reimplemented from DisplayRegion.

Definition at line 119 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_incomplete_render ( bool  incomplete_render) [virtual]

Sets the incomplete_render flag on both the left and right DisplayRegions to the indicated value.

Reimplemented from DisplayRegion.

Definition at line 269 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_pixel_zoom ( PN_stdfloat  pixel_zoom) [virtual]

Sets the pixel_zoom for left and right eyes.

Reimplemented from DrawableRegion.

Definition at line 106 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_sort ( int  sort) [virtual]

Sets the indicated sort value on the overall DisplayRegion, the indicated sort value + 1 on the left eye, and the indicated sort value + 2 on the right eye.

Reimplemented from DisplayRegion.

Definition at line 176 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_stereo_channel ( Lens::StereoChannel  stereo_channel) [virtual]

Sets the stereo channels on the left and right eyes, and also sets the active flags independently on both eyes.

For a StereoDisplayRegion, a different action is performed for each different value:

SC_stereo - the left eye is set to SC_left, the right eye to SC_right, and both eyes are activated.

SC_left - the left eye is set to SC_left and activated; the right eye is deactivated.

SC_right - the right eye is set to SC_right and activated; the left eye is deactivated.

SC_mono - the left eye is set to SC_mono and activated; the right eye is deactivated.

This call also resets tex_view_offset to its default value, which is 0 for the left eye or 1 for the right eye of a stereo display region, or 0 for a mono display region.

Reimplemented from DisplayRegion.

Definition at line 208 of file stereoDisplayRegion.cxx.

References DisplayRegion::is_active().

Referenced by set_active().

void StereoDisplayRegion::set_tex_view_offset ( int  tex_view_offset) [virtual]

Sets the current texture view offset for this DisplayRegion.

This is normally set to zero. If nonzero, it is used to select a particular view of any multiview textures that are rendered within this DisplayRegion.

When you call this on a StereoDisplayRegion, it automatically sets the specified value on the left eye, and the specified value + 1 on the right eye.

Reimplemented from DisplayRegion.

Definition at line 256 of file stereoDisplayRegion.cxx.

void StereoDisplayRegion::set_texture_reload_priority ( int  texture_reload_priority) [virtual]

Sets the texture_reload_priority on both the left and right DisplayRegions to the indicated value.

Reimplemented from DisplayRegion.

Definition at line 282 of file stereoDisplayRegion.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations