FlattenBrush.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef FLATTENBRUSH_H
  2. #define FLATTENBRUSH_H
  3. /*************************************************************************************************\
  4. FlattenBrush.h : Interface for the FlattenBrush component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #ifndef BRUSH_H
  10. #include "Brush.h"
  11. #endif
  12. #ifndef ACTION_H
  13. #include "Action.h"
  14. #endif
  15. //*************************************************************************************************
  16. /**************************************************************************************************
  17. CLASS DESCRIPTION
  18. FlattenBrush:
  19. **************************************************************************************************/
  20. class FlattenBrush: public Brush
  21. {
  22. public:
  23. FlattenBrush();
  24. virtual ~FlattenBrush();
  25. virtual bool beginPaint();
  26. virtual Action* endPaint();
  27. virtual bool paint( Stuff::Vector3D& worldPos, int screenX, int screenY );
  28. virtual bool canPaint( Stuff::Vector3D& worldPos, int screenX, int screenY, int flags ) { return true; }
  29. virtual bool canPaintSelection( ){ return true; }
  30. virtual Action* applyToSelection();
  31. Action* applyHeightToSelection( float height );
  32. float getAverageHeightOfSelection( );
  33. private:
  34. ActionPaintTile* pCurAction;
  35. void flattenVertex( int row, int col, float val );
  36. };
  37. //*************************************************************************************************
  38. #endif // end of file ( FLATTENBRUSH_H.h )