Panda3D
displayRegion.I
1 // Filename: displayRegion.I
2 // Created by: frang (07Mar99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: DisplayRegion::operator <
18 // Access: Public
19 // Description: Returns true if this DisplayRegion should be sorted
20 // before the other one, false otherwise.
21 ////////////////////////////////////////////////////////////////////
22 INLINE bool DisplayRegion::
23 operator < (const DisplayRegion &other) const {
24  return get_sort() < other.get_sort();
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: DisplayRegion::get_lens_index
29 // Access: Public
30 // Description: Returns the specific lens of the associated Camera
31 // that will be used for rendering this scene. Most
32 // Cameras hold only one lens, but for multiple lenses
33 // this method may be used to selected between them.
34 ////////////////////////////////////////////////////////////////////
35 INLINE int DisplayRegion::
36 get_lens_index() const {
37  CDReader cdata(_cycler);
38  return cdata->_lens_index;
39 }
40 
41 ///////////////////////////////////////////////////////////////////
42 // Function: DisplayRegion::get_num_regions
43 // Access: Published
44 // Description: Returns the number of regions, see set_num_regions.
45 ////////////////////////////////////////////////////////////////////
46 INLINE int DisplayRegion::
47 get_num_regions() const {
48  CDReader cdata(_cycler);
49  return cdata->_regions.size();
50 }
51 
52 ///////////////////////////////////////////////////////////////////
53 // Function: DisplayRegion::set_num_regions
54 // Access: Published
55 // Description: Sets the number of regions that this DisplayRegion
56 // indicates. Usually, this number is 1 (and it is
57 // always at least 1), and only the first is used for
58 // rendering. However, if more than one is provided,
59 // you may select which one to render into using a
60 // geometry shader (gl_ViewportIndex in GLSL).
61 ////////////////////////////////////////////////////////////////////
62 INLINE void DisplayRegion::
64  nassertv(i >= 1);
65  CDWriter cdata(_cycler);
66  cdata->_regions.resize(i);
67 }
68 
69 ///////////////////////////////////////////////////////////////////
70 // Function: DisplayRegion::get_dimensions
71 // Access: Published
72 // Description: Retrieves the coordinates of the DisplayRegion's
73 // rectangle within its GraphicsOutput. These numbers
74 // will be in the range [0..1].
75 ////////////////////////////////////////////////////////////////////
76 INLINE void DisplayRegion::
77 get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t) const {
78  get_dimensions(0, l, r, b, t);
79 }
80 
81 ///////////////////////////////////////////////////////////////////
82 // Function: DisplayRegion::get_dimensions
83 // Access: Published
84 // Description: Retrieves the coordinates of the DisplayRegion's
85 // rectangle within its GraphicsOutput. These numbers
86 // will be in the range [0..1].
87 ////////////////////////////////////////////////////////////////////
88 INLINE void DisplayRegion::
89 get_dimensions(int i, PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t) const {
90  CDReader cdata(_cycler);
91  const Region &region = cdata->_regions[i];
92  l = region._dimensions[0];
93  r = region._dimensions[1];
94  b = region._dimensions[2];
95  t = region._dimensions[3];
96 }
97 
98 ///////////////////////////////////////////////////////////////////
99 // Function: DisplayRegion::get_dimensions
100 // Access: Published
101 // Description: Retrieves the coordinates of the DisplayRegion's
102 // rectangle within its GraphicsOutput. These numbers
103 // will be in the range [0..1].
104 ////////////////////////////////////////////////////////////////////
106 get_dimensions(int i) const {
107  CDReader cdata(_cycler);
108  return cdata->_regions[i]._dimensions;
109 }
110 
111 ////////////////////////////////////////////////////////////////////
112 // Function: DisplayRegion::get_left
113 // Access: Published
114 // Description: Retrieves the x coordinate of the left edge of the
115 // rectangle within its GraphicsOutput. This number
116 // will be in the range [0..1].
117 ////////////////////////////////////////////////////////////////////
118 INLINE PN_stdfloat DisplayRegion::
119 get_left(int i) const {
120  CDReader cdata(_cycler);
121  return cdata->_regions[i]._dimensions[0];
122 }
123 
124 ////////////////////////////////////////////////////////////////////
125 // Function: DisplayRegion::get_right
126 // Access: Published
127 // Description: Retrieves the x coordinate of the right edge of the
128 // rectangle within its GraphicsOutput. This number
129 // will be in the range [0..1].
130 ////////////////////////////////////////////////////////////////////
131 INLINE PN_stdfloat DisplayRegion::
132 get_right(int i) const {
133  CDReader cdata(_cycler);
134  return cdata->_regions[i]._dimensions[1];
135 }
136 
137 ////////////////////////////////////////////////////////////////////
138 // Function: DisplayRegion::get_bottom
139 // Access: Published
140 // Description: Retrieves the y coordinate of the bottom edge of
141 // the rectangle within its GraphicsOutput. This
142 // number will be in the range [0..1].
143 ////////////////////////////////////////////////////////////////////
144 INLINE PN_stdfloat DisplayRegion::
145 get_bottom(int i) const {
146  CDReader cdata(_cycler);
147  return cdata->_regions[i]._dimensions[2];
148 }
149 
150 ////////////////////////////////////////////////////////////////////
151 // Function: DisplayRegion::get_top
152 // Access: Published
153 // Description: Retrieves the y coordinate of the top edge of the
154 // rectangle within its GraphicsOutput. This number
155 // will be in the range [0..1].
156 ////////////////////////////////////////////////////////////////////
157 INLINE PN_stdfloat DisplayRegion::
158 get_top(int i) const {
159  CDReader cdata(_cycler);
160  return cdata->_regions[i]._dimensions[3];
161 }
162 
163 ////////////////////////////////////////////////////////////////////
164 // Function: DisplayRegion::set_dimensions
165 // Access: Published, Virtual
166 // Description: Changes the portion of the framebuffer this
167 // DisplayRegion corresponds to. The parameters range
168 // from 0 to 1, where 0,0 is the lower left corner and
169 // 1,1 is the upper right; (0, 1, 0, 1) represents the
170 // whole screen.
171 ////////////////////////////////////////////////////////////////////
172 INLINE void DisplayRegion::
173 set_dimensions(PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat t) {
174  set_dimensions(0, LVecBase4(l, r, b, t));
175 }
176 
177 ////////////////////////////////////////////////////////////////////
178 // Function: DisplayRegion::set_dimensions
179 // Access: Published, Virtual
180 // Description: Changes the portion of the framebuffer this
181 // DisplayRegion corresponds to. The parameters range
182 // from 0 to 1, where 0,0 is the lower left corner and
183 // 1,1 is the upper right; (0, 1, 0, 1) represents the
184 // whole screen.
185 ////////////////////////////////////////////////////////////////////
186 INLINE void DisplayRegion::
187 set_dimensions(int i, PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat t) {
188  set_dimensions(i, LVecBase4(l, r, b, t));
189 }
190 
191 ////////////////////////////////////////////////////////////////////
192 // Function: DisplayRegion::set_dimensions
193 // Access: Published, Virtual
194 // Description: Changes the portion of the framebuffer this
195 // DisplayRegion corresponds to. The parameters range
196 // from 0 to 1, where 0,0 is the lower left corner and
197 // 1,1 is the upper right; (0, 1, 0, 1) represents the
198 // whole screen.
199 ////////////////////////////////////////////////////////////////////
200 INLINE void DisplayRegion::
201 set_dimensions(const LVecBase4 &dimensions) {
202  set_dimensions(0, dimensions);
203 }
204 
205 ////////////////////////////////////////////////////////////////////
206 // Function: DisplayRegion::get_window
207 // Access: Published
208 // Description: Returns the GraphicsOutput that this DisplayRegion is
209 // ultimately associated with, or NULL if no window is
210 // associated.
211 ////////////////////////////////////////////////////////////////////
213 get_window() const {
214  return _window;
215 }
216 
217 ////////////////////////////////////////////////////////////////////
218 // Function: DisplayRegion::get_camera
219 // Access: Published
220 // Description: Returns the camera associated with this
221 // DisplayRegion, or an empty NodePath if no camera is
222 // associated.
223 ////////////////////////////////////////////////////////////////////
225 get_camera(Thread *current_thread) const {
226  CDReader cdata(_cycler, current_thread);
227  return cdata->_camera;
228 }
229 
230 ////////////////////////////////////////////////////////////////////
231 // Function: DisplayRegion::is_active
232 // Access: Published
233 // Description: Returns the active flag associated with the
234 // DisplayRegion.
235 ////////////////////////////////////////////////////////////////////
236 INLINE bool DisplayRegion::
237 is_active() const {
238  CDReader cdata(_cycler);
239  return cdata->_active;
240 }
241 
242 ////////////////////////////////////////////////////////////////////
243 // Function: DisplayRegion::get_sort
244 // Access: Published
245 // Description: Returns the sort value associated with the
246 // DisplayRegion.
247 ////////////////////////////////////////////////////////////////////
248 INLINE int DisplayRegion::
249 get_sort() const {
250  CDReader cdata(_cycler);
251  return cdata->_sort;
252 }
253 
254 ////////////////////////////////////////////////////////////////////
255 // Function: DisplayRegion::get_stereo_channel
256 // Access: Published
257 // Description: Returns whether the DisplayRegion is specified as the
258 // left or right channel of a stereo pair, or whether it
259 // is a normal, monocular image. See
260 // set_stereo_channel().
261 ////////////////////////////////////////////////////////////////////
262 INLINE Lens::StereoChannel DisplayRegion::
264  CDReader cdata(_cycler);
265  return cdata->_stereo_channel;
266 }
267 
268 ////////////////////////////////////////////////////////////////////
269 // Function: DisplayRegion::get_tex_view_offset
270 // Access: Public
271 // Description: Returns the current texture view offset for this
272 // DisplayRegion. This is normally set to zero. If
273 // nonzero, it is used to select a particular view of
274 // any multiview textures that are rendered within this
275 // DisplayRegion.
276 //
277 // For a StereoDisplayRegion, this is normally 0 for the
278 // left eye, and 1 for the right eye, to support stereo
279 // textures.
280 ////////////////////////////////////////////////////////////////////
281 INLINE int DisplayRegion::
283  CDReader cdata(_cycler);
284  return cdata->_tex_view_offset;
285 }
286 
287 ////////////////////////////////////////////////////////////////////
288 // Function: DisplayRegion::get_incomplete_render
289 // Access: Published
290 // Description: Returns the incomplete_render flag. See
291 // set_incomplete_render().
292 ////////////////////////////////////////////////////////////////////
293 INLINE bool DisplayRegion::
295  return _incomplete_render;
296 }
297 
298 ////////////////////////////////////////////////////////////////////
299 // Function: DisplayRegion::get_texture_reload_priority
300 // Access: Published
301 // Description: Returns the priority which is assigned to
302 // asynchronous texture reload requests. See
303 // set_texture_reload_priority().
304 ////////////////////////////////////////////////////////////////////
305 INLINE int DisplayRegion::
307  return _texture_reload_priority;
308 }
309 
310 ////////////////////////////////////////////////////////////////////
311 // Function: DisplayRegion::set_cube_map_index
312 // Access: Published
313 // Description: Deprecated; replaced by set_target_tex_page().
314 ////////////////////////////////////////////////////////////////////
315 INLINE void DisplayRegion::
316 set_cube_map_index(int cube_map_index) {
317  set_target_tex_page(cube_map_index);
318 }
319 
320 ////////////////////////////////////////////////////////////////////
321 // Function: DisplayRegion::get_target_tex_page
322 // Access: Published
323 // Description: Returns the target page number associated with this
324 // particular DisplayRegion, or -1 if it is not
325 // associated with a page. See
326 // set_target_tex_page().
327 ////////////////////////////////////////////////////////////////////
328 INLINE int DisplayRegion::
330  CDReader cdata(_cycler);
331  return cdata->_target_tex_page;
332 }
333 
334 ////////////////////////////////////////////////////////////////////
335 // Function: DisplayRegion::set_scissor_enabled
336 // Access: Published
337 // Description: Sets whether or not scissor testing is enabled
338 // for this region. The default is true, except for
339 // the overlay display region.
340 ////////////////////////////////////////////////////////////////////
341 INLINE void DisplayRegion::
342 set_scissor_enabled(bool scissor_enabled) {
343  CDWriter cdata(_cycler);
344  cdata->_scissor_enabled = scissor_enabled;
345 }
346 
347 ////////////////////////////////////////////////////////////////////
348 // Function: DisplayRegion::get_scissor_enabled
349 // Access: Published
350 // Description: Returns whether or not scissor testing is enabled
351 // for this region. The default is true, except for
352 // the overlay display region.
353 ////////////////////////////////////////////////////////////////////
354 INLINE bool DisplayRegion::
356  CDReader cdata(_cycler);
357  return cdata->_scissor_enabled;
358 }
359 
360 ////////////////////////////////////////////////////////////////////
361 // Function: DisplayRegion::set_cull_callback
362 // Access: Published
363 // Description: Sets the CallbackObject that will be notified when
364 // the DisplayRegion is visited during the cull
365 // traversal. This callback will be made during the
366 // cull thread.
367 //
368 // The cull traversal is responsible for determining
369 // which nodes are visible and within the view frustum,
370 // and for accumulating state and transform, and
371 // generally building up the list of CullableObjects
372 // that are to be eventually passed to the draw
373 // traversal for rendering.
374 //
375 // At the time the cull traversal callback is made, the
376 // traversal for this DisplayRegion has not yet started.
377 //
378 // The callback is passed an instance of a
379 // DisplayRegionCullCallbackData, which contains
380 // pointers to the current scene information, as well as
381 // the current DisplayRegion and GSG. The callback
382 // *replaces* the normal cull behavior, so if your
383 // callback does nothing, the scene graph will not be
384 // traversed and therefore nothing will be drawn. If
385 // you wish the normal cull traversal to be performed
386 // for this DisplayRegion, you must call
387 // cbdata->upcall() from your callback.
388 ////////////////////////////////////////////////////////////////////
389 INLINE void DisplayRegion::
391  CDWriter cdata(_cycler);
392  cdata->_cull_callback = object;
393 }
394 
395 ////////////////////////////////////////////////////////////////////
396 // Function: DisplayRegion::clear_cull_callback
397 // Access: Published
398 // Description: Removes the callback set by an earlier call to
399 // set_cull_callback().
400 ////////////////////////////////////////////////////////////////////
401 INLINE void DisplayRegion::
403  set_cull_callback(NULL);
404 }
405 
406 ////////////////////////////////////////////////////////////////////
407 // Function: DisplayRegion::get_cull_callback
408 // Access: Published
409 // Description: Returns the CallbackObject set by set_cull_callback().
410 ////////////////////////////////////////////////////////////////////
413  CDReader cdata(_cycler);
414  return cdata->_cull_callback;
415 }
416 
417 ////////////////////////////////////////////////////////////////////
418 // Function: DisplayRegion::set_draw_callback
419 // Access: Published
420 // Description: Sets the CallbackObject that will be notified when
421 // the contents of DisplayRegion is drawn during the
422 // draw traversal. This callback will be made during
423 // the draw thread.
424 //
425 // The draw traversal is responsible for actually
426 // issuing the commands to the graphics engine to draw
427 // primitives. Its job is to walk through the list of
428 // CullableObjects build up by the cull traversal, as
429 // quickly as possible, issuing the appropriate commands
430 // to draw each one.
431 //
432 // At the time the draw traversal callback is made, the
433 // graphics state is in the initial state, and no
434 // projection matrix or modelview matrix is in effect.
435 // begin_scene() has not yet been called, and no objects
436 // have yet been drawn. However, the viewport has
437 // already been set to the appropriate part of the
438 // window, and the clear commands for this DisplayRegion
439 // (if any) have been issued.
440 //
441 // The callback is passed an instance of a
442 // DisplayRegionDrawCallbackData, which contains
443 // pointers to the current scene information, as well as
444 // the current DisplayRegion and GSG. The callback
445 // *replaces* the normal draw behavior, so if your
446 // callback does nothing, nothing in the DisplayRegion
447 // will be drawn. If you wish the draw traversal to
448 // continue to draw the contents of this DisplayRegion,
449 // you must call cbdata->upcall() from your callback.
450 ////////////////////////////////////////////////////////////////////
451 INLINE void DisplayRegion::
453  CDWriter cdata(_cycler);
454  cdata->_draw_callback = object;
455 }
456 
457 ////////////////////////////////////////////////////////////////////
458 // Function: DisplayRegion::clear_draw_callback
459 // Access: Published
460 // Description: Removes the callback set by an earlier call to
461 // set_draw_callback().
462 ////////////////////////////////////////////////////////////////////
463 INLINE void DisplayRegion::
465  set_draw_callback(NULL);
466 }
467 
468 ////////////////////////////////////////////////////////////////////
469 // Function: DisplayRegion::get_draw_callback
470 // Access: Published
471 // Description: Returns the CallbackObject set by set_draw_callback().
472 ////////////////////////////////////////////////////////////////////
475  CDReader cdata(_cycler);
476  return cdata->_draw_callback;
477 }
478 
479 ////////////////////////////////////////////////////////////////////
480 // Function: DisplayRegion::get_pixel_width
481 // Access: Published
482 // Description: Returns the width of the DisplayRegion in pixels.
483 ////////////////////////////////////////////////////////////////////
484 INLINE int DisplayRegion::
485 get_pixel_width(int i) const {
486  CDReader cdata(_cycler);
487  return cdata->_regions[i]._pixels[1] - cdata->_regions[i]._pixels[0];
488 }
489 
490 ////////////////////////////////////////////////////////////////////
491 // Function: DisplayRegion::get_pixel_height
492 // Access: Published
493 // Description: Returns the height of the DisplayRegion in pixels.
494 ////////////////////////////////////////////////////////////////////
495 INLINE int DisplayRegion::
496 get_pixel_height(int i) const {
497  CDReader cdata(_cycler);
498  return cdata->_regions[i]._pixels[3] - cdata->_regions[i]._pixels[2];
499 }
500 
501 ////////////////////////////////////////////////////////////////////
502 // Function: DisplayRegion::get_pixels
503 // Access: Public
504 // Description: Retrieves the coordinates of the DisplayRegion within
505 // its window, in pixels.
506 ////////////////////////////////////////////////////////////////////
507 INLINE void DisplayRegion::
508 get_pixels(int &pl, int &pr, int &pb, int &pt) const {
509  get_pixels(0, pl, pr, pb, pt);
510 }
511 
512 ////////////////////////////////////////////////////////////////////
513 // Function: DisplayRegion::get_pixels
514 // Access: Public
515 // Description: Retrieves the coordinates of the DisplayRegion within
516 // its window, in pixels.
517 ////////////////////////////////////////////////////////////////////
518 INLINE void DisplayRegion::
519 get_pixels(int i, int &pl, int &pr, int &pb, int &pt) const {
520  CDReader cdata(_cycler);
521  const Region &region = cdata->_regions[i];
522  pl = region._pixels[0];
523  pr = region._pixels[1];
524  pb = region._pixels[2];
525  pt = region._pixels[3];
526 }
527 
528 ////////////////////////////////////////////////////////////////////
529 // Function: DisplayRegion::get_region_pixels
530 // Access: Public
531 // Description: Retrieves the coordinates of the DisplayRegion within
532 // its window, as the pixel location of its bottom-left
533 // corner, along with a pixel width and height.
534 ////////////////////////////////////////////////////////////////////
535 INLINE void DisplayRegion::
536 get_region_pixels(int &xo, int &yo, int &w, int &h) const {
537  get_region_pixels(0, xo, yo, w, h);
538 }
539 
540 ////////////////////////////////////////////////////////////////////
541 // Function: DisplayRegion::get_region_pixels
542 // Access: Public
543 // Description: Retrieves the coordinates of the DisplayRegion within
544 // its window, as the pixel location of its bottom-left
545 // corner, along with a pixel width and height.
546 ////////////////////////////////////////////////////////////////////
547 INLINE void DisplayRegion::
548 get_region_pixels(int i, int &xo, int &yo, int &w, int &h) const {
549  CDReader cdata(_cycler);
550  const Region &region = cdata->_regions[i];
551  xo = region._pixels[0];
552  yo = region._pixels[2];
553  w = region._pixels[1] - xo;
554  h = region._pixels[3] - yo;
555 }
556 
557 ////////////////////////////////////////////////////////////////////
558 // Function: DisplayRegion::get_region_pixels_i
559 // Access: Public
560 // Description: Similar to get_region_pixels(), but returns the upper
561 // left corner, and the pixel numbers are numbered from
562 // the top-left corner down, in the DirectX way of
563 // things.
564 ////////////////////////////////////////////////////////////////////
565 INLINE void DisplayRegion::
566 get_region_pixels_i(int &xo, int &yo, int &w, int &h) const {
567  get_region_pixels_i(0, xo, yo, w, h);
568 }
569 
570 ////////////////////////////////////////////////////////////////////
571 // Function: DisplayRegion::get_region_pixels_i
572 // Access: Public
573 // Description: Similar to get_region_pixels(), but returns the upper
574 // left corner, and the pixel numbers are numbered from
575 // the top-left corner down, in the DirectX way of
576 // things.
577 ////////////////////////////////////////////////////////////////////
578 INLINE void DisplayRegion::
579 get_region_pixels_i(int i, int &xo, int &yo, int &w, int &h) const {
580  CDReader cdata(_cycler);
581  const Region &region = cdata->_regions[i];
582  xo = region._pixels_i[0];
583  yo = region._pixels_i[3];
584  w = region._pixels_i[1] - xo;
585  h = region._pixels_i[2] - yo;
586 }
587 
588 ////////////////////////////////////////////////////////////////////
589 // Function: DisplayRegion::set_cull_result
590 // Access: Public
591 // Description: Stores the result of performing a cull operation on
592 // this DisplayRegion. Normally, this will only be
593 // called by the GraphicsEngine; you should not call
594 // this directly.
595 //
596 // The stored result will automatically be applied back
597 // to all upstream pipeline stages.
598 ////////////////////////////////////////////////////////////////////
599 INLINE void DisplayRegion::
600 set_cull_result(CullResult *cull_result, SceneSetup *scene_setup,
601  Thread *current_thread) {
602  CDCullWriter cdata(_cycler_cull, true, current_thread);
603  cdata->_cull_result = cull_result;
604  cdata->_scene_setup = scene_setup;
605 }
606 
607 ////////////////////////////////////////////////////////////////////
608 // Function: DisplayRegion::get_cull_result
609 // Access: Public
610 // Description: Returns the CullResult value that was stored on this
611 // DisplayRegion, presumably by the last successful cull
612 // operation. This method is for the benefit of the
613 // GraphicsEngine; normally you shouldn't call this
614 // directly.
615 ////////////////////////////////////////////////////////////////////
617 get_cull_result(Thread *current_thread) const {
618  CDCullReader cdata(_cycler_cull, current_thread);
619  return cdata->_cull_result;
620 }
621 
622 ////////////////////////////////////////////////////////////////////
623 // Function: DisplayRegion::get_scene_setup
624 // Access: Public
625 // Description: Returns the SceneSetup value that was stored on this
626 // DisplayRegion, presumably by the last successful cull
627 // operation. This method is for the benefit of the
628 // GraphicsEngine; normally you shouldn't call this
629 // directly.
630 ////////////////////////////////////////////////////////////////////
632 get_scene_setup(Thread *current_thread) const {
633  CDCullReader cdata(_cycler_cull, current_thread);
634  return cdata->_scene_setup;
635 }
636 
637 ////////////////////////////////////////////////////////////////////
638 // Function: DisplayRegion::get_cull_region_pcollector
639 // Access: Public
640 // Description: Returns a PStatCollector for timing the cull
641 // operation for just this DisplayRegion.
642 ////////////////////////////////////////////////////////////////////
645  return _cull_region_pcollector;
646 }
647 
648 ////////////////////////////////////////////////////////////////////
649 // Function: DisplayRegion::get_draw_region_pcollector
650 // Access: Public
651 // Description: Returns a PStatCollector for timing the draw
652 // operation for just this DisplayRegion.
653 ////////////////////////////////////////////////////////////////////
656  return _draw_region_pcollector;
657 }
658 
659 ////////////////////////////////////////////////////////////////////
660 // Function: DisplayRegion::Region::Constructor
661 // Access: Public
662 // Description:
663 ////////////////////////////////////////////////////////////////////
664 INLINE DisplayRegion::Region::
665 Region() :
666  _dimensions(0, 1, 0, 1),
667  _pixels(0),
668  _pixels_i(0) {
669 }
670 
671 ////////////////////////////////////////////////////////////////////
672 // Function: DisplayRegion::CDataCull::Constructor
673 // Access: Public
674 // Description:
675 ////////////////////////////////////////////////////////////////////
676 INLINE DisplayRegion::CDataCull::
677 CDataCull() {
678 }
679 
680 ////////////////////////////////////////////////////////////////////
681 // Function: DisplayRegion::CDataCull::Copy Constructor
682 // Access: Public
683 // Description:
684 ////////////////////////////////////////////////////////////////////
685 INLINE DisplayRegion::CDataCull::
686 CDataCull(const DisplayRegion::CDataCull &copy) :
687  _cull_result(copy._cull_result),
688  _scene_setup(copy._scene_setup)
689 {
690 }
691 
692 ////////////////////////////////////////////////////////////////////
693 // Function: DisplayRegionPipelineReader::Constructor
694 // Access: Public
695 // Description:
696 ////////////////////////////////////////////////////////////////////
697 INLINE DisplayRegionPipelineReader::
698 DisplayRegionPipelineReader(DisplayRegion *object, Thread *current_thread) :
699  _object(object),
700  _current_thread(current_thread),
701  _cdata(object->_cycler.read(current_thread))
702 {
703 #ifdef _DEBUG
704  nassertv(_object->test_ref_count_nonzero());
705 #ifdef DO_PIPELINING
706  nassertv(_cdata->test_ref_count_nonzero());
707 #endif // DO_PIPELINING
708 #endif // _DEBUG
709 }
710 
711 ////////////////////////////////////////////////////////////////////
712 // Function: DisplayRegionPipelineReader::Copy Constructor
713 // Access: Private
714 // Description: Don't attempt to copy these objects.
715 ////////////////////////////////////////////////////////////////////
716 INLINE DisplayRegionPipelineReader::
717 DisplayRegionPipelineReader(const DisplayRegionPipelineReader &) {
718  nassertv(false);
719 }
720 
721 ////////////////////////////////////////////////////////////////////
722 // Function: DisplayRegionPipelineReader::Copy Assignment Operator
723 // Access: Private
724 // Description: Don't attempt to copy these objects.
725 ////////////////////////////////////////////////////////////////////
726 INLINE void DisplayRegionPipelineReader::
727 operator = (const DisplayRegionPipelineReader &) {
728  nassertv(false);
729 }
730 
731 ////////////////////////////////////////////////////////////////////
732 // Function: DisplayRegionPipelineReader::Destructor
733 // Access: Public
734 // Description:
735 ////////////////////////////////////////////////////////////////////
736 INLINE DisplayRegionPipelineReader::
737 ~DisplayRegionPipelineReader() {
738 #ifdef _DEBUG
739  nassertv(_object->test_ref_count_nonzero());
740 #ifdef DO_PIPELINING
741  nassertv(_cdata->test_ref_count_nonzero());
742 #endif // DO_PIPELINING
743 #endif // _DEBUG
744  _object->_cycler.release_read(_cdata);
745 
746 #ifdef _DEBUG
747  _object = NULL;
748  _cdata = NULL;
749 #endif // _DEBUG
750 }
751 
752 ////////////////////////////////////////////////////////////////////
753 // Function: DisplayRegionPipelineReader::get_object
754 // Access: Public
755 // Description:
756 ////////////////////////////////////////////////////////////////////
757 INLINE DisplayRegion *DisplayRegionPipelineReader::
758 get_object() const {
759  return _object;
760 }
761 
762 ////////////////////////////////////////////////////////////////////
763 // Function: DisplayRegionPipelineReader::get_current_thread
764 // Access: Public
765 // Description:
766 ////////////////////////////////////////////////////////////////////
767 INLINE Thread *DisplayRegionPipelineReader::
768 get_current_thread() const {
769  return _current_thread;
770 }
771 
772 ////////////////////////////////////////////////////////////////////
773 // Function: DisplayRegionPipelineReader::is_any_clear_active
774 // Access: Public
775 // Description:
776 ////////////////////////////////////////////////////////////////////
777 INLINE bool DisplayRegionPipelineReader::
778 is_any_clear_active() const {
779  return _object->is_any_clear_active();
780 }
781 
782 ///////////////////////////////////////////////////////////////////
783 // Function: DisplayRegionPipelineReader::get_num_regions
784 // Access: Published
785 // Description: Returns the number of regions, see set_num_regions.
786 ////////////////////////////////////////////////////////////////////
789  return _cdata->_regions.size();
790 }
791 
792 ////////////////////////////////////////////////////////////////////
793 // Function: DisplayRegionPipelineReader::get_dimensions
794 // Access: Public
795 // Description: Retrieves the coordinates of the DisplayRegion's
796 // rectangle within its GraphicsOutput. These numbers
797 // will be in the range [0..1].
798 ////////////////////////////////////////////////////////////////////
800 get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t) const {
801  return get_dimensions(0, l, r, b, t);
802 }
803 
804 ////////////////////////////////////////////////////////////////////
805 // Function: DisplayRegionPipelineReader::get_dimensions
806 // Access: Public
807 // Description: Retrieves the coordinates of the DisplayRegion's
808 // rectangle within its GraphicsOutput. These numbers
809 // will be in the range [0..1].
810 ////////////////////////////////////////////////////////////////////
812 get_dimensions(int i, PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t) const {
813  const DisplayRegion::Region &region = _cdata->_regions[i];
814  l = region._dimensions[0];
815  r = region._dimensions[1];
816  b = region._dimensions[2];
817  t = region._dimensions[3];
818 }
819 
820 ////////////////////////////////////////////////////////////////////
821 // Function: DisplayRegionPipelineReader::get_dimensions
822 // Access: Public
823 // Description: Retrieves the coordinates of the DisplayRegion's
824 // rectangle within its GraphicsOutput. These numbers
825 // will be in the range [0..1].
826 ////////////////////////////////////////////////////////////////////
828 get_dimensions(int i) const {
829  return _cdata->_regions[i]._dimensions;
830 }
831 
832 ////////////////////////////////////////////////////////////////////
833 // Function: DisplayRegionPipelineReader::get_left
834 // Access: Public
835 // Description: Retrieves the x coordinate of the left edge of the
836 // rectangle within its GraphicsOutput. This number
837 // will be in the range [0..1].
838 ////////////////////////////////////////////////////////////////////
839 INLINE PN_stdfloat DisplayRegionPipelineReader::
840 get_left(int i) const {
841  return _cdata->_regions[i]._dimensions[0];
842 }
843 
844 ////////////////////////////////////////////////////////////////////
845 // Function: DisplayRegionPipelineReader::get_right
846 // Access: Public
847 // Description: Retrieves the x coordinate of the right edge of the
848 // rectangle within its GraphicsOutput. This number
849 // will be in the range [0..1].
850 ////////////////////////////////////////////////////////////////////
851 INLINE PN_stdfloat DisplayRegionPipelineReader::
852 get_right(int i) const {
853  return _cdata->_regions[i]._dimensions[1];
854 }
855 
856 ////////////////////////////////////////////////////////////////////
857 // Function: DisplayRegionPipelineReader::get_bottom
858 // Access: Public
859 // Description: Retrieves the y coordinate of the bottom edge of
860 // the rectangle within its GraphicsOutput. This
861 // number will be in the range [0..1].
862 ////////////////////////////////////////////////////////////////////
863 INLINE PN_stdfloat DisplayRegionPipelineReader::
864 get_bottom(int i) const {
865  return _cdata->_regions[i]._dimensions[2];
866 }
867 
868 ////////////////////////////////////////////////////////////////////
869 // Function: DisplayRegionPipelineReader::get_top
870 // Access: Public
871 // Description: Retrieves the y coordinate of the top edge of the
872 // rectangle within its GraphicsOutput. This number
873 // will be in the range [0..1].
874 ////////////////////////////////////////////////////////////////////
875 INLINE PN_stdfloat DisplayRegionPipelineReader::
876 get_top(int i) const {
877  return _cdata->_regions[i]._dimensions[3];
878 }
879 
880 ////////////////////////////////////////////////////////////////////
881 // Function: DisplayRegionPipelineReader::get_window
882 // Access: Public
883 // Description: Returns the GraphicsOutput that this DisplayRegion is
884 // ultimately associated with, or NULL if no window is
885 // associated.
886 ////////////////////////////////////////////////////////////////////
888 get_window() const {
889  return _object->_window;
890 }
891 
892 ////////////////////////////////////////////////////////////////////
893 // Function: DisplayRegionPipelineReader::get_camera
894 // Access: Public
895 // Description: Returns the camera associated with this
896 // DisplayRegion, or an empty NodePath if no camera is
897 // associated.
898 ////////////////////////////////////////////////////////////////////
900 get_camera() const {
901  return _cdata->_camera;
902 }
903 
904 ////////////////////////////////////////////////////////////////////
905 // Function: DisplayRegionPipelineReader::is_active
906 // Access: Public
907 // Description: Returns the active flag associated with the
908 // DisplayRegion.
909 ////////////////////////////////////////////////////////////////////
911 is_active() const {
912  return _cdata->_active;
913 }
914 
915 ////////////////////////////////////////////////////////////////////
916 // Function: DisplayRegionPipelineReader::get_sort
917 // Access: Public
918 // Description: Returns the sort value associated with the
919 // DisplayRegion.
920 ////////////////////////////////////////////////////////////////////
922 get_sort() const {
923  return _cdata->_sort;
924 }
925 
926 ////////////////////////////////////////////////////////////////////
927 // Function: DisplayRegionPipelineReader::get_stereo_channel
928 // Access: Public
929 // Description: Returns whether the DisplayRegion is specified as the
930 // left or right channel of a stereo pair, or whether it
931 // is a normal, monocular image. See
932 // set_stereo_channel().
933 ////////////////////////////////////////////////////////////////////
934 INLINE Lens::StereoChannel DisplayRegionPipelineReader::
936  return _cdata->_stereo_channel;
937 }
938 
939 ////////////////////////////////////////////////////////////////////
940 // Function: DisplayRegionPipelineReader::get_tex_view_offset
941 // Access: Public
942 // Description: Returns the current texture view offset for this
943 // DisplayRegion. This is normally set to zero. If
944 // nonzero, it is used to select a particular view of
945 // any multiview textures that are rendered within this
946 // DisplayRegion.
947 //
948 // For a StereoDisplayRegion, this is normally 0 for the
949 // left eye, and 1 for the right eye, to support stereo
950 // textures.
951 ////////////////////////////////////////////////////////////////////
954  return _cdata->_tex_view_offset;
955 }
956 
957 ////////////////////////////////////////////////////////////////////
958 // Function: DisplayRegionPipelineReader::get_target_tex_page
959 // Access: Published
960 // Description: Returns the target page number associated with this
961 // particular DisplayRegion, or -1 if it is not
962 // associated with a page. See
963 // set_target_tex_page().
964 ////////////////////////////////////////////////////////////////////
967  return _cdata->_target_tex_page;
968 }
969 
970 ////////////////////////////////////////////////////////////////////
971 // Function: DisplayRegionPipelineReader::get_scissor_enabled
972 // Access: Published
973 // Description: Returns whether or not scissor testing is enabled
974 // for this region. The default is true, except for
975 // the overlay display region.
976 ////////////////////////////////////////////////////////////////////
979  return _cdata->_scissor_enabled;
980 }
981 
982 ////////////////////////////////////////////////////////////////////
983 // Function: DisplayRegionPipelineReader::get_draw_callback
984 // Access: Published
985 // Description: Returns the CallbackObject set by set_draw_callback().
986 ////////////////////////////////////////////////////////////////////
989  return _cdata->_draw_callback;
990 }
991 
992 ////////////////////////////////////////////////////////////////////
993 // Function: DisplayRegionPipelineReader::get_pixels
994 // Access: Public
995 // Description: Retrieves the coordinates of the DisplayRegion within
996 // its window, in pixels.
997 ////////////////////////////////////////////////////////////////////
999 get_pixels(int &pl, int &pr, int &pb, int &pt) const {
1000  get_pixels(0, pl, pr, pb, pt);
1001 }
1002 
1003 ////////////////////////////////////////////////////////////////////
1004 // Function: DisplayRegionPipelineReader::get_pixels
1005 // Access: Public
1006 // Description: Retrieves the coordinates of the DisplayRegion within
1007 // its window, in pixels.
1008 ////////////////////////////////////////////////////////////////////
1010 get_pixels(int i, int &pl, int &pr, int &pb, int &pt) const {
1011  const DisplayRegion::Region &region = _cdata->_regions[i];
1012  pl = region._pixels[0];
1013  pr = region._pixels[1];
1014  pb = region._pixels[2];
1015  pt = region._pixels[3];
1016 }
1017 
1018 ////////////////////////////////////////////////////////////////////
1019 // Function: DisplayRegionPipelineReader::get_region_pixels
1020 // Access: Public
1021 // Description: Retrieves the coordinates of the DisplayRegion within
1022 // its window, as the pixel location of its bottom-left
1023 // corner, along with a pixel width and height.
1024 ////////////////////////////////////////////////////////////////////
1026 get_region_pixels(int &xo, int &yo, int &w, int &h) const {
1027  get_region_pixels(0, xo, yo, w, h);
1028 }
1029 
1030 ////////////////////////////////////////////////////////////////////
1031 // Function: DisplayRegionPipelineReader::get_region_pixels
1032 // Access: Public
1033 // Description: Retrieves the coordinates of the DisplayRegion within
1034 // its window, as the pixel location of its bottom-left
1035 // corner, along with a pixel width and height.
1036 ////////////////////////////////////////////////////////////////////
1038 get_region_pixels(int i, int &xo, int &yo, int &w, int &h) const {
1039  const DisplayRegion::Region &region = _cdata->_regions[i];
1040  xo = region._pixels[0];
1041  yo = region._pixels[2];
1042  w = region._pixels[1] - xo;
1043  h = region._pixels[3] - yo;
1044 }
1045 
1046 ////////////////////////////////////////////////////////////////////
1047 // Function: DisplayRegionPipelineReader::get_region_pixels_i
1048 // Access: Public
1049 // Description: Similar to get_region_pixels(), but returns the upper
1050 // left corner, and the pixel numbers are numbered from
1051 // the top-left corner down, in the DirectX way of
1052 // things.
1053 ////////////////////////////////////////////////////////////////////
1055 get_region_pixels_i(int &xo, int &yo, int &w, int &h) const {
1056  get_region_pixels_i(0, xo, yo, w, h);
1057 }
1058 
1059 ////////////////////////////////////////////////////////////////////
1060 // Function: DisplayRegionPipelineReader::get_region_pixels_i
1061 // Access: Public
1062 // Description: Similar to get_region_pixels(), but returns the upper
1063 // left corner, and the pixel numbers are numbered from
1064 // the top-left corner down, in the DirectX way of
1065 // things.
1066 ////////////////////////////////////////////////////////////////////
1068 get_region_pixels_i(int i, int &xo, int &yo, int &w, int &h) const {
1069  const DisplayRegion::Region &region = _cdata->_regions[i];
1070  xo = region._pixels_i[0];
1071  yo = region._pixels_i[3];
1072  w = region._pixels_i[1] - xo;
1073  h = region._pixels_i[2] - yo;
1074 }
1075 
1076 ////////////////////////////////////////////////////////////////////
1077 // Function: DisplayRegionPipelineReader::get_pixel_width
1078 // Access: Public
1079 // Description: Returns the width of the DisplayRegion in pixels.
1080 ////////////////////////////////////////////////////////////////////
1082 get_pixel_width(int i) const {
1083  return _cdata->_regions[i]._pixels[1] - _cdata->_regions[i]._pixels[0];
1084 }
1085 
1086 ////////////////////////////////////////////////////////////////////
1087 // Function: DisplayRegionPipelineReader::get_lens_index
1088 // Access: Public
1089 // Description: Gets the index into a lens_node lens array. 0 default
1090 ////////////////////////////////////////////////////////////////////
1093  return _cdata->_lens_index;
1094 }
1095 
1096 ////////////////////////////////////////////////////////////////////
1097 // Function: DisplayRegionPipelineReader::get_pixel_height
1098 // Access: Public
1099 // Description: Returns the height of the DisplayRegion in pixels.
1100 ////////////////////////////////////////////////////////////////////
1102 get_pixel_height(int i) const {
1103  return _cdata->_regions[i]._pixels[3] - _cdata->_regions[i]._pixels[2];
1104 }
int get_num_regions() const
Returns the number of regions, see set_num_regions.
Definition: displayRegion.I:47
Lens::StereoChannel get_stereo_channel() const
Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair...
void set_num_regions(int i)
Sets the number of regions that this DisplayRegion indicates.
Definition: displayRegion.I:63
PN_stdfloat get_right(int i=0) const
Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput.
Encapsulates the data from a DisplayRegion, pre-fetched for one stage of the pipeline.
PN_stdfloat get_left(int i=0) const
Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput.
void set_scissor_enabled(bool scissor_enabled)
Sets whether or not scissor testing is enabled for this region.
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...
GraphicsOutput * get_window() const
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no windo...
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...
Lens::StereoChannel get_stereo_channel() const
Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair...
bool get_incomplete_render() const
Returns the incomplete_render flag.
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 associate...
bool operator<(const DisplayRegion &other) const
Returns true if this DisplayRegion should be sorted before the other one, false otherwise.
Definition: displayRegion.I:23
void set_dimensions(PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat t)
Changes the portion of the framebuffer this DisplayRegion corresponds to.
void clear_cull_callback()
Removes the callback set by an earlier call to set_cull_callback().
virtual void set_target_tex_page(int page)
This is a special parameter that is only used when rendering the faces of a cube map or multipage and...
int get_lens_index() const
Returns the specific lens of the associated Camera that will be used for rendering this scene...
Definition: displayRegion.I:36
PN_stdfloat get_bottom(int i=0) const
Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput.
PN_stdfloat get_top(int i=0) const
Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput.
GraphicsOutput * get_window() const
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no windo...
SceneSetup * get_scene_setup(Thread *current_thread) const
Returns the SceneSetup value that was stored on this DisplayRegion, presumably by the last successful...
void set_cull_result(CullResult *cull_result, SceneSetup *scene_setup, Thread *current_thread)
Stores the result of performing a cull operation on this DisplayRegion.
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
PStatCollector & get_cull_region_pcollector()
Returns a PStatCollector for timing the cull operation for just this DisplayRegion.
NodePath get_camera() const
Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associate...
bool get_scissor_enabled() const
Returns whether or not scissor testing is enabled for this region.
int get_tex_view_offset() const
Returns the current texture view offset for this DisplayRegion.
int get_sort() const
Returns the sort value associated with the DisplayRegion.
A lightweight class that represents a single element that may be timed and/or counted via stats...
CullResult * get_cull_result(Thread *current_thread) const
Returns the CullResult value that was stored on this DisplayRegion, presumably by the last successful...
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...
int get_pixel_width(int i=0) const
Returns the width of the DisplayRegion in pixels.
int get_pixel_height(int i=0) const
Returns the height of the DisplayRegion in pixels.
CallbackObject * get_draw_callback() const
Returns the CallbackObject set by set_draw_callback().
void get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t) const
Retrieves the coordinates of the DisplayRegion&#39;s rectangle within its GraphicsOutput.
PStatCollector & get_draw_region_pcollector()
Returns a PStatCollector for timing the draw operation for just this DisplayRegion.
int get_texture_reload_priority() const
Returns the priority which is assigned to asynchronous texture reload requests.
int get_target_tex_page() const
Returns the target page number associated with this particular DisplayRegion, or -1 if it is not asso...
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...
CallbackObject * get_cull_callback() const
Returns the CallbackObject set by set_cull_callback().
void clear_draw_callback()
Removes the callback set by an earlier call to set_draw_callback().
int get_tex_view_offset()
Returns the current texture view offset for this DisplayRegion.
int get_pixel_width(int i=0) const
Returns the width of the DisplayRegion in pixels.
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
This is a base class for the various different classes that represent the result of a frame of render...
int get_num_regions() const
Returns the number of regions, see set_num_regions.
void get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t) const
Retrieves the coordinates of the DisplayRegion&#39;s rectangle within its GraphicsOutput.
Definition: displayRegion.I:77
bool get_scissor_enabled() const
Returns whether or not scissor testing is enabled for this region.
This is a generic object that can be assigned to a callback at various points in the rendering proces...
int get_target_tex_page() const
Returns the target page number associated with this particular DisplayRegion, or -1 if it is not asso...
int get_sort() const
Returns the sort value associated with the DisplayRegion.
void set_cube_map_index(int cube_map_index)
Deprecated; replaced by set_target_tex_page().
This is the base class for all three-component vectors and points.
Definition: lvecBase4.h:111
This stores the result of a BinCullHandler traversal: an ordered collection of CullBins, each of which holds a number of Geoms and RenderStates to be rendered in some defined order.
Definition: cullResult.h:47
PN_stdfloat get_left(int i=0) const
Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput.
bool is_active() const
Returns the active flag associated with the DisplayRegion.
void set_draw_callback(CallbackObject *object)
Sets the CallbackObject that will be notified when the contents of DisplayRegion is drawn during the ...
A thread; that is, a lightweight process.
Definition: thread.h:51
CallbackObject * get_draw_callback() const
Returns the CallbackObject set by set_draw_callback().
PN_stdfloat get_bottom(int i=0) const
Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput.
PN_stdfloat get_top(int i=0) const
Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput.
void set_cull_callback(CallbackObject *object)
Sets the CallbackObject that will be notified when the DisplayRegion is visited during the cull trave...
A rectangular subregion within a window for rendering into.
Definition: displayRegion.h:61
int get_pixel_height(int i=0) const
Returns the height of the DisplayRegion in pixels.
void get_pixels(int &pl, int &pr, int &pb, int &pt) const
Retrieves the coordinates of the DisplayRegion within its window, in pixels.
PN_stdfloat get_right(int i=0) const
Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput.
This object holds the camera position, etc., and other general setup information for rendering a part...
Definition: sceneSetup.h:35
int get_lens_index() const
Gets the index into a lens_node lens array.
const CycleDataType * read(Thread *current_thread) const
See PipelineCyclerBase::read().
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition: nodePath.h:165
void get_pixels(int &pl, int &pr, int &pb, int &pt) const
Retrieves the coordinates of the DisplayRegion within its window, in pixels.
bool is_active() const
Returns the active flag associated with the DisplayRegion.