forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindowFramework.I
More file actions
148 lines (132 loc) · 3.21 KB
/
windowFramework.I
File metadata and controls
148 lines (132 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file windowFramework.I
* @author drose
* @date 2002-04-02
*/
/**
* Returns a pointer to the associated PandaFramework object.
*/
INLINE PandaFramework *WindowFramework::
get_panda_framework() const {
return _panda_framework;
}
/**
* Returns a pointer to the underlying GraphicsWindow object, if it is in fact
* a window; or NULL if it is not.
*/
INLINE GraphicsWindow *WindowFramework::
get_graphics_window() const {
if (_window != nullptr &&
_window->is_of_type(GraphicsWindow::get_class_type())) {
return DCAST(GraphicsWindow, _window);
}
return nullptr;
}
/**
* Returns a pointer to the underlying GraphicsOutput object
*/
INLINE GraphicsOutput *WindowFramework::
get_graphics_output() const {
return _window;
}
/**
* Returns the number of 3-d cameras associated with the window. A window
* usually has only one camera, but it may have multiple cameras if there are
* multiple display regions within the window.
*/
INLINE int WindowFramework::
get_num_cameras() const {
return _cameras.size();
}
/**
* Returns the nth camera associated with the window.
*/
INLINE Camera *WindowFramework::
get_camera(int n) const {
nassertr(n >= 0 && n < (int)_cameras.size(), nullptr);
return _cameras[n];
}
/**
* Returns the default DisplayRegion created for the 2-d scene (render2d).
*/
INLINE DisplayRegion *WindowFramework::
get_display_region_2d() const {
return _display_region_2d;
}
/**
* Returns the default DisplayRegion created for the 3-d scene (render).
*/
INLINE DisplayRegion *WindowFramework::
get_display_region_3d() const {
return _display_region_3d;
}
/**
* Returns the current state of the anim_controls flag.
*/
INLINE bool WindowFramework::
get_anim_controls() const {
return _anim_controls_enabled;
}
/**
* Returns the current state of the wireframe flag.
*/
INLINE bool WindowFramework::
get_wireframe() const {
return _wireframe_enabled;
}
/**
* Returns the current state of the wireframe_filled flag.
*/
INLINE bool WindowFramework::
get_wireframe_filled() const {
return _wireframe_filled;
}
/**
* Returns the current state of the texture flag.
*/
INLINE bool WindowFramework::
get_texture() const {
return _texture_enabled;
}
/**
* Returns the current state of the two_sided flag.
*/
INLINE bool WindowFramework::
get_two_sided() const {
return _two_sided_enabled;
}
/**
* Returns the current state of the one_sided_reverse flag.
*/
INLINE bool WindowFramework::
get_one_sided_reverse() const {
return _one_sided_reverse_enabled;
}
/**
* Returns the current state of the lighting flag.
*/
INLINE bool WindowFramework::
get_lighting() const {
return _lighting_enabled;
}
/**
* Returns the current state of the perpixel flag.
*/
INLINE bool WindowFramework::
get_perpixel() const {
return _perpixel_enabled;
}
/**
* Returns the current background type setting.
*/
INLINE WindowFramework::BackgroundType WindowFramework::
get_background_type() const {
return _background_type;
}