Brush.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //----------------------------------------------------------------------------
  2. //
  3. // Brush.h - header file for the abstract base class that all brush objects should
  4. // derive from
  5. //
  6. //---------------------------------------------------------------------------//
  7. // Copyright (C) Microsoft Corporation. All rights reserved. //
  8. //===========================================================================//
  9. #ifndef BRUSH_H_
  10. #define BRUSH_H_
  11. class Action;
  12. class Map;
  13. #include "mclib.h"
  14. class Brush
  15. {
  16. public:
  17. Brush(){}
  18. virtual ~Brush(){}
  19. virtual bool beginPaint() = 0;
  20. virtual Action* endPaint() = 0;
  21. virtual bool paint( Stuff::Vector3D& worldPos, int screenX, int screenY ) = 0;
  22. virtual bool canPaint( Stuff::Vector3D& worldPos, int screenX, int screenY, int flags ) { return true; }
  23. virtual bool canPaintSelection( ){ return true; }
  24. virtual Action* applyToSelection(){ return NULL;}
  25. virtual void render( int screenX, int screenY ){}
  26. virtual void update( int screenX, int screenY ){}
  27. private:
  28. };
  29. #endif // BRUSH_H_