Height brush tool. More...
#include <MeshMoldTool.h>
Inherits Tool.
Public Member Functions | |
| MeshMoldTool (void) | |
| Constructor. | |
| ~MeshMoldTool (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) |
| Track the mouse. | |
| virtual WorldHeightMapEdit * | getHeightMap (void) |
| virtual void | activate () |
| Become the current tool. | |
| virtual void | deactivate () |
| 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) |
Static Public Member Functions | |
| static void | apply (CWorldBuilderDoc *pDoc) |
| Apply the mesh to the terrain & execute undoable. | |
| static void | updateMeshLocation (Bool changePreview) |
| Update the mesh location onscreen. | |
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) |
Static Protected Member Functions | |
| static void | applyMesh (CWorldBuilderDoc *pDoc) |
| Apply the mesh to copy of terrain. | |
Protected Attributes | |
| CPoint | m_prevViewPt |
| Previous tracking location in view coords. | |
| Bool | m_offsettingZ |
| True if we are raising or lowering the mesh along z axis. | |
| Coord3D | m_prevDocPt |
| Previous tracking location in doc coords. | |
Protected Attributes inherited from Tool | |
| Int | m_toolID |
| Int | m_cursorID |
| HCURSOR | m_cursor |
| Int | m_prevXIndex |
| Int | m_prevYIndex |
Static Protected Attributes | |
| static Coord3D | m_toolPos |
| Current location of the mesh on the terrain. | |
| static Bool | m_tracking = false |
| True if we are tracking a mesh on screen. | |
| static WorldHeightMapEdit * | m_htMapEditCopy = NULL |
| ref counted. | |
Height brush tool.
MeshMoldTool Does the Mesh Mold tool operation.
Definition at line 35 of file MeshMoldTool.h.
| MeshMoldTool::MeshMoldTool | ( | void | ) |
Constructor.
Definition at line 47 of file MeshMoldTool.cpp.
| MeshMoldTool::~MeshMoldTool | ( | void | ) |
Destructor.
Definition at line 54 of file MeshMoldTool.cpp.
|
virtual |
Become the current tool.
Shows the mesh mold options panel.
Reimplemented from Tool.
Definition at line 61 of file MeshMoldTool.cpp.
|
static |
Apply the mesh to the terrain & execute undoable.
Apply the tool.
Apply the height mesh mold at the current point.
Definition at line 173 of file MeshMoldTool.cpp.
|
staticprotected |
Apply the mesh to copy of terrain.
Apply the tool.
Apply the height mesh mold at the current point.
Definition at line 185 of file MeshMoldTool.cpp.
|
virtual |
Become the current tool.
Shows the mesh mold options panel.
Reimplemented from Tool.
Definition at line 72 of file MeshMoldTool.cpp.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from Tool.
Definition at line 59 of file MeshMoldTool.h.
|
virtual |
Start tool.
Setup the tool to start mesh molding - make a copy of the height map to edit, another copy because we need it :), and call mouseMovedDown.
Reimplemented from Tool.
Definition at line 90 of file MeshMoldTool.cpp.
|
virtual |
|
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 117 of file MeshMoldTool.cpp.
|
static |
Update the mesh location onscreen.
Definition at line 145 of file MeshMoldTool.cpp.
|
staticprotected |
ref counted.
Definition at line 44 of file MeshMoldTool.h.
|
protected |
True if we are raising or lowering the mesh along z axis.
Definition at line 40 of file MeshMoldTool.h.
|
protected |
Previous tracking location in doc coords.
Definition at line 41 of file MeshMoldTool.h.
|
protected |
Previous tracking location in view coords.
Definition at line 39 of file MeshMoldTool.h.
|
staticprotected |
Current location of the mesh on the terrain.
Definition at line 42 of file MeshMoldTool.h.
True if we are tracking a mesh on screen.
Definition at line 43 of file MeshMoldTool.h.