Panda3D
physxSceneStats2.I
1 // Filename: physxSceneStats2.cxx
2 // Created by: enn0x (20Oct09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: PhysxSceneStats2::get_num_stats
18 // Access: Published
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE unsigned int PhysxSceneStats2::
22 get_num_stats() const {
23 
24  return _ptr->numStats;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: PhysxSceneStats2::get_cur_value
29 // Access: Published
30 // Description:
31 ////////////////////////////////////////////////////////////////////
32 INLINE int PhysxSceneStats2::
33 get_cur_value(unsigned int index) const {
34 
35  nassertr(index < _ptr->numStats, -1);
36  return _ptr->stats[index].curValue;
37 }
38 
39 ////////////////////////////////////////////////////////////////////
40 // Function: PhysxSceneStats2::get_max_value
41 // Access: Published
42 // Description:
43 ////////////////////////////////////////////////////////////////////
44 INLINE int PhysxSceneStats2::
45 get_max_value(unsigned int index) const {
46 
47  nassertr(index < _ptr->numStats, -1);
48  return _ptr->stats[index].maxValue;
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: PhysxSceneStats2::get_name
53 // Access: Published
54 // Description:
55 ////////////////////////////////////////////////////////////////////
56 INLINE const char * PhysxSceneStats2::
57 get_name(unsigned int index) const {
58 
59  nassertr(index < _ptr->numStats, "");
60  return _ptr->stats[index].name;
61 }
62 
63 ////////////////////////////////////////////////////////////////////
64 // Function: PhysxSceneStats2::get_parent
65 // Access: Published
66 // Description:
67 ////////////////////////////////////////////////////////////////////
68 INLINE unsigned int PhysxSceneStats2::
69 get_parent(unsigned int index) const {
70 
71  nassertr(index < _ptr->numStats, 0);
72  return _ptr->stats[index].parent;
73 }
74