SelectionBrush.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef SELECTIONBRUSH_H
  2. #define SELECTIONBRUSH_H
  3. /*************************************************************************************************\
  4. SelectionBrush.h : Interface for the SelectionBrush component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #ifndef BRUSH_H
  10. #include "Brush.h"
  11. #endif
  12. class ActionPaintTile;
  13. class ModifyBuildingAction;
  14. class EditorObject;
  15. class SelectionBrush: public Brush
  16. {
  17. public:
  18. SelectionBrush( bool Area, int radius );
  19. virtual ~SelectionBrush();
  20. virtual bool beginPaint();
  21. virtual Action* endPaint();
  22. virtual bool paint( Stuff::Vector3D& worldPos, int screenX, int screenY );
  23. virtual bool canPaint( Stuff::Vector3D& worldPos, int screenX, int screenY, int flags ) { return true; }
  24. virtual void render( int screenX, int screenY );
  25. bool paintSmooth( Stuff::Vector3D& worldPos, int screenX, int screenY, int radius );
  26. private:
  27. // suppressed
  28. SelectionBrush( const SelectionBrush& electionBrush );
  29. SelectionBrush& operator=( const SelectionBrush& electionBrush );
  30. static float calcNewHeight( int vertexRow, int vertexCol, float screenDeltaY );
  31. bool paintSmoothArea( Stuff::Vector3D& worldPos, int screenX, int screenY, float radiusX, float radiusY,
  32. int j, int i);
  33. Stuff::Vector4D lastPos;
  34. Stuff::Vector3D firstWorldPos;
  35. Stuff::Vector3D lastWorldPos;
  36. bool bPainting;
  37. bool bArea;
  38. bool bDrag;
  39. EditorObject* pDragBuilding;
  40. bool bFirstClick;
  41. int lastRow;
  42. int lastCol;
  43. ActionPaintTile* pCurAction;
  44. ModifyBuildingAction* pCurModifyBuildingAction;
  45. int smoothRadius;
  46. };
  47. //*************************************************************************************************
  48. #endif // end of file ( SelectionBrush.h )