#include <Tool.h>
Inherited by AutoEdgeOutTool, BlendEdgeTool, BorderTool, BrushTool, BuildListTool, EyedropperTool, FeatherTool, FenceTool, FloodFillTool, GroveTool, HandScrollTool, MeshMoldTool, MoundTool, ObjectTool, PolygonTool, RampTool, RoadTool, RulerTool, ScorchTool, TileTool, and WaypointTool.
|
| | Tool (Int toolID, Int cursorID) |
| | Tool class.
|
| |
| virtual | ~Tool (void) |
| | Destructor.
|
| |
| Int | getToolID (void) |
| |
| virtual void | setCursor (void) |
| |
| virtual void | activate () |
| | Become the current tool.
|
| |
| virtual void | deactivate () |
| |
| virtual Bool | followsTerrain (void) |
| | Become not the current tool.
|
| |
| virtual void | mouseMoved (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| | True if the tool tracks the terrain, generally false if it modifies the terrain heights.
|
| |
| virtual void | mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| |
| virtual void | mouseUp (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| |
| virtual WorldHeightMapEdit * | getHeightMap (void) |
| |
|
| 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) |
| |
Definition at line 56 of file Tool.h.
◆ Tool()
| Tool::Tool |
( |
Int | toolID, |
|
|
Int | cursorID ) |
◆ ~Tool()
Destructor.
Definition at line 44 of file Tool.cpp.
◆ activate()
Become the current tool.
Shows the "no options" options panel.
Reimplemented in AutoEdgeOutTool, BigTileTool, BorderTool, BrushTool, BuildListTool, EyedropperTool, FeatherTool, FenceTool, FloodFillTool, GroveTool, HandScrollTool, MeshMoldTool, MoundTool, ObjectTool, PointerTool, PolygonTool, RampTool, RoadTool, RulerTool, ScorchTool, TileTool, WaterTool, and WaypointTool.
Definition at line 53 of file Tool.cpp.
◆ calcRoundBlendFactor()
| Real Tool::calcRoundBlendFactor |
( |
CPoint | center, |
|
|
Int | x, |
|
|
Int | y, |
|
|
Int | brushWidth, |
|
|
Int | featherWidth ) |
|
static |
Calculate the round blend factor.
Calculates the blend amount of the brush. 1.0 means the brush sets the height, 0.0 means no change, and between blends proportionally.
Definition at line 71 of file Tool.cpp.
◆ calcSquareBlendFactor()
| Real Tool::calcSquareBlendFactor |
( |
CPoint | center, |
|
|
Int | x, |
|
|
Int | y, |
|
|
Int | brushWidth, |
|
|
Int | featherWidth ) |
|
static |
Calculate the square blend factor.
Calculates the blend amount of the brush. 1.0 means the brush sets the height, 0.0 means no change, and between blends proportionally.
Definition at line 100 of file Tool.cpp.
◆ deactivate()
| virtual void Tool::deactivate |
( |
| ) |
|
|
inlinevirtual |
Reimplemented in BorderTool, BuildListTool, FenceTool, MeshMoldTool, ObjectTool, PointerTool, PolygonTool, RampTool, RulerTool, ScorchTool, WaterTool, and WaypointTool.
Definition at line 74 of file Tool.h.
◆ followsTerrain()
| virtual Bool Tool::followsTerrain |
( |
void | | ) |
|
|
inlinevirtual |
◆ getAllIndexesIn()
◆ getCenterIndex()
Gets the cell index for the center of the brush.
Converts from document coordinates to cell index coordinates.
Definition at line 128 of file Tool.cpp.
◆ getHeightMap()
◆ getToolID()
| Int Tool::getToolID |
( |
void | | ) |
|
|
inline |
◆ mouseDown()
Reimplemented in AutoEdgeOutTool, BlendEdgeTool, BorderTool, BrushTool, BuildListTool, EyedropperTool, FeatherTool, FenceTool, GroveTool, HandScrollTool, MeshMoldTool, MoundTool, ObjectTool, PointerTool, PolygonTool, RampTool, RoadTool, RulerTool, ScorchTool, TileTool, WaterTool, and WaypointTool.
Definition at line 79 of file Tool.h.
◆ mouseMoved()
True if the tool tracks the terrain, generally false if it modifies the terrain heights.
Reimplemented in BorderTool, BrushTool, BuildListTool, FeatherTool, FenceTool, GroveTool, HandScrollTool, MeshMoldTool, MoundTool, ObjectTool, PointerTool, PolygonTool, RampTool, RoadTool, RulerTool, ScorchTool, TileTool, WaterTool, and WaypointTool.
Definition at line 78 of file Tool.h.
◆ mouseUp()
Reimplemented in BlendEdgeTool, BorderTool, BrushTool, BuildListTool, FeatherTool, FenceTool, FloodFillTool, GroveTool, HandScrollTool, MeshMoldTool, MoundTool, ObjectTool, PointerTool, PolygonTool, RampTool, RoadTool, ScorchTool, TileTool, WaterTool, and WaypointTool.
Definition at line 80 of file Tool.h.
◆ setCursor()
| void Tool::setCursor |
( |
void | | ) |
|
|
virtual |
◆ m_cursor
◆ m_cursorID
◆ m_prevXIndex
◆ m_prevYIndex
◆ m_toolID
The documentation for this class was generated from the following files:
- Code/Tools/WorldBuilder/include/Tool.h
- Code/Tools/WorldBuilder/src/Tool.cpp