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 */
17 INLINE PandaFramework *WindowFramework::
18 get_panda_framework() const {
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 */
26 INLINE GraphicsWindow *WindowFramework::
27 get_graphics_window() const {
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 */
38 INLINE GraphicsOutput *WindowFramework::
39 get_graphics_output() const {
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 */
56 INLINE Camera *WindowFramework::
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 */
65 INLINE DisplayRegion *WindowFramework::
66 get_display_region_2d() const {
67 return _display_region_2d;
68 }
69
70 /**
71 * Returns the default DisplayRegion created for the 3-d scene (render).
72 */
73 INLINE DisplayRegion *WindowFramework::
74 get_display_region_3d() const {
75 return _display_region_3d;
76 }
77
78 /**
79 * Returns the current state of the anim_controls flag.
80 */
81 INLINE bool WindowFramework::
82 get_anim_controls() const {
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::
98 get_wireframe_filled() const {
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::
122 get_one_sided_reverse() const {
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::
146 get_background_type() const {
147 return _background_type;
148 }
Camera
A node that can be positioned around in the scene graph to represent a point of view for rendering a ...
Definition: camera.h:35
DisplayRegion
A rectangular subregion within a window for rendering into.
Definition: displayRegion.h:57
GraphicsOutput
This is a base class for the various different classes that represent the result of a frame of render...
Definition: graphicsOutput.h:63
GraphicsWindow
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
Definition: graphicsWindow.h:40
PandaFramework
This class serves to provide a high-level framework for basic applications that use Panda in simple w...
Definition: pandaFramework.h:38
WindowFramework::get_lighting
bool get_lighting() const
Returns the current state of the lighting flag.
Definition: windowFramework.I:130
WindowFramework::get_wireframe
bool get_wireframe() const
Returns the current state of the wireframe flag.
Definition: windowFramework.I:90
WindowFramework::get_num_cameras
int get_num_cameras() const
Returns the number of 3-d cameras associated with the window.
Definition: windowFramework.I:49
WindowFramework::get_texture
bool get_texture() const
Returns the current state of the texture flag.
Definition: windowFramework.I:106
WindowFramework::get_display_region_3d
DisplayRegion * get_display_region_3d() const
Returns the default DisplayRegion created for the 3-d scene (render).
Definition: windowFramework.I:74
WindowFramework::get_background_type
BackgroundType get_background_type() const
Returns the current background type setting.
Definition: windowFramework.I:146
WindowFramework::get_one_sided_reverse
bool get_one_sided_reverse() const
Returns the current state of the one_sided_reverse flag.
Definition: windowFramework.I:122
WindowFramework::get_two_sided
bool get_two_sided() const
Returns the current state of the two_sided flag.
Definition: windowFramework.I:114
WindowFramework::get_anim_controls
bool get_anim_controls() const
Returns the current state of the anim_controls flag.
Definition: windowFramework.I:82
WindowFramework::get_panda_framework
PandaFramework * get_panda_framework() const
Returns a pointer to the associated PandaFramework object.
Definition: windowFramework.I:18
WindowFramework::get_camera
Camera * get_camera(int n) const
Returns the nth camera associated with the window.
Definition: windowFramework.I:57
WindowFramework::get_display_region_2d
DisplayRegion * get_display_region_2d() const
Returns the default DisplayRegion created for the 2-d scene (render2d).
Definition: windowFramework.I:66
WindowFramework::get_perpixel
bool get_perpixel() const
Returns the current state of the perpixel flag.
Definition: windowFramework.I:138
WindowFramework::get_wireframe_filled
bool get_wireframe_filled() const
Returns the current state of the wireframe_filled flag.
Definition: windowFramework.I:98
WindowFramework::get_graphics_window
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...
Definition: windowFramework.I:27
WindowFramework::get_graphics_output
GraphicsOutput * get_graphics_output() const
Returns a pointer to the underlying GraphicsOutput object.
Definition: windowFramework.I:39