Height brush tool. More...
#include <BrushTool.h>
Inherits Tool.
Public Member Functions | |
| BrushTool (void) | |
| Constructor. | |
| ~BrushTool (void) | |
| Destructor. | |
| virtual void | mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| Start tool. | |
| virtual void | mouseUp (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| End tool. | |
| virtual void | mouseMoved (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| Execute the tool. | |
| virtual WorldHeightMapEdit * | getHeightMap (void) |
| virtual void | activate () |
| Become the current tool. | |
| virtual Bool | followsTerrain (void) |
| Become not the current tool. | |
Public Member Functions inherited from Tool | |
| Tool (Int toolID, Int cursorID) | |
| Tool class. | |
| virtual | ~Tool (void) |
| Destructor. | |
| Int | getToolID (void) |
| virtual void | setCursor (void) |
| virtual void | deactivate () |
Static Public Member Functions | |
| static Int | getWidth (void) |
| static Int | getFeather (void) |
| Returns width. | |
| static Int | getHeight (void) |
| Returns feather. | |
| static void | setWidth (Int width) |
| Returns height. | |
| static void | setFeather (Int feather) |
| Set the brush feather and notify the height options panel of the change. | |
| static void | setHeight (Int height) |
| Set the brush height and notify the height options panel of the change. | |
Static Public Member Functions inherited from Tool | |
| static Real | calcRoundBlendFactor (CPoint center, Int x, Int y, Int brushWidth, Int featherWidth) |
| Calculate the round blend factor. | |
| static Real | calcSquareBlendFactor (CPoint center, Int x, Int y, Int brushWidth, Int featherWidth) |
| Calculate the square blend factor. | |
| static void | getCenterIndex (Coord3D *docLocP, Int brushWidth, CPoint *center, CWorldBuilderDoc *pDoc) |
| Gets the cell index for the center of the brush. | |
| static void | getAllIndexesIn (const Coord3D *bl, const Coord3D *br, const Coord3D *tl, const Coord3D *tr, Int widthOutside, CWorldBuilderDoc *pDoc, VecHeightMapIndexes *allIndices) |
Protected Attributes | |
| WorldHeightMapEdit * | m_htMapEditCopy |
| ref counted. | |
| WorldHeightMapEdit * | m_htMapFeatherCopy |
| ref counted. | |
Protected Attributes inherited from Tool | |
| Int | m_toolID |
| Int | m_cursorID |
| HCURSOR | m_cursor |
| Int | m_prevXIndex |
| Int | m_prevYIndex |
Static Protected Attributes | |
| static Int | m_brushWidth |
| static Int | m_brushFeather |
| static Bool | m_brushSquare |
| static Int | m_brushHeight |
Height brush tool.
BrushTool Does the Height Brush tool operation.
Definition at line 35 of file BrushTool.h.
| BrushTool::BrushTool | ( | void | ) |
Constructor.
Definition at line 46 of file BrushTool.cpp.
| BrushTool::~BrushTool | ( | void | ) |
Destructor.
Definition at line 59 of file BrushTool.cpp.
|
virtual |
Become the current tool.
Shows the brush options panel.
Reimplemented from Tool.
Definition at line 98 of file BrushTool.cpp.
|
inlinevirtual |
|
inlinestatic |
Returns width.
Definition at line 52 of file BrushTool.h.
|
inlinestatic |
Returns feather.
Definition at line 53 of file BrushTool.h.
|
inlinevirtual |
Reimplemented from Tool.
Definition at line 62 of file BrushTool.h.
|
inlinestatic |
Definition at line 51 of file BrushTool.h.
|
virtual |
Start tool.
Setup the tool to start brushing - make a copy of the height map to edit, another copy because we need it :), and call mouseMovedDown.
Reimplemented from Tool.
Definition at line 108 of file BrushTool.cpp.
|
virtual |
Execute the tool.
Apply the height brush at the current point.
Reimplemented from Tool.
Definition at line 139 of file BrushTool.cpp.
|
virtual |
End tool.
Finish the tool operation - create a command, pass it to the doc to execute, and cleanup ref'd objects.
Reimplemented from Tool.
Definition at line 126 of file BrushTool.cpp.
|
static |
Set the brush feather and notify the height options panel of the change.
Definition at line 87 of file BrushTool.cpp.
|
static |
Set the brush height and notify the height options panel of the change.
Definition at line 66 of file BrushTool.cpp.
|
static |
Returns height.
Set the brush width and notify the height options panel of the change.
Definition at line 76 of file BrushTool.cpp.
|
staticprotected |
Definition at line 42 of file BrushTool.h.
|
staticprotected |
Definition at line 44 of file BrushTool.h.
|
staticprotected |
Definition at line 43 of file BrushTool.h.
|
staticprotected |
Definition at line 41 of file BrushTool.h.
|
protected |
ref counted.
Definition at line 38 of file BrushTool.h.
|
protected |
ref counted.
Definition at line 39 of file BrushTool.h.