WBHeightMap.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #ifndef __WBHEIGHTMAP_H_
  19. #define __WBHEIGHTMAP_H_
  20. #include "W3DDevice/GameClient/FlatHeightMap.h"
  21. #include "W3DDevice/GameClient/HeightMap.h"
  22. #define dont_USE_FLAT_HEIGHT_MAP // Use the origina height map for mission disk. jba. [4/15/2003]
  23. #ifdef USE_FLAT_HEIGHT_MAP
  24. class WBHeightMap : public FlatHeightMapRenderObjClass
  25. #else
  26. class WBHeightMap : public HeightMapRenderObjClass
  27. #endif
  28. {
  29. public:
  30. WBHeightMap(void);
  31. /////////////////////////////////////////////////////////////////////////////
  32. // Render Object Interface (W3D methods)
  33. /////////////////////////////////////////////////////////////////////////////
  34. virtual void Render(RenderInfoClass & rinfo);
  35. virtual Bool Cast_Ray(RayCollisionTestClass & raytest);
  36. virtual Real getHeightMapHeight(Real x, Real y, Coord3D* normal); ///<return height and normal at given point
  37. virtual Real getMaxCellHeight(Real x, Real y); ///< returns maximum height of the 4 cell corners.
  38. void setDrawEntireMap(Bool entire) {m_drawEntireMap = entire;};
  39. Bool getDrawEntireMap(void) {return m_drawEntireMap;};
  40. void setFlattenHeights(Bool flat);
  41. protected:
  42. void flattenHeights(void);
  43. protected:
  44. Bool m_drawEntireMap;
  45. Bool m_flattenHeights;
  46. };
  47. #endif // end __WBHEIGHTMAP_H_