Panda3D
windowFramework.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file windowFramework.I
10  * @author drose
11  * @date 2002-04-02
12  */
13 
14 /**
15  * Returns a pointer to the associated PandaFramework object.
16  */
19  return _panda_framework;
20 }
21 
22 /**
23  * Returns a pointer to the underlying GraphicsWindow object, if it is in fact
24  * a window; or NULL if it is not.
25  */
28  if (_window != nullptr &&
29  _window->is_of_type(GraphicsWindow::get_class_type())) {
30  return DCAST(GraphicsWindow, _window);
31  }
32  return nullptr;
33 }
34 
35 /**
36  * Returns a pointer to the underlying GraphicsOutput object
37  */
40  return _window;
41 }
42 
43 /**
44  * Returns the number of 3-d cameras associated with the window. A window
45  * usually has only one camera, but it may have multiple cameras if there are
46  * multiple display regions within the window.
47  */
48 INLINE int WindowFramework::
49 get_num_cameras() const {
50  return _cameras.size();
51 }
52 
53 /**
54  * Returns the nth camera associated with the window.
55  */
57 get_camera(int n) const {
58  nassertr(n >= 0 && n < (int)_cameras.size(), nullptr);
59  return _cameras[n];
60 }
61 
62 /**
63  * Returns the default DisplayRegion created for the 2-d scene (render2d).
64  */
67  return _display_region_2d;
68 }
69 
70 /**
71  * Returns the default DisplayRegion created for the 3-d scene (render).
72  */
75  return _display_region_3d;
76 }
77 
78 /**
79  * Returns the current state of the anim_controls flag.
80  */
81 INLINE bool WindowFramework::
83  return _anim_controls_enabled;
84 }
85 
86 /**
87  * Returns the current state of the wireframe flag.
88  */
89 INLINE bool WindowFramework::
90 get_wireframe() const {
91  return _wireframe_enabled;
92 }
93 
94 /**
95  * Returns the current state of the wireframe_filled flag.
96  */
97 INLINE bool WindowFramework::
99  return _wireframe_filled;
100 }
101 
102 /**
103  * Returns the current state of the texture flag.
104  */
105 INLINE bool WindowFramework::
106 get_texture() const {
107  return _texture_enabled;
108 }
109 
110 /**
111  * Returns the current state of the two_sided flag.
112  */
113 INLINE bool WindowFramework::
114 get_two_sided() const {
115  return _two_sided_enabled;
116 }
117 
118 /**
119  * Returns the current state of the one_sided_reverse flag.
120  */
121 INLINE bool WindowFramework::
123  return _one_sided_reverse_enabled;
124 }
125 
126 /**
127  * Returns the current state of the lighting flag.
128  */
129 INLINE bool WindowFramework::
130 get_lighting() const {
131  return _lighting_enabled;
132 }
133 
134 /**
135  * Returns the current state of the perpixel flag.
136  */
137 INLINE bool WindowFramework::
138 get_perpixel() const {
139  return _perpixel_enabled;
140 }
141 
142 /**
143  * Returns the current background type setting.
144  */
145 INLINE WindowFramework::BackgroundType WindowFramework::
147  return _background_type;
148 }
bool get_wireframe_filled() const
Returns the current state of the wireframe_filled flag.
bool get_wireframe() const
Returns the current state of the wireframe flag.
bool get_anim_controls() const
Returns the current state of the anim_controls flag.
GraphicsOutput * get_graphics_output() const
Returns a pointer to the underlying GraphicsOutput object.
bool get_one_sided_reverse() const
Returns the current state of the one_sided_reverse flag.
bool get_texture() const
Returns the current state of the texture flag.
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
int get_num_cameras() const
Returns the number of 3-d cameras associated with the window.
bool get_two_sided() const
Returns the current state of the two_sided flag.
PandaFramework * get_panda_framework() const
Returns a pointer to the associated PandaFramework object.
BackgroundType get_background_type() const
Returns the current background type setting.
DisplayRegion * get_display_region_2d() const
Returns the default DisplayRegion created for the 2-d scene (render2d).
DisplayRegion * get_display_region_3d() const
Returns the default DisplayRegion created for the 3-d scene (render).
This is a base class for the various different classes that represent the result of a frame of render...
bool get_lighting() const
Returns the current state of the lighting flag.
A rectangular subregion within a window for rendering into.
Definition: displayRegion.h:57
This class serves to provide a high-level framework for basic applications that use Panda in simple w...
GraphicsWindow * get_graphics_window() const
Returns a pointer to the underlying GraphicsWindow object, if it is in fact a window; or NULL if it i...
Camera * get_camera(int n) const
Returns the nth camera associated with the window.
A node that can be positioned around in the scene graph to represent a point of view for rendering a ...
Definition: camera.h:35
bool get_perpixel() const
Returns the current state of the perpixel flag.