polyinfo.h 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. ** Command & Conquer Generals Zero Hour(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:: /Commando/Code/ww3d2/polyinfo.h $*
  25. * *
  26. * $Author:: Greg_h $*
  27. * *
  28. * $Modtime:: 2/07/01 12:48p $*
  29. * *
  30. * $Revision:: 2 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef POLYINFO_H
  36. #define POLYINFO_H
  37. #if _MSC_VER >= 1000
  38. #pragma once
  39. #endif // _MSC_VER >= 1000
  40. class TextureClass;
  41. class VertexMaterialClass;
  42. class ShaderClass;
  43. /**
  44. ** PolyInfo.h
  45. **
  46. ** This class is a simple storage class that keeps track of a texture, vertex material
  47. ** and a shader.
  48. **
  49. */
  50. class PolygonInfoClass
  51. {
  52. public:
  53. TextureClass * Peek_Texture() const { return Texture; }
  54. VertexMaterialClass * Peek_Vertex_Material() const { return VertexMaterial; }
  55. ShaderClass * Peek_Shader() const { return Shader; }
  56. void Set_Texture(TextureClass *texture);
  57. void Set_Vertex_Material(VertexMaterialClass *vertexMaterial);
  58. void Set_Shader(ShaderClass *shader);
  59. void Set(TextureClass *texture, VertexMaterialClass *vertexMaterial, ShaderClass *shader)
  60. {
  61. Set_Texture(texture);
  62. Set_Vertex_Material(vertexMaterial);
  63. Set_Shader(shader);
  64. }
  65. PolygonInfoClass(TextureClass *texture = 0, VertexMaterialClass *vertexMaterial = 0, ShaderClass *shader = 0)
  66. : Texture(0), VertexMaterial(0), Shader(0)
  67. {
  68. Set(texture, vertexMaterial, shader);
  69. }
  70. ~PolygonInfoClass();
  71. protected:
  72. TextureClass *Texture;
  73. VertexMaterialClass *VertexMaterial;
  74. ShaderClass *Shader;
  75. };
  76. #endif