Panda3D
|
This is a special DisplayRegion wrapper that actually includes a pair of DisplayRegions internally: the left and right eyes. More...
#include "stereoDisplayRegion.h"
Public Types | |
enum | RenderTexturePlane { RTP_stencil = 0, RTP_depth_stencil = 1, RTP_color, RTP_aux_rgba_0, RTP_aux_rgba_1, RTP_aux_rgba_2, RTP_aux_rgba_3, RTP_aux_hrgba_0, RTP_aux_hrgba_1, RTP_aux_hrgba_2, RTP_aux_hrgba_3, RTP_aux_float_0, RTP_aux_float_1, RTP_aux_float_2, RTP_aux_float_3, RTP_depth, RTP_COUNT } |
Public Member Functions | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
void | cleanup () |
Cleans up some pointers associated with the DisplayRegion to help reduce the chance of memory leaks due to circular reference counts. | |
void | clear_cull_callback () |
Removes the callback set by an earlier call to set_cull_callback(). | |
void | clear_draw_callback () |
Removes the callback set by an earlier call to set_draw_callback(). | |
void | compute_pixels () |
Computes the pixel locations of the DisplayRegion within its window. | |
void | compute_pixels (int x_size, int y_size) |
Computes the pixel locations of the DisplayRegion within its window, given the size of the window in pixels. | |
void | compute_pixels_all_stages () |
Computes the pixel locations of the DisplayRegion within its window. | |
void | compute_pixels_all_stages (int x_size, int y_size) |
Performs a compute_pixels() operation for all stages of the pipeline. | |
void | copy_clear_settings (const DrawableRegion ©) |
Copies only the clear settings from the other drawable region. | |
virtual void | disable_clears () |
Disables both the color and depth clear. | |
virtual TypeHandle | force_init_type () |
int | get_best_parent_from_Set (const std::set< int > &) const |
float | get_bottom () const |
Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput. | |
NodePath | get_camera (Thread *current_thread=Thread::get_current_thread()) const |
Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated. | |
virtual bool | get_clear_active (int n) const |
Gets the clear-active flag for any bitplane. | |
const Colorf & | get_clear_color () const |
Returns the current clear color value. | |
bool | get_clear_color_active () const |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. | |
float | get_clear_depth () const |
Returns the current clear depth value. | |
bool | get_clear_depth_active () const |
Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame. | |
unsigned int | get_clear_stencil () const |
Returns the current clear stencil value. | |
bool | get_clear_stencil_active () const |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. | |
virtual const Colorf & | get_clear_value (int n) const |
Returns the clear value for any bitplane. | |
int | get_cube_map_index () const |
Returns the cube map face index associated with this particular DisplayRegion, or -1 if it is not associated with a cube map. | |
CallbackObject * | get_cull_callback () const |
Returns the CallbackObject set by set_cull_callback(). | |
PStatCollector & | get_cull_region_pcollector () |
Returns a PStatCollector for timing the cull operation for just this DisplayRegion. | |
CullResult * | get_cull_result (Thread *current_thread) const |
Returns the CullResult value that was stored on this DisplayRegion, presumably by the last successful cull operation. | |
CullTraverser * | get_cull_traverser () |
Returns the CullTraverser that will be used to draw the contents of this DisplayRegion. | |
void | get_dimensions (float &l, float &r, float &b, float &t) const |
Retrieves the coordinates of the DisplayRegion's rectangle within its GraphicsOutput. | |
int | get_draw_buffer_type () const |
Returns the RenderBuffer into which the GSG should issue draw commands. | |
CallbackObject * | get_draw_callback () const |
Returns the CallbackObject set by set_draw_callback(). | |
PStatCollector & | get_draw_region_pcollector () |
Returns a PStatCollector for timing the draw operation for just this DisplayRegion. | |
bool | get_incomplete_render () const |
Returns the incomplete_render flag. | |
float | get_left () const |
Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput. | |
DisplayRegion * | get_left_eye () |
Returns a pointer to the left DisplayRegion managed by this stereo object. | |
int | get_lens_index () const |
Returns the specific lens of the associated Camera that will be used for rendering this scene. | |
GraphicsPipe * | get_pipe () const |
Returns the GraphicsPipe that this DisplayRegion is ultimately associated with, or NULL if no pipe is associated. | |
float | get_pixel_factor () const |
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(). | |
int | get_pixel_height () const |
Returns the height of the DisplayRegion in pixels. | |
int | get_pixel_width () const |
Returns the width of the DisplayRegion in pixels. | |
float | get_pixel_zoom () const |
Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not. | |
void | get_pixels (int &pl, int &pr, int &pb, int &pt) const |
Retrieves the coordinates of the DisplayRegion within its window, in pixels. | |
int | get_ref_count () const |
Returns the current reference count. | |
void | get_region_pixels (int &xo, int &yo, int &w, int &h) const |
Retrieves the coordinates of the DisplayRegion within its window, as the pixel location of its bottom-left corner, along with a pixel width and height. | |
void | get_region_pixels_i (int &xo, int &yo, int &w, int &h) const |
Similar to get_region_pixels(), but returns the upper left corner, and the pixel numbers are numbered from the top-left corner down, in the DirectX way of things. | |
float | get_right () const |
Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput. | |
DisplayRegion * | get_right_eye () |
Returns a pointer to the right DisplayRegion managed by this stereo object. | |
SceneSetup * | get_scene_setup (Thread *current_thread) const |
Returns the SceneSetup value that was stored on this DisplayRegion, presumably by the last successful cull operation. | |
bool | get_screenshot (PNMImage &image) |
Captures the most-recently rendered image from the framebuffer into the indicated PNMImage. | |
int | get_screenshot_buffer_type () const |
Returns the RenderBuffer that should be used for capturing screenshots from this particular DrawableRegion. | |
int | get_sort () const |
Returns the sort value associated with the DisplayRegion. | |
Lens::StereoChannel | get_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 | get_texture_reload_priority () const |
Returns the priority which is assigned to asynchronous texture reload requests. | |
float | get_top () const |
Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput. | |
virtual TypeHandle | get_type () const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
GraphicsOutput * | get_window () const |
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no window is associated. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
bool | is_active () const |
Returns the active flag associated with the DisplayRegion. | |
virtual bool | is_any_clear_active () const |
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. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
virtual bool | is_stereo () const |
Returns true if this is a StereoDisplayRegion, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *, void *) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new (size_t size, void *ptr) |
void * | operator new (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
bool | operator< (const DisplayRegion &other) const |
Returns true if this DisplayRegion should be sorted before the other one, false otherwise. | |
virtual void | output (ostream &out) const |
virtual | PT (PandaNode) make_cull_result_graph() |
void | ref () const |
Explicitly increments the reference count. | |
bool | save_screenshot (const Filename &filename, const string &image_comment="") |
Saves a screenshot of the region to the indicated filename. | |
Filename | save_screenshot_default (const string &prefix="screenshot") |
Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed. | |
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. | |
void | set_clear_color (const Colorf &color) |
Sets the clear color to the indicated value. | |
void | set_clear_color_active (bool clear_color_active) |
Toggles the flag that indicates whether the color buffer should be cleared every frame. | |
void | set_clear_depth (float depth) |
Sets the clear depth to the indicated value. | |
void | set_clear_depth_active (bool clear_depth_active) |
Toggles the flag that indicates whether the depth buffer should be cleared every frame. | |
void | set_clear_stencil (unsigned int stencil) |
Sets the clear stencil to the indicated value. | |
void | set_clear_stencil_active (bool clear_stencil_active) |
Toggles the flag that indicates whether the stencil buffer should be cleared every frame. | |
virtual void | set_clear_value (int n, const Colorf &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. | |
void | set_cull_callback (CallbackObject *object) |
Sets the CallbackObject that will be notified when the DisplayRegion is visited during the cull traversal. | |
void | set_cull_result (CullResult *cull_result, SceneSetup *scene_setup, Thread *current_thread) |
Stores the result of performing a cull operation on this DisplayRegion. | |
virtual void | set_cull_traverser (CullTraverser *trav) |
Sets the CullTraverser for both the left and right DisplayRegions. | |
virtual void | set_dimensions (float l, float r, float b, float t) |
Sets both the left and right DisplayRegions to the indicated dimensions. | |
void | set_draw_callback (CallbackObject *object) |
Sets the CallbackObject that will be notified when the contents of DisplayRegion is drawn during the draw traversal. | |
virtual void | set_incomplete_render (bool incomplete_render) |
Sets the incomplete_render flag on both the left and right DisplayRegions to the indicated value. | |
void | set_lens_index (int index) |
Sets the lens index, allows for multiple lenses to be attached to a camera. | |
virtual void | set_pixel_zoom (float 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_texture_reload_priority (int texture_reload_priority) |
Sets the texture_reload_priority on both the left and right DisplayRegions to the indicated value. | |
virtual bool | supports_pixel_zoom () const |
Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static int | get_renderbuffer_type (int plane) |
Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane. | |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
static Filename | make_screenshot_filename (const string &prefix="screenshot") |
Synthesizes a suitable default filename for passing to save_screenshot(). | |
Protected Member Functions | |
StereoDisplayRegion (GraphicsOutput *window, float l, float r, float b, float t, DisplayRegion *left, DisplayRegion *right) | |
bool | do_test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | do_test_ref_count_nonzero () const |
Returns true if the reference count is nonzero, false otherwise. | |
virtual void | pixel_factor_changed () |
Called internally when the pixel factor changes. | |
PT (CullTraverser) _trav | |
void | update_pixel_factor () |
Internal function to reset pixel_factor after it may have changed. | |
Protected Attributes | |
int | _draw_buffer_type |
bool | _incomplete_render |
int | _screenshot_buffer_type |
int | _texture_reload_priority |
GraphicsOutput * | _window |
Friends | |
class | DisplayRegionPipelineReader |
class | GraphicsOutput |
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.
TypedObject * TypedObject::as_typed_object | ( | ) | [inline, inherited] |
Returns the object, upcast (if necessary) to a TypedObject pointer.
Definition at line 99 of file typedObject.I.
const TypedObject * TypedObject::as_typed_object | ( | ) | const [inline, inherited] |
Returns the object, upcast (if necessary) to a TypedObject pointer.
Definition at line 110 of file typedObject.I.
void DisplayRegion::cleanup | ( | ) | [inherited] |
Cleans up some pointers associated with the DisplayRegion to help reduce the chance of memory leaks due to circular reference counts.
Definition at line 94 of file displayRegion.cxx.
References DisplayRegion::set_camera().
Referenced by GraphicsOutput::remove_all_display_regions().
void DisplayRegion::clear_cull_callback | ( | ) | [inline, inherited] |
Removes the callback set by an earlier call to set_cull_callback().
Definition at line 251 of file displayRegion.I.
References DisplayRegion::set_cull_callback().
void DisplayRegion::clear_draw_callback | ( | ) | [inline, inherited] |
Removes the callback set by an earlier call to set_draw_callback().
Definition at line 313 of file displayRegion.I.
References DisplayRegion::set_draw_callback().
void DisplayRegion::compute_pixels | ( | ) | [inherited] |
Computes the pixel locations of the DisplayRegion within its window.
The DisplayRegion will request the size from the window.
Definition at line 583 of file displayRegion.cxx.
References Thread::get_current_pipeline_stage(), GraphicsOutput::get_fb_x_size(), and GraphicsOutput::get_fb_y_size().
void DisplayRegion::compute_pixels | ( | int | x_size, |
int | y_size | ||
) | [inherited] |
Computes the pixel locations of the DisplayRegion within its window, given the size of the window in pixels.
Definition at line 624 of file displayRegion.cxx.
References Thread::get_current_pipeline_stage().
void DisplayRegion::compute_pixels_all_stages | ( | ) | [inherited] |
Computes the pixel locations of the DisplayRegion within its window.
The DisplayRegion will request the size from the window.
Definition at line 602 of file displayRegion.cxx.
References Thread::get_current_pipeline_stage(), GraphicsOutput::get_fb_x_size(), and GraphicsOutput::get_fb_y_size().
void DisplayRegion::compute_pixels_all_stages | ( | int | x_size, |
int | y_size | ||
) | [inherited] |
Performs a compute_pixels() operation for all stages of the pipeline.
This is appropriate, for instance, when a window changes sizes, since this is a global operation; and you want the new window size to be immediately available even to the downstream stages.
Definition at line 641 of file displayRegion.cxx.
void DrawableRegion::copy_clear_settings | ( | const DrawableRegion & | copy | ) | [inline, inherited] |
Copies only the clear settings from the other drawable region.
Definition at line 77 of file drawableRegion.I.
References DrawableRegion::update_pixel_factor().
Referenced by GraphicsOutput::make_cube_map().
void StereoDisplayRegion::disable_clears | ( | ) | [virtual] |
Disables both the color and depth clear.
See set_clear_color_active and set_clear_depth_active.
Reimplemented from DrawableRegion.
Definition at line 93 of file stereoDisplayRegion.cxx.
bool ReferenceCount::do_test_ref_count_integrity | ( | ) | const [protected, inherited] |
Does some easy checks to make sure that the reference count isn't completely bogus.
Returns true if ok, false otherwise.
Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.
Definition at line 29 of file referenceCount.cxx.
Referenced by ReferenceCount::do_test_ref_count_nonzero(), and ReferenceCount::test_ref_count_integrity().
bool ReferenceCount::do_test_ref_count_nonzero | ( | ) | const [protected, inherited] |
Returns true if the reference count is nonzero, false otherwise.
Definition at line 56 of file referenceCount.cxx.
References ReferenceCount::do_test_ref_count_integrity().
Referenced by ReferenceCount::test_ref_count_nonzero().
float DisplayRegion::get_bottom | ( | ) | const [inline, inherited] |
Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput.
This number will be in the range [0..1].
Definition at line 91 of file displayRegion.I.
NodePath DisplayRegion::get_camera | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated.
Definition at line 129 of file displayRegion.I.
Referenced by NonlinearImager::add_viewer(), and GraphicsEngine::render_frame().
bool DrawableRegion::get_clear_active | ( | int | n | ) | const [virtual, inherited] |
Gets the clear-active flag for any bitplane.
Definition at line 45 of file drawableRegion.cxx.
Referenced by DrawableRegion::get_clear_color_active(), DrawableRegion::get_clear_depth_active(), DrawableRegion::get_clear_stencil_active(), and DrawableRegion::is_any_clear_active().
const Colorf & DrawableRegion::get_clear_color | ( | ) | const [inline, inherited] |
Returns the current clear color value.
This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.
Definition at line 187 of file drawableRegion.I.
References DrawableRegion::get_clear_value().
bool DrawableRegion::get_clear_color_active | ( | ) | const [inline, inherited] |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.
Definition at line 107 of file drawableRegion.I.
References DrawableRegion::get_clear_active().
Referenced by DisplayRegion::supports_pixel_zoom().
float DrawableRegion::get_clear_depth | ( | ) | const [inline, inherited] |
Returns the current clear depth value.
This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.
Definition at line 215 of file drawableRegion.I.
References DrawableRegion::get_clear_value().
bool DrawableRegion::get_clear_depth_active | ( | ) | const [inline, inherited] |
Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame.
Definition at line 133 of file drawableRegion.I.
References DrawableRegion::get_clear_active().
Referenced by DisplayRegion::supports_pixel_zoom().
unsigned int DrawableRegion::get_clear_stencil | ( | ) | const [inline, inherited] |
Returns the current clear stencil value.
This is the value that will be used to clear the stencil buffer every frame, but only if get_clear_stencil_active() returns true. If get_clear_stencil_active() returns false, this is meaningless.
Definition at line 242 of file drawableRegion.I.
References DrawableRegion::get_clear_value().
bool DrawableRegion::get_clear_stencil_active | ( | ) | const [inline, inherited] |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.
See set_clear_stencil_active().
Definition at line 159 of file drawableRegion.I.
References DrawableRegion::get_clear_active().
const Colorf & DrawableRegion::get_clear_value | ( | int | n | ) | const [virtual, inherited] |
Returns the clear value for any bitplane.
Definition at line 67 of file drawableRegion.cxx.
Referenced by DrawableRegion::get_clear_color(), DrawableRegion::get_clear_depth(), and DrawableRegion::get_clear_stencil().
int DisplayRegion::get_cube_map_index | ( | ) | const [inline, inherited] |
Returns the cube map face index associated with this particular DisplayRegion, or -1 if it is not associated with a cube map.
See set_cube_map_index().
Definition at line 204 of file displayRegion.I.
CallbackObject * DisplayRegion::get_cull_callback | ( | ) | const [inline, inherited] |
Returns the CallbackObject set by set_cull_callback().
Definition at line 261 of file displayRegion.I.
PStatCollector & DisplayRegion::get_cull_region_pcollector | ( | ) | [inline, inherited] |
Returns a PStatCollector for timing the cull operation for just this DisplayRegion.
Definition at line 454 of file displayRegion.I.
Referenced by GraphicsEngine::do_cull().
CullResult * DisplayRegion::get_cull_result | ( | Thread * | current_thread | ) | const [inline, inherited] |
Returns the CullResult value that was stored on this DisplayRegion, presumably by the last successful cull operation.
This method is for the benefit of the GraphicsEngine; normally you shouldn't call this directly.
Definition at line 427 of file displayRegion.I.
CullTraverser * DisplayRegion::get_cull_traverser | ( | ) | [inherited] |
Returns the CullTraverser that will be used to draw the contents of this DisplayRegion.
Definition at line 351 of file displayRegion.cxx.
Referenced by GraphicsEngine::do_cull().
void DisplayRegion::get_dimensions | ( | float & | l, |
float & | r, | ||
float & | b, | ||
float & | t | ||
) | const [inline, inherited] |
Retrieves the coordinates of the DisplayRegion's rectangle within its GraphicsOutput.
These numbers will be in the range [0..1].
Definition at line 49 of file displayRegion.I.
int DrawableRegion::get_draw_buffer_type | ( | ) | const [inline, inherited] |
Returns the RenderBuffer into which the GSG should issue draw commands.
Normally, this is the back buffer for double-buffered windows, and the front buffer for single-buffered windows.
Definition at line 295 of file drawableRegion.I.
Referenced by GraphicsOutput::change_scenes(), and GraphicsOutput::copy_to_textures().
CallbackObject * DisplayRegion::get_draw_callback | ( | ) | const [inline, inherited] |
Returns the CallbackObject set by set_draw_callback().
Definition at line 323 of file displayRegion.I.
PStatCollector & DisplayRegion::get_draw_region_pcollector | ( | ) | [inline, inherited] |
Returns a PStatCollector for timing the draw operation for just this DisplayRegion.
Definition at line 465 of file displayRegion.I.
bool DisplayRegion::get_incomplete_render | ( | ) | const [inline, inherited] |
Returns the incomplete_render flag.
Definition at line 179 of file displayRegion.I.
Referenced by GraphicsEngine::do_cull().
float DisplayRegion::get_left | ( | ) | const [inline, inherited] |
Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput.
This number will be in the range [0..1].
Definition at line 65 of file displayRegion.I.
DisplayRegion * StereoDisplayRegion::get_left_eye | ( | ) | [inline] |
Returns a pointer to the left DisplayRegion managed by this stereo object.
Definition at line 23 of file stereoDisplayRegion.I.
Referenced by GraphicsOutput::remove_display_region().
int DisplayRegion::get_lens_index | ( | ) | const [inline, inherited] |
Returns the specific lens of the associated Camera that will be used for rendering this scene.
Most Cameras hold only one lens, but for multiple lenses this method may be used to selected between them.
Definition at line 36 of file displayRegion.I.
GraphicsPipe * DisplayRegion::get_pipe | ( | ) | const [inherited] |
Returns the GraphicsPipe that this DisplayRegion is ultimately associated with, or NULL if no pipe is associated.
Definition at line 150 of file displayRegion.cxx.
References GraphicsOutput::get_pipe().
float DrawableRegion::get_pixel_factor | ( | ) | const [inline, inherited] |
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().
This will return 1.0 if the pixel_zoom was not set or if it is not being respected (for instance, because the underlying renderer doesn't support it--see supports_pixel_zoom).
Definition at line 270 of file drawableRegion.I.
Referenced by GraphicsOutput::get_fb_x_size(), and GraphicsOutput::get_fb_y_size().
int DisplayRegion::get_pixel_height | ( | ) | const [inline, inherited] |
Returns the height of the DisplayRegion in pixels.
Definition at line 345 of file displayRegion.I.
int DisplayRegion::get_pixel_width | ( | ) | const [inline, inherited] |
Returns the width of the DisplayRegion in pixels.
Definition at line 334 of file displayRegion.I.
float DrawableRegion::get_pixel_zoom | ( | ) | const [inline, inherited] |
Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not.
Also see get_pixel_factor().
Definition at line 254 of file drawableRegion.I.
void DisplayRegion::get_pixels | ( | int & | pl, |
int & | pr, | ||
int & | pb, | ||
int & | pt | ||
) | const [inline, inherited] |
Retrieves the coordinates of the DisplayRegion within its window, in pixels.
Definition at line 357 of file displayRegion.I.
int ReferenceCount::get_ref_count | ( | ) | const [inline, inherited] |
Returns the current reference count.
Definition at line 155 of file referenceCount.I.
References ReferenceCount::test_ref_count_integrity().
Referenced by TransformState::clear_cache(), RenderState::clear_cache(), RenderState::finalize(), RenderEffects::finalize(), RenderEffect::finalize(), RenderAttrib::finalize(), InternalName::finalize(), TransformState::get_num_unused_states(), RenderState::get_num_unused_states(), TransformState::list_cycles(), RenderState::list_cycles(), GeomVertexFormat::remove_column(), TransformState::unref(), RenderState::unref(), RenderState::~RenderState(), and TransformState::~TransformState().
void DisplayRegion::get_region_pixels | ( | int & | xo, |
int & | yo, | ||
int & | w, | ||
int & | h | ||
) | const [inline, inherited] |
Retrieves the coordinates of the DisplayRegion within its window, as the pixel location of its bottom-left corner, along with a pixel width and height.
Definition at line 373 of file displayRegion.I.
void DisplayRegion::get_region_pixels_i | ( | int & | xo, |
int & | yo, | ||
int & | w, | ||
int & | h | ||
) | const [inline, inherited] |
Similar to get_region_pixels(), but returns the upper left corner, and the pixel numbers are numbered from the top-left corner down, in the DirectX way of things.
Definition at line 390 of file displayRegion.I.
Referenced by DXGraphicsStateGuardian8::do_framebuffer_copy_to_ram(), DXGraphicsStateGuardian9::do_framebuffer_copy_to_ram(), TinyGraphicsStateGuardian::framebuffer_copy_to_ram(), TinyGraphicsStateGuardian::framebuffer_copy_to_texture(), DXGraphicsStateGuardian9::framebuffer_copy_to_texture(), and DXGraphicsStateGuardian8::framebuffer_copy_to_texture().
int DrawableRegion::get_renderbuffer_type | ( | int | plane | ) | [static, inherited] |
Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane.
Definition at line 163 of file drawableRegion.cxx.
Referenced by GraphicsOutput::copy_to_textures().
float DisplayRegion::get_right | ( | ) | const [inline, inherited] |
Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput.
This number will be in the range [0..1].
Definition at line 78 of file displayRegion.I.
DisplayRegion * StereoDisplayRegion::get_right_eye | ( | ) | [inline] |
Returns a pointer to the right DisplayRegion managed by this stereo object.
Definition at line 34 of file stereoDisplayRegion.I.
Referenced by GraphicsOutput::remove_display_region().
SceneSetup * DisplayRegion::get_scene_setup | ( | Thread * | current_thread | ) | const [inline, inherited] |
Returns the SceneSetup value that was stored on this DisplayRegion, presumably by the last successful cull operation.
This method is for the benefit of the GraphicsEngine; normally you shouldn't call this directly.
Definition at line 442 of file displayRegion.I.
bool DisplayRegion::get_screenshot | ( | PNMImage & | image | ) | [inherited] |
Captures the most-recently rendered image from the framebuffer into the indicated PNMImage.
Returns true on success, false on failure.
Definition at line 514 of file displayRegion.cxx.
References GraphicsOutput::begin_frame(), GraphicsOutput::end_frame(), GraphicsStateGuardian::framebuffer_copy_to_ram(), Thread::get_current_thread(), GraphicsOutput::get_fb_properties(), GraphicsOutput::get_gsg(), GraphicsStateGuardian::get_render_buffer(), DrawableRegion::get_screenshot_buffer_type(), and DisplayRegion::get_window().
Referenced by DisplayRegion::save_screenshot().
int DrawableRegion::get_screenshot_buffer_type | ( | ) | const [inline, inherited] |
Returns the RenderBuffer that should be used for capturing screenshots from this particular DrawableRegion.
Definition at line 282 of file drawableRegion.I.
Referenced by DisplayRegion::get_screenshot().
int DisplayRegion::get_sort | ( | ) | const [inline, inherited] |
Returns the sort value associated with the DisplayRegion.
Definition at line 153 of file displayRegion.I.
Referenced by DisplayRegion::operator<().
Lens::StereoChannel DisplayRegion::get_stereo_channel | ( | ) | [inline, inherited] |
Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair, or whether it is a normal, monocular image.
See set_stereo_channel().
Definition at line 167 of file displayRegion.I.
Referenced by set_active().
int DisplayRegion::get_texture_reload_priority | ( | ) | const [inline, inherited] |
Returns the priority which is assigned to asynchronous texture reload requests.
See set_texture_reload_priority().
Definition at line 191 of file displayRegion.I.
float DisplayRegion::get_top | ( | ) | const [inline, inherited] |
Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput.
This number will be in the range [0..1].
Definition at line 104 of file displayRegion.I.
int TypedObject::get_type_index | ( | ) | const [inline, inherited] |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
This is equivalent to get_type().get_index().
Definition at line 52 of file typedObject.I.
References TypeHandle::get_index().
WeakReferenceList * ReferenceCount::get_weak_list | ( | ) | const [inline, inherited] |
Returns the WeakReferenceList associated with this ReferenceCount object.
If there has never been a WeakReferenceList associated with this object, creates one now.
Definition at line 307 of file referenceCount.I.
Referenced by ReferenceCount::weak_ref().
GraphicsOutput * DisplayRegion::get_window | ( | ) | const [inline, inherited] |
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no window is associated.
Definition at line 117 of file displayRegion.I.
Referenced by NonlinearImager::add_viewer(), DisplayRegion::get_screenshot(), WindowFramework::split_window(), DisplayRegionDrawCallbackData::upcall(), and DisplayRegionCullCallbackData::upcall().
bool ReferenceCount::has_weak_list | ( | ) | const [inline, inherited] |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
In general, this will be true if there was ever a WeakPointerTo created for this object (even if there is not any for it now).
Definition at line 294 of file referenceCount.I.
Referenced by ReferenceCount::weak_unref().
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 79 of file stereoDisplayRegion.h.
References DisplayRegion::init_type().
bool DisplayRegion::is_active | ( | ) | const [inline, inherited] |
Returns the active flag associated with the DisplayRegion.
Definition at line 141 of file displayRegion.I.
Referenced by set_stereo_channel().
bool DrawableRegion::is_any_clear_active | ( | ) | const [virtual, inherited] |
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.
Definition at line 96 of file drawableRegion.cxx.
References DrawableRegion::get_clear_active().
Referenced by GraphicsOutput::clear().
bool TypedObject::is_exact_type | ( | TypeHandle | handle | ) | const [inline, inherited] |
Returns true if the current object is the indicated type exactly.
Definition at line 74 of file typedObject.I.
References TypeHandle::get_name().
Referenced by GraphicsStateGuardian::async_reload_texture(), PortalNode::combine_with(), PandaNode::combine_with(), GeomNode::combine_with(), CollisionNode::combine_with(), Character::combine_with(), PGItem::cull_callback(), FactoryParams::get_param_of_type(), CollisionHandlerPusher::handle_entries(), SceneGraphReducer::r_flatten(), ConnectionWriter::send(), FltToEggLevelState::set_transform(), and VirtualFileSystem::unmount().
bool TypedObject::is_of_type | ( | TypeHandle | handle | ) | const [inline, inherited] |
Returns true if the current object is or derives from the indicated type.
Definition at line 63 of file typedObject.I.
References TypeHandle::is_derived_from().
Referenced by EggSliderData::add_back_pointer(), EggJointData::add_back_pointer(), CIntervalManager::add_c_interval(), XFileNode::add_child(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), EggXfmSAnim::add_data(), CharacterJointBundle::add_node(), NonlinearImager::add_screen(), EggGroupNode::apply_first_attribute(), EggGroupNode::apply_last_attribute(), DeferredNodeProperty::apply_to_node(), RecorderController::begin_playback(), NodePath::clear_clip_plane(), EggGroupNode::clear_connected_shading(), NodePath::clear_light(), EggBase::convert_paths(), NodePath::decode_from_bam_stream(), VrpnClient::disconnect_device(), PhysicsManager::do_physics(), GraphicsStateGuardian::fetch_specified_part(), EggRenderState::fill_state(), AnimBundleNode::find_anim_bundle(), EggGroupNode::find_coordsys_entry(), XFile::find_data_object(), Character::find_joint(), EggGroupNode::find_materials(), Character::find_slider(), XFile::find_template(), EggGroupNode::find_textures(), EggMaterialCollection::find_used_materials(), EggTextureCollection::find_used_textures(), EggGroupNode::force_filenames(), EggJointData::force_initial_rest_frame(), WindowFramework::get_aspect_2d(), EggPoolUniquifier::get_category(), EggGroupUniquifier::get_category(), EggGroupNode::get_connected_shading(), PandaFramework::get_mouse(), FactoryParams::get_param_of_type(), EggGroupNode::has_absolute_pathnames(), NodePath::has_clip_plane(), NodePath::has_clip_plane_off(), NodePath::has_light(), PandaFramework::hide_collision_solids(), x11GraphicsWindow::open_window(), eglGraphicsWindow::open_window(), EggNode::parse_egg(), CharacterMaker::part_to_node(), EggGroupNode::post_apply_flat_attribute(), EggBinner::prepare_node(), PortalClipper::prepare_portal(), NodePath::project_texture(), EggMatrixTablePointer::quantize_channels(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_collect_vertex_data(), EggGroupNode::r_load_externals(), EggGroupNode::rebuild_vertex_pools(), EggGroupNode::recompute_polygon_normals(), EggGroupNode::remove_invalid_primitives(), EggGroupNode::remove_unused_vertices(), EggLoader::reparent_decals(), EggMaterialCollection::replace_materials(), EggTextureCollection::replace_textures(), EggGroupNode::resolve_filenames(), EggGroupNode::reverse_vertex_ordering(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_light(), ProjectionScreen::set_projector(), NonlinearImager::set_source_camera(), EggXfmSAnim::set_value(), NonlinearImager::set_viewer_camera(), PandaFramework::show_collision_solids(), BamCache::store(), XFileToEggConverter::strip_nodes(), EggGroupNode::strip_normals(), DataGraphTraverser::traverse(), DataGraphTraverser::traverse_below(), EggGroupNode::triangulate_polygons(), EggGroupNode::unify_attributes(), EggNameUniquifier::uniquify(), NodeCullCallbackData::upcall(), PhysicsCollisionHandler::validate_target(), EggXfmSAnim::write(), EggGroup::write(), EggToDXFLayer::write_3d_face(), and EggToDXFLayer::write_entities().
bool StereoDisplayRegion::is_stereo | ( | ) | const [virtual] |
Returns true if this is a StereoDisplayRegion, false otherwise.
Reimplemented from DisplayRegion.
Definition at line 131 of file stereoDisplayRegion.cxx.
void ReferenceCount::local_object | ( | ) | [inline, inherited] |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
This allows the object to be passed to functions that will increment and decrement the object's reference count temporarily, and it will prevent the object from being deleted (inappropriately), when the reference count returns to zero. It actually achieves this by setting a large positive value in the reference count field.
Definition at line 276 of file referenceCount.I.
Referenced by PGTop::cull_callback(), BoundingSphere::extend_by_hexahedron(), AsyncTaskManager::find_task(), AsyncTaskManager::find_tasks(), and AsyncTaskManager::find_tasks_matching().
Filename DisplayRegion::make_screenshot_filename | ( | const string & | prefix = "screenshot" | ) | [static, inherited] |
Synthesizes a suitable default filename for passing to save_screenshot().
The default filename is generated from the supplied prefix and from the Config variable screenshot-filename, which contains the following strings:
~p - the supplied prefix ~f - the frame count ~e - the value of screenshot-extension All other % strings in strftime().
Definition at line 408 of file displayRegion.cxx.
References ClockObject::get_frame_count(), and ClockObject::get_global_clock().
Referenced by DisplayRegion::save_screenshot_default().
bool DisplayRegion::operator< | ( | const DisplayRegion & | other | ) | const [inline, inherited] |
Returns true if this DisplayRegion should be sorted before the other one, false otherwise.
Definition at line 23 of file displayRegion.I.
References DisplayRegion::get_sort().
void DrawableRegion::pixel_factor_changed | ( | ) | [protected, virtual, inherited] |
Called internally when the pixel factor changes.
Reimplemented in GraphicsOutput.
Definition at line 193 of file drawableRegion.cxx.
Referenced by DrawableRegion::update_pixel_factor().
void ReferenceCount::ref | ( | ) | const [inline, inherited] |
Explicitly increments the reference count.
User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.
This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.
Definition at line 179 of file referenceCount.I.
References ReferenceCount::test_ref_count_integrity().
Referenced by CachedTypedWritableReferenceCount::cache_ref(), TypedWritable::decode_raw_from_bam_stream(), NodeCachedReferenceCount::node_ref(), NodeReferenceCount::node_ref(), BamCacheRecord::set_data(), CullableObject::set_draw_callback(), and ModelRoot::set_reference().
bool DisplayRegion::save_screenshot | ( | const Filename & | filename, |
const string & | image_comment = "" |
||
) | [inherited] |
Saves a screenshot of the region to the indicated filename.
Returns true on success, false on failure.
Definition at line 493 of file displayRegion.cxx.
References DisplayRegion::get_screenshot(), PNMImageHeader::set_comment(), and PNMImage::write().
Referenced by DisplayRegion::save_screenshot_default().
Filename DisplayRegion::save_screenshot_default | ( | const string & | prefix = "screenshot" | ) | [inherited] |
Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.
The filename is generated by make_screenshot_filename().
Definition at line 478 of file displayRegion.cxx.
References DisplayRegion::make_screenshot_filename(), and DisplayRegion::save_screenshot().
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 155 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 142 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 53 of file stereoDisplayRegion.cxx.
void DrawableRegion::set_clear_color | ( | const Colorf & | color | ) | [inline, inherited] |
Sets the clear color to the indicated value.
This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.
Definition at line 173 of file drawableRegion.I.
References DrawableRegion::set_clear_value().
Referenced by GraphicsOutput::GraphicsOutput().
void DrawableRegion::set_clear_color_active | ( | bool | clear_color_active | ) | [inline, inherited] |
Toggles the flag that indicates whether the color buffer should be cleared every frame.
If this is true, the color buffer will be cleared to the color indicated by set_clear_color(); otherwise, it will be left alone.
Definition at line 95 of file drawableRegion.I.
References DrawableRegion::set_clear_active().
Referenced by GraphicsOutput::GraphicsOutput(), GraphicsOutput::make_cube_map(), and WindowFramework::open_window().
void DrawableRegion::set_clear_depth | ( | float | depth | ) | [inline, inherited] |
Sets the clear depth to the indicated value.
This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.
Definition at line 201 of file drawableRegion.I.
References DrawableRegion::set_clear_value().
void DrawableRegion::set_clear_depth_active | ( | bool | clear_depth_active | ) | [inline, inherited] |
Toggles the flag that indicates whether the depth buffer should be cleared every frame.
If this is true, the depth buffer will be cleared to the depth value indicated by set_clear_depth(); otherwise, it will be left alone.
Definition at line 121 of file drawableRegion.I.
References DrawableRegion::set_clear_active().
Referenced by GraphicsOutput::GraphicsOutput(), and GraphicsOutput::make_cube_map().
void DrawableRegion::set_clear_stencil | ( | unsigned int | stencil | ) | [inline, inherited] |
Sets the clear stencil to the indicated value.
This is the value that will be used to clear the stencil buffer every frame, but only if get_clear_color_active() returns true. If get_clear_stencil_active() returns false, this is meaningless.
Definition at line 228 of file drawableRegion.I.
References DrawableRegion::set_clear_value().
void DrawableRegion::set_clear_stencil_active | ( | bool | clear_stencil_active | ) | [inline, inherited] |
Toggles the flag that indicates whether the stencil buffer should be cleared every frame.
If this is true, the stencil buffer will be cleared to the value indicated by set_clear_stencil(); otherwise, it will be left alone.
Definition at line 147 of file drawableRegion.I.
References DrawableRegion::set_clear_active().
Referenced by GraphicsOutput::GraphicsOutput(), and GraphicsOutput::make_cube_map().
void StereoDisplayRegion::set_clear_value | ( | int | n, |
const Colorf & | clear_value | ||
) | [virtual] |
Sets the clear value for any bitplane.
Reimplemented from DrawableRegion.
Definition at line 80 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 282 of file stereoDisplayRegion.cxx.
void DisplayRegion::set_cull_callback | ( | CallbackObject * | object | ) | [inline, inherited] |
Sets the CallbackObject that will be notified when the DisplayRegion is visited during the cull traversal.
This callback will be made during the cull thread.
The cull traversal is responsible for determining which nodes are visible and within the view frustum, and for accumulating state and transform, and generally building up the list of CullableObjects that are to be eventually passed to the draw traversal for rendering.
At the time the cull traversal callback is made, the traversal for this DisplayRegion has not yet started.
The callback is passed an instance of a DisplayRegionCullCallbackData, which contains pointers to the current scene information, as well as the current DisplayRegion and GSG. The callback replaces* the normal cull behavior, so if your callback does nothing, the scene graph will not be traversed and therefore nothing will be drawn. If you wish the normal cull traversal to be performed for this DisplayRegion, you must call cbdata->upcall() from your callback.
Definition at line 239 of file displayRegion.I.
Referenced by DisplayRegion::clear_cull_callback().
void DisplayRegion::set_cull_result | ( | CullResult * | cull_result, |
SceneSetup * | scene_setup, | ||
Thread * | current_thread | ||
) | [inline, inherited] |
Stores the result of performing a cull operation on this DisplayRegion.
Normally, this will only be called by the GraphicsEngine; you should not call this directly.
The stored result will automatically be applied back to all upstream pipeline stages.
Definition at line 410 of file displayRegion.I.
void StereoDisplayRegion::set_cull_traverser | ( | CullTraverser * | trav | ) | [virtual] |
Sets the CullTraverser for both the left and right DisplayRegions.
Reimplemented from DisplayRegion.
Definition at line 269 of file stereoDisplayRegion.cxx.
void StereoDisplayRegion::set_dimensions | ( | float | l, |
float | r, | ||
float | b, | ||
float | t | ||
) | [virtual] |
Sets both the left and right DisplayRegions to the indicated dimensions.
Reimplemented from DisplayRegion.
Definition at line 118 of file stereoDisplayRegion.cxx.
void DisplayRegion::set_draw_callback | ( | CallbackObject * | object | ) | [inline, inherited] |
Sets the CallbackObject that will be notified when the contents of DisplayRegion is drawn during the draw traversal.
This callback will be made during the draw thread.
The draw traversal is responsible for actually issuing the commands to the graphics engine to draw primitives. Its job is to walk through the list of CullableObjects build up by the cull traversal, as quickly as possible, issuing the appropriate commands to draw each one.
At the time the draw traversal callback is made, the graphics state is in the initial state, and no projection matrix or modelview matrix is in effect. begin_scene() has not yet been called, and no objects have yet been drawn. However, the viewport has already been set to the appropriate part of the window, and the clear commands for this DisplayRegion (if any) have been issued.
The callback is passed an instance of a DisplayRegionDrawCallbackData, which contains pointers to the current scene information, as well as the current DisplayRegion and GSG. The callback replaces* the normal draw behavior, so if your callback does nothing, nothing in the DisplayRegion will be drawn. If you wish the draw traversal to continue to draw the contents of this DisplayRegion, you must call cbdata->upcall() from your callback.
Definition at line 301 of file displayRegion.I.
Referenced by DisplayRegion::clear_draw_callback().
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 243 of file stereoDisplayRegion.cxx.
void DisplayRegion::set_lens_index | ( | int | index | ) | [inherited] |
Sets the lens index, allows for multiple lenses to be attached to a camera.
This is useful for a variety of setups, such as fish eye rendering. The default is 0.
Definition at line 110 of file displayRegion.cxx.
References Thread::get_current_pipeline_stage().
void StereoDisplayRegion::set_pixel_zoom | ( | float | pixel_zoom | ) | [virtual] |
Sets the pixel_zoom for left and right eyes.
Reimplemented from DrawableRegion.
Definition at line 105 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 175 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.
Reimplemented from DisplayRegion.
Definition at line 202 of file stereoDisplayRegion.cxx.
References DisplayRegion::is_active().
Referenced by set_active().
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 256 of file stereoDisplayRegion.cxx.
bool DisplayRegion::supports_pixel_zoom | ( | ) | const [virtual, inherited] |
Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored.
If this returns false, then get_pixel_factor() will always return 1.0, regardless of what value you specify for set_pixel_zoom().
This may return false if the underlying renderer doesn't support pixel zooming, or if you have called this on a DisplayRegion that doesn't have both set_clear_color() and set_clear_depth() enabled.
Reimplemented from DrawableRegion.
Definition at line 664 of file displayRegion.cxx.
References DrawableRegion::get_clear_color_active(), DrawableRegion::get_clear_depth_active(), and DrawableRegion::supports_pixel_zoom().
bool ReferenceCount::test_ref_count_integrity | ( | ) | const [inline, inherited] |
Does some easy checks to make sure that the reference count isn't completely bogus.
Returns true if ok, false otherwise.
Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.
Definition at line 236 of file referenceCount.I.
References ReferenceCount::do_test_ref_count_integrity().
Referenced by EggGroupNode::add_child(), InternalName::find_ancestor(), InternalName::get_ancestor(), ReferenceCount::get_ref_count(), InternalName::get_top(), ReferenceCount::ref(), EggVertex::test_gref_integrity(), EggVertex::test_pref_integrity(), EggNode::test_under_integrity(), EggPrimitive::test_vref_integrity(), EggGroup::test_vref_integrity(), MouseWatcher::throw_event_pattern(), ReferenceCount::unref(), and EggNode::update_under().
bool ReferenceCount::test_ref_count_nonzero | ( | ) | const [inline, inherited] |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
Returns true if ok, false otherwise.
Definition at line 252 of file referenceCount.I.
References ReferenceCount::do_test_ref_count_nonzero().
Referenced by CopyOnWritePointer::test_ref_count_nonzero().
bool ReferenceCount::unref | ( | ) | const [inline, virtual, inherited] |
Explicitly decrements the reference count.
Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete().
User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.
This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.
The return value is true if the new reference count is nonzero, false if it is zero.
Reimplemented in GeomVertexArrayFormat, GeomVertexFormat, InternalName, RenderAttrib, RenderEffects, RenderState, and TransformState.
Definition at line 214 of file referenceCount.I.
References ReferenceCount::test_ref_count_integrity().
Referenced by CachedTypedWritableReferenceCount::cache_unref(), TypedWritable::decode_raw_from_bam_stream(), RenderEffect::finalize(), NodeCachedReferenceCount::node_unref(), NodeReferenceCount::node_unref(), TransformState::unref(), RenderState::unref(), RenderEffects::unref(), RenderAttrib::unref(), InternalName::unref(), GeomVertexFormat::unref(), and GeomVertexArrayFormat::unref().
void DrawableRegion::update_pixel_factor | ( | ) | [inline, protected, inherited] |
Internal function to reset pixel_factor after it may have changed.
Definition at line 306 of file drawableRegion.I.
References DrawableRegion::pixel_factor_changed(), and DrawableRegion::supports_pixel_zoom().
Referenced by DrawableRegion::copy_clear_settings(), DrawableRegion::disable_clears(), DrawableRegion::set_clear_active(), and DrawableRegion::set_pixel_zoom().
void ReferenceCount::weak_ref | ( | WeakPointerToVoid * | ptv | ) | [inline, inherited] |
Adds the indicated PointerToVoid as a weak reference to this object.
Definition at line 321 of file referenceCount.I.
References WeakReferenceList::add_reference(), and ReferenceCount::get_weak_list().
void ReferenceCount::weak_unref | ( | WeakPointerToVoid * | ptv | ) | [inline, inherited] |
Removes the indicated PointerToVoid as a weak reference to this object.
It must have previously been added via a call to weak_ref().
Definition at line 334 of file referenceCount.I.
References WeakReferenceList::clear_reference(), and ReferenceCount::has_weak_list().