windowFramework.I 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // Filename: windowFramework.I
  2. // Created by: drose (02Apr02)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. ////////////////////////////////////////////////////////////////////
  19. // Function: WindowFramework::get_panda_framework
  20. // Access: Public
  21. // Description: Returns a pointer to the associated PandaFramework
  22. // object.
  23. ////////////////////////////////////////////////////////////////////
  24. INLINE PandaFramework *WindowFramework::
  25. get_panda_framework() const {
  26. return _panda_framework;
  27. }
  28. ////////////////////////////////////////////////////////////////////
  29. // Function: WindowFramework::get_graphics_window
  30. // Access: Public
  31. // Description: Returns a pointer to the underlying GraphicsWindow
  32. // object.
  33. ////////////////////////////////////////////////////////////////////
  34. INLINE GraphicsWindow *WindowFramework::
  35. get_graphics_window() const {
  36. return _window;
  37. }
  38. ////////////////////////////////////////////////////////////////////
  39. // Function: WindowFramework::get_num_cameras
  40. // Access: Public
  41. // Description: Returns the number of 3-d cameras associated with the
  42. // window. A window usually has only one camera, but it
  43. // may have multiple cameras if there are multiple
  44. // display regions within the window.
  45. ////////////////////////////////////////////////////////////////////
  46. INLINE int WindowFramework::
  47. get_num_cameras() const {
  48. return _cameras.size();
  49. }
  50. ////////////////////////////////////////////////////////////////////
  51. // Function: WindowFramework::get_camera
  52. // Access: Public
  53. // Description: Returns the nth camera associated with the window.
  54. ////////////////////////////////////////////////////////////////////
  55. INLINE Camera *WindowFramework::
  56. get_camera(int n) const {
  57. nassertr(n >= 0 && n < (int)_cameras.size(), NULL);
  58. return _cameras[n];
  59. }
  60. ////////////////////////////////////////////////////////////////////
  61. // Function: WindowFramework::get_wireframe
  62. // Access: Public
  63. // Description: Returns the current state of the wireframe flag.
  64. ////////////////////////////////////////////////////////////////////
  65. INLINE bool WindowFramework::
  66. get_wireframe() const {
  67. return _wireframe_enabled;
  68. }
  69. ////////////////////////////////////////////////////////////////////
  70. // Function: WindowFramework::get_texture
  71. // Access: Public
  72. // Description: Returns the current state of the texture flag.
  73. ////////////////////////////////////////////////////////////////////
  74. INLINE bool WindowFramework::
  75. get_texture() const {
  76. return _texture_enabled;
  77. }
  78. ////////////////////////////////////////////////////////////////////
  79. // Function: WindowFramework::get_two_sided
  80. // Access: Public
  81. // Description: Returns the current state of the two_sided flag.
  82. ////////////////////////////////////////////////////////////////////
  83. INLINE bool WindowFramework::
  84. get_two_sided() const {
  85. return _two_sided_enabled;
  86. }
  87. ////////////////////////////////////////////////////////////////////
  88. // Function: WindowFramework::get_one_sided_reverse
  89. // Access: Public
  90. // Description: Returns the current state of the one_sided_reverse flag.
  91. ////////////////////////////////////////////////////////////////////
  92. INLINE bool WindowFramework::
  93. get_one_sided_reverse() const {
  94. return _one_sided_reverse_enabled;
  95. }
  96. ////////////////////////////////////////////////////////////////////
  97. // Function: WindowFramework::get_lighting
  98. // Access: Public
  99. // Description: Returns the current state of the lighting flag.
  100. ////////////////////////////////////////////////////////////////////
  101. INLINE bool WindowFramework::
  102. get_lighting() const {
  103. return _lighting_enabled;
  104. }
  105. ////////////////////////////////////////////////////////////////////
  106. // Function: WindowFramework::get_background_type
  107. // Access: Public
  108. // Description: Returns the current background type setting.
  109. ////////////////////////////////////////////////////////////////////
  110. INLINE WindowFramework::BackgroundType WindowFramework::
  111. get_background_type() const {
  112. return _background_type;
  113. }