WBHeightMap.h 1.7 KB

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