Panda3D
Loading...
Searching...
No Matches
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 */
18get_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 */
27get_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 */
39get_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 */
49get_num_cameras() const {
50 return _cameras.size();
51}
52
53/**
54 * Returns the nth camera associated with the window.
55 */
57get_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 */
82get_anim_controls() const {
83 return _anim_controls_enabled;
84}
85
86/**
87 * Returns the current state of the wireframe flag.
88 */
90get_wireframe() const {
91 return _wireframe_enabled;
92}
93
94/**
95 * Returns the current state of the wireframe_filled flag.
96 */
99 return _wireframe_filled;
100}
101
102/**
103 * Returns the current state of the texture flag.
104 */
106get_texture() const {
107 return _texture_enabled;
108}
109
110/**
111 * Returns the current state of the two_sided flag.
112 */
114get_two_sided() const {
115 return _two_sided_enabled;
116}
117
118/**
119 * Returns the current state of the one_sided_reverse flag.
120 */
122get_one_sided_reverse() const {
123 return _one_sided_reverse_enabled;
124}
125
126/**
127 * Returns the current state of the lighting flag.
128 */
130get_lighting() const {
131 return _lighting_enabled;
132}
133
134/**
135 * Returns the current state of the perpixel flag.
136 */
138get_perpixel() const {
139 return _perpixel_enabled;
140}
141
142/**
143 * Returns the current background type setting.
144 */
145INLINE WindowFramework::BackgroundType WindowFramework::
146get_background_type() const {
147 return _background_type;
148}
A node that can be positioned around in the scene graph to represent a point of view for rendering a ...
Definition camera.h:35
A rectangular subregion within a window for rendering into.
This is a base class for the various different classes that represent the result of a frame of render...
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
This class serves to provide a high-level framework for basic applications that use Panda in simple w...
bool get_lighting() const
Returns the current state of the lighting flag.
bool get_wireframe() const
Returns the current state of the wireframe flag.
int get_num_cameras() const
Returns the number of 3-d cameras associated with the window.
bool get_texture() const
Returns the current state of the texture flag.
DisplayRegion * get_display_region_3d() const
Returns the default DisplayRegion created for the 3-d scene (render).
BackgroundType get_background_type() const
Returns the current background type setting.
bool get_one_sided_reverse() const
Returns the current state of the one_sided_reverse flag.
bool get_two_sided() const
Returns the current state of the two_sided flag.
bool get_anim_controls() const
Returns the current state of the anim_controls flag.
PandaFramework * get_panda_framework() const
Returns a pointer to the associated PandaFramework object.
Camera * get_camera(int n) const
Returns the nth camera associated with the window.
DisplayRegion * get_display_region_2d() const
Returns the default DisplayRegion created for the 2-d scene (render2d).
bool get_perpixel() const
Returns the current state of the perpixel flag.
bool get_wireframe_filled() const
Returns the current state of the wireframe_filled flag.
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...
GraphicsOutput * get_graphics_output() const
Returns a pointer to the underlying GraphicsOutput object.