Add a grove of trees tool. More...
#include <GroveTool.h>
Inherits Tool.
Public Member Functions | |
| GroveTool (void) | |
| Constructor. | |
| ~GroveTool (void) | |
| Destructor. | |
| virtual void | mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| Perform tool on mouse down. | |
| virtual void | mouseUp (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| 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. | |
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 () |
| virtual Bool | followsTerrain (void) |
| Become not the current tool. | |
| virtual WorldHeightMapEdit * | getHeightMap (void) |
Protected Types | |
| enum | { HYSTERESIS = 3 } |
Protected Member Functions | |
| void | plantTree (Coord3D *pos) |
| void | plantShrub (Coord3D *pos) |
| void | plantGrove (Coord3D pos, Coord3D prevDir, Real baseHeight, Int level, CPoint bounds) |
| void | _plantGroveInBox (CPoint tl, CPoint br, WbView *pView) |
| void | addObj (Coord3D *pos, AsciiString name) |
| void | activate () |
| Become the current tool. | |
Protected Attributes | |
| CPoint | m_downPt |
| Bool | m_dragging |
| MapObject * | m_headMapObj |
Protected Attributes inherited from Tool | |
| Int | m_toolID |
| Int | m_cursorID |
| HCURSOR | m_cursor |
| Int | m_prevXIndex |
| Int | m_prevYIndex |
Additional Inherited Members | |
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) |
Add a grove of trees tool.
GroveTool Does the add a grove of trees tool operation.
Definition at line 37 of file GroveTool.h.
|
protected |
| Enumerator | |
|---|---|
| HYSTERESIS | |
Definition at line 40 of file GroveTool.h.
| GroveTool::GroveTool | ( | void | ) |
Constructor.
Definition at line 238 of file GroveTool.cpp.
| GroveTool::~GroveTool | ( | void | ) |
Destructor.
Definition at line 245 of file GroveTool.cpp.
|
protected |
Definition at line 114 of file GroveTool.cpp.
|
protectedvirtual |
Become the current tool.
Shows the "no options" options panel.
Reimplemented from Tool.
Definition at line 100 of file GroveTool.cpp.
|
protected |
Definition at line 336 of file GroveTool.cpp.
|
virtual |
Perform tool on mouse down.
Execute the tool on mouse down - Place an object.
Reimplemented from Tool.
Definition at line 253 of file GroveTool.cpp.
|
virtual |
True if the tool tracks the terrain, generally false if it modifies the terrain heights.
Reimplemented from Tool.
Definition at line 312 of file GroveTool.cpp.
|
virtual |
Execute the tool on mouse up - Place an object.
Reimplemented from Tool.
Definition at line 261 of file GroveTool.cpp.
|
protected |
Plant a grove of trees, recursively. Given a "seed location", create child trees nearby, and recursively call the grove function on those children.
Definition at line 169 of file GroveTool.cpp.
|
protected |
Definition at line 108 of file GroveTool.cpp.
|
protected |
Definition at line 77 of file GroveTool.cpp.
|
protected |
Definition at line 41 of file GroveTool.h.
|
protected |
Definition at line 42 of file GroveTool.h.
|
protected |
Definition at line 43 of file GroveTool.h.