| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "imousetool.h" |
| 4 |
#include "iorthoview.h" |
| 5 |
#include "inode.h" |
| 6 |
#include "math/Vector3.h" |
| 7 |
|
| 8 |
namespace ui |
| 9 |
{ |
| 10 |
|
| 11 |
/** |
| 12 |
* This tool provides the drag-to-create-a-brush functionality. |
| 13 |
* It is working on the orthoviews only. |
| 14 |
*/ |
| 15 |
class BrushCreatorTool : |
| 16 |
public MouseTool |
| 17 |
{ |
| 18 |
private: |
| 19 |
scene::INodePtr _brush; |
| 20 |
Vector3 _startPos; |
| 21 |
|
| 22 |
public: |
| 23 |
const std::string& getName() override; |
| 24 |
const std::string& getDisplayName() override; |
| 25 |
|
| 26 |
Result onMouseDown(Event& ev) override; |
| 27 |
Result onMouseMove(Event& ev) override; |
| 28 |
Result onMouseUp(Event& ev) override; |
| 29 |
|
| 30 |
unsigned int getPointerMode() override; |
| 31 |
unsigned int getRefreshMode() override; |
| 32 |
Result onCancel(IInteractiveView& view) override; |
| 33 |
void onMouseCaptureLost(IInteractiveView& view) override; |
| 34 |
}; |
| 35 |
|
| 36 |
} // namespace |