Panda3D
sceneGraphAnalyzerMeter.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 sceneGraphAnalyzerMeter.I
10  * @author pratt
11  * @date 2007-02-14
12  */
13 
14 /**
15  * Returns the GraphicsOutput that was passed to setup_window(), or NULL if
16  * setup_window() has not been called.
17  */
19 get_window() const {
20  return _window;
21 }
22 
23 /**
24  * Returns the DisplayRegion that the meter has created to render itself into
25  * the window to setup_window(), or NULL if setup_window() has not been
26  * called.
27  */
30  return _display_region;
31 }
32 
33 /**
34  * Specifies the number of seconds that should elapse between updates to the
35  * meter. This should be reasonably slow (e.g. 0.5 to 2.0) so that the
36  * calculation of the scene graph analysis does not itself dominate the frame
37  * rate.
38  */
39 INLINE void SceneGraphAnalyzerMeter::
40 set_update_interval(double update_interval) {
41  _update_interval = update_interval;
42 }
43 
44 /**
45  * Returns the number of seconds that will elapse between updates to the frame
46  * rate indication.
47  */
48 INLINE double SceneGraphAnalyzerMeter::
50  return _update_interval;
51 }
52 
53 /**
54  * Sets the node to be analyzed.
55  */
56 INLINE void SceneGraphAnalyzerMeter::
58  _node = node;
59 }
60 
61 /**
62  * Returns the node to be analyzed.
63  */
65 get_node() const {
66  return _node;
67 }
68 
69 /**
70  * You can call this to explicitly force the SceneGraphAnalyzerMeter to update
71  * itself with the latest scene graph analysis information. Normally, it is
72  * not necessary to call this explicitly.
73  */
74 INLINE void SceneGraphAnalyzerMeter::
75 update() {
76  Thread *current_thread = Thread::get_current_thread();
77  do_update(current_thread);
78 }
A basic node of the scene graph or data graph.
Definition: pandaNode.h:64
void update()
You can call this to explicitly force the SceneGraphAnalyzerMeter to update itself with the latest sc...
GraphicsOutput * get_window() const
Returns the GraphicsOutput that was passed to setup_window(), or NULL if setup_window() has not been ...
PandaNode * get_node() const
Returns the node to be analyzed.
This is a base class for the various different classes that represent the result of a frame of render...
DisplayRegion * get_display_region() const
Returns the DisplayRegion that the meter has created to render itself into the window to setup_window...
void set_node(PandaNode *node)
Sets the node to be analyzed.
A thread; that is, a lightweight process.
Definition: thread.h:46
void set_update_interval(double update_interval)
Specifies the number of seconds that should elapse between updates to the meter.
double get_update_interval() const
Returns the number of seconds that will elapse between updates to the frame rate indication.
A rectangular subregion within a window for rendering into.
Definition: displayRegion.h:57