layer.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. ** Command & Conquer Generals(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : WW3D *
  23. * *
  24. * $Archive:: /VSS_Sync/ww3d2/layer.h $*
  25. * *
  26. * $Author:: Vss_sync $*
  27. * *
  28. * $Modtime:: 8/29/01 7:29p $*
  29. * *
  30. * $Revision:: 2 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if defined(_MSC_VER)
  36. #pragma once
  37. #endif
  38. #ifndef LAYER_H
  39. #define LAYER_H
  40. #include "always.h"
  41. #include "listnode.h"
  42. #include "vector3.h"
  43. class SceneClass;
  44. class CameraClass;
  45. class LayerClass;
  46. typedef Node<LayerClass *> LayerNodeClass;
  47. class LayerClass : public LayerNodeClass
  48. {
  49. public:
  50. LayerClass(void);
  51. LayerClass(SceneClass * s,CameraClass * c,bool clear = false,bool clearz = false,const Vector3 & color = Vector3(0,0,0));
  52. LayerClass(const LayerClass & src);
  53. ~LayerClass(void);
  54. /*
  55. ** The following functions will handle the references of the Scene and Camera
  56. ** objects properly.
  57. */
  58. void Set_Scene(SceneClass * scene);
  59. SceneClass * Get_Scene(void) const;
  60. SceneClass * Peek_Scene(void) const;
  61. void Set_Camera(CameraClass * cam);
  62. CameraClass * Get_Camera(void) const;
  63. CameraClass * Peek_Camera(void) const;
  64. // [SKB: Aug 14 2001 @ 1:53pm] :
  65. // Add a method to copy one layer to another - I would like to create an assignment
  66. // operator but it could break old code.
  67. void Set(const LayerClass & layer);
  68. /*
  69. ** LayerClass members are public since this is a "lightweight" class
  70. */
  71. bool Clear;
  72. bool ClearZ;
  73. Vector3 ClearColor;
  74. SceneClass * Scene;
  75. CameraClass * Camera;
  76. };
  77. typedef List<LayerClass *> LayerListClass;
  78. #endif //LAYER_H