sceneGraphAnalyzer.I 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. // Filename: sceneGraphAnalyzer.I
  2. // Created by: drose (15Oct06)
  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. // Function: SceneGraphAnalyzer::set_lod_mode
  16. // Access: Published
  17. // Description: Specifies the mode in which LODNodes are analyzed.
  18. ////////////////////////////////////////////////////////////////////
  19. INLINE void SceneGraphAnalyzer::
  20. set_lod_mode(LodMode lod_mode) {
  21. _lod_mode = lod_mode;
  22. }
  23. ////////////////////////////////////////////////////////////////////
  24. // Function: SceneGraphAnalyzer::get_lod_mode
  25. // Access: Published
  26. // Description: Returns the mode in which LODNodes are analyzed.
  27. ////////////////////////////////////////////////////////////////////
  28. INLINE SceneGraphAnalyzer::LodMode SceneGraphAnalyzer::
  29. get_lod_mode(LodMode lod_mode) const {
  30. return _lod_mode;
  31. }
  32. ////////////////////////////////////////////////////////////////////
  33. // Function: SceneGraphAnalyzer::get_num_nodes
  34. // Access: Published
  35. // Description:
  36. ////////////////////////////////////////////////////////////////////
  37. int SceneGraphAnalyzer::
  38. get_num_nodes() const {
  39. return _num_nodes;
  40. }
  41. ////////////////////////////////////////////////////////////////////
  42. // Function: SceneGraphAnalyzer::get_num_instances
  43. // Access: Published
  44. // Description:
  45. ////////////////////////////////////////////////////////////////////
  46. int SceneGraphAnalyzer::
  47. get_num_instances() const {
  48. return _num_instances;
  49. }
  50. ////////////////////////////////////////////////////////////////////
  51. // Function: SceneGraphAnalyzer::get_num_transforms
  52. // Access: Published
  53. // Description:
  54. ////////////////////////////////////////////////////////////////////
  55. int SceneGraphAnalyzer::
  56. get_num_transforms() const {
  57. return _num_transforms;
  58. }
  59. ////////////////////////////////////////////////////////////////////
  60. // Function: SceneGraphAnalyzer::get_num_nodes_with_attribs
  61. // Access: Published
  62. // Description:
  63. ////////////////////////////////////////////////////////////////////
  64. int SceneGraphAnalyzer::
  65. get_num_nodes_with_attribs() const {
  66. return _num_nodes_with_attribs;
  67. }
  68. ////////////////////////////////////////////////////////////////////
  69. // Function: SceneGraphAnalyzer::get_num_lod_nodes
  70. // Access: Published
  71. // Description:
  72. ////////////////////////////////////////////////////////////////////
  73. int SceneGraphAnalyzer::
  74. get_num_lod_nodes() const {
  75. return _num_lod_nodes;
  76. }
  77. ////////////////////////////////////////////////////////////////////
  78. // Function: SceneGraphAnalyzer::get_num_geom_nodes
  79. // Access: Published
  80. // Description:
  81. ////////////////////////////////////////////////////////////////////
  82. int SceneGraphAnalyzer::
  83. get_num_geom_nodes() const {
  84. return _num_geom_nodes;
  85. }
  86. ////////////////////////////////////////////////////////////////////
  87. // Function: SceneGraphAnalyzer::get_num_geoms
  88. // Access: Published
  89. // Description:
  90. ////////////////////////////////////////////////////////////////////
  91. int SceneGraphAnalyzer::
  92. get_num_geoms() const {
  93. return _num_geoms;
  94. }
  95. ////////////////////////////////////////////////////////////////////
  96. // Function: SceneGraphAnalyzer::get_num_geom_vertex_datas
  97. // Access: Published
  98. // Description:
  99. ////////////////////////////////////////////////////////////////////
  100. int SceneGraphAnalyzer::
  101. get_num_geom_vertex_datas() const {
  102. return _num_geom_vertex_datas;
  103. }
  104. ////////////////////////////////////////////////////////////////////
  105. // Function: SceneGraphAnalyzer::get_num_geom_vertex_formats
  106. // Access: Published
  107. // Description:
  108. ////////////////////////////////////////////////////////////////////
  109. int SceneGraphAnalyzer::
  110. get_num_geom_vertex_formats() const {
  111. return _num_geom_vertex_formats;
  112. }
  113. ////////////////////////////////////////////////////////////////////
  114. // Function: SceneGraphAnalyzer::get_vertex_data_size
  115. // Access: Published
  116. // Description:
  117. ////////////////////////////////////////////////////////////////////
  118. int SceneGraphAnalyzer::
  119. get_vertex_data_size() const {
  120. return _vertex_data_size;
  121. }
  122. ////////////////////////////////////////////////////////////////////
  123. // Function: SceneGraphAnalyzer::get_num_vertices
  124. // Access: Published
  125. // Description:
  126. ////////////////////////////////////////////////////////////////////
  127. int SceneGraphAnalyzer::
  128. get_num_vertices() const {
  129. return _num_vertices;
  130. }
  131. ////////////////////////////////////////////////////////////////////
  132. // Function: SceneGraphAnalyzer::get_num_normals
  133. // Access: Published
  134. // Description:
  135. ////////////////////////////////////////////////////////////////////
  136. int SceneGraphAnalyzer::
  137. get_num_normals() const {
  138. return _num_normals;
  139. }
  140. ////////////////////////////////////////////////////////////////////
  141. // Function: SceneGraphAnalyzer::get_num_colors
  142. // Access: Published
  143. // Description:
  144. ////////////////////////////////////////////////////////////////////
  145. int SceneGraphAnalyzer::
  146. get_num_colors() const {
  147. return _num_colors;
  148. }
  149. ////////////////////////////////////////////////////////////////////
  150. // Function: SceneGraphAnalyzer::get_num_texcoords
  151. // Access: Published
  152. // Description:
  153. ////////////////////////////////////////////////////////////////////
  154. int SceneGraphAnalyzer::
  155. get_num_texcoords() const {
  156. return _num_texcoords;
  157. }
  158. ////////////////////////////////////////////////////////////////////
  159. // Function: SceneGraphAnalyzer::get_num_tris
  160. // Access: Published
  161. // Description:
  162. ////////////////////////////////////////////////////////////////////
  163. int SceneGraphAnalyzer::
  164. get_num_tris() const {
  165. return _num_tris;
  166. }
  167. ////////////////////////////////////////////////////////////////////
  168. // Function: SceneGraphAnalyzer::get_num_lines
  169. // Access: Published
  170. // Description:
  171. ////////////////////////////////////////////////////////////////////
  172. int SceneGraphAnalyzer::
  173. get_num_lines() const {
  174. return _num_lines;
  175. }
  176. ////////////////////////////////////////////////////////////////////
  177. // Function: SceneGraphAnalyzer::get_num_points
  178. // Access: Published
  179. // Description:
  180. ////////////////////////////////////////////////////////////////////
  181. int SceneGraphAnalyzer::
  182. get_num_points() const {
  183. return _num_points;
  184. }
  185. ////////////////////////////////////////////////////////////////////
  186. // Function: SceneGraphAnalyzer::get_num_individual_tris
  187. // Access: Published
  188. // Description:
  189. ////////////////////////////////////////////////////////////////////
  190. int SceneGraphAnalyzer::
  191. get_num_individual_tris() const {
  192. return _num_individual_tris;
  193. }
  194. ////////////////////////////////////////////////////////////////////
  195. // Function: SceneGraphAnalyzer::get_num_tristrips
  196. // Access: Published
  197. // Description:
  198. ////////////////////////////////////////////////////////////////////
  199. int SceneGraphAnalyzer::
  200. get_num_tristrips() const {
  201. return _num_tristrips;
  202. }
  203. ////////////////////////////////////////////////////////////////////
  204. // Function: SceneGraphAnalyzer::get_num_triangles_in_strips
  205. // Access: Published
  206. // Description:
  207. ////////////////////////////////////////////////////////////////////
  208. int SceneGraphAnalyzer::
  209. get_num_triangles_in_strips() const {
  210. return _num_triangles_in_strips;
  211. }
  212. ////////////////////////////////////////////////////////////////////
  213. // Function: SceneGraphAnalyzer::get_num_trifans
  214. // Access: Published
  215. // Description:
  216. ////////////////////////////////////////////////////////////////////
  217. int SceneGraphAnalyzer::
  218. get_num_trifans() const {
  219. return _num_trifans;
  220. }
  221. ////////////////////////////////////////////////////////////////////
  222. // Function: SceneGraphAnalyzer::get_num_triangles_in_fans
  223. // Access: Published
  224. // Description:
  225. ////////////////////////////////////////////////////////////////////
  226. int SceneGraphAnalyzer::
  227. get_num_triangles_in_fans() const {
  228. return _num_triangles_in_fans;
  229. }
  230. ////////////////////////////////////////////////////////////////////
  231. // Function: SceneGraphAnalyzer::get_texture_bytes
  232. // Access: Published
  233. // Description:
  234. ////////////////////////////////////////////////////////////////////
  235. int SceneGraphAnalyzer::
  236. get_texture_bytes() const {
  237. return _texture_bytes;
  238. }
  239. ////////////////////////////////////////////////////////////////////
  240. // Function: SceneGraphAnalyzer::get_num_long_normals
  241. // Access: Published
  242. // Description:
  243. ////////////////////////////////////////////////////////////////////
  244. int SceneGraphAnalyzer::
  245. get_num_long_normals() const {
  246. return _num_long_normals;
  247. }
  248. ////////////////////////////////////////////////////////////////////
  249. // Function: SceneGraphAnalyzer::get_num_short_normals
  250. // Access: Published
  251. // Description:
  252. ////////////////////////////////////////////////////////////////////
  253. int SceneGraphAnalyzer::
  254. get_num_short_normals() const {
  255. return _num_short_normals;
  256. }
  257. ////////////////////////////////////////////////////////////////////
  258. // Function: SceneGraphAnalyzer::get_total_normal_length
  259. // Access: Published
  260. // Description:
  261. ////////////////////////////////////////////////////////////////////
  262. float SceneGraphAnalyzer::
  263. get_total_normal_length() const {
  264. return _total_normal_length;
  265. }