RampTool.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. // FILE: RampTool.h
  19. /*---------------------------------------------------------------------------*/
  20. /* EA Pacific */
  21. /* Confidential Information */
  22. /* Copyright (C) 2001 - All Rights Reserved */
  23. /* DO NOT DISTRIBUTE */
  24. /*---------------------------------------------------------------------------*/
  25. /* Project: RTS3 */
  26. /* File name: RampTool.h */
  27. /* Created: John K. McDonald, Jr., 4/19/2002 */
  28. /* Desc: // The ramp tool for the developers. */
  29. /* Revision History: */
  30. /* 4/19/2002 : Initial creation */
  31. /*---------------------------------------------------------------------------*/
  32. #pragma once
  33. #ifndef _H_RAMPTOOL_
  34. #define _H_RAMPTOOL_
  35. // INCLUDES ///////////////////////////////////////////////////////////////////
  36. #include "Tool.h"
  37. // DEFINES ////////////////////////////////////////////////////////////////////
  38. // TYPE DEFINES ///////////////////////////////////////////////////////////////
  39. // FORWARD DECLARATIONS ///////////////////////////////////////////////////////
  40. class RampTool : public Tool
  41. {
  42. Coord3D mStartPoint;
  43. Coord3D mEndPoint;
  44. Coord3D mCurvePoint;
  45. Bool mIsMouseDown;
  46. public:
  47. RampTool();
  48. virtual void activate();
  49. virtual void deactivate(); ///< Become not the current tool.
  50. virtual Bool followsTerrain(void);
  51. virtual void mouseMoved(TTrackingMode m, CPoint viewPt, WbView* pView, CWorldBuilderDoc *pDoc);
  52. virtual void mouseDown(TTrackingMode m, CPoint viewPt, WbView* pView, CWorldBuilderDoc *pDoc);
  53. virtual void mouseUp(TTrackingMode m, CPoint viewPt, WbView* pView, CWorldBuilderDoc *pDoc);
  54. protected:
  55. void drawFeedback(Coord3D* endPoint);
  56. void applyRamp(CWorldBuilderDoc* pDoc);
  57. };
  58. #endif /* _H_RAMPTOOL_ */