Road segment tool. More...
#include <RoadTool.h>
Inherits Tool.
Public Member Functions | |
| RoadTool (void) | |
| Constructor. | |
| ~RoadTool (void) | |
| Destructor. | |
| virtual void | mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| Perform tool on mouse down. | |
| virtual void | mouseMoved (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| virtual void | mouseUp (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| virtual void | activate () |
| Become 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 () |
| virtual Bool | followsTerrain (void) |
| Become not the current tool. | |
| virtual WorldHeightMapEdit * | getHeightMap (void) |
Static Public Member Functions | |
| static Bool | snap (Coord3D *pLoc, Bool skipLast) |
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 Types | |
| enum | { HYSTERESIS = 3 , MIN_LENGTH = 4 } |
Protected Attributes | |
| MapObject * | m_mapObj |
Protected Attributes inherited from Tool | |
| Int | m_toolID |
| Int | m_cursorID |
| HCURSOR | m_cursor |
| Int | m_prevXIndex |
| Int | m_prevYIndex |
Road segment tool.
RoadTool Does the Add a section of road tool operation.
Definition at line 37 of file RoadTool.h.
|
protected |
| Enumerator | |
|---|---|
| HYSTERESIS | |
| MIN_LENGTH | |
Definition at line 40 of file RoadTool.h.
| RoadTool::RoadTool | ( | void | ) |
Constructor.
Definition at line 43 of file RoadTool.cpp.
| RoadTool::~RoadTool | ( | void | ) |
Destructor.
Definition at line 50 of file RoadTool.cpp.
|
virtual |
Become the current tool.
Shows the road options panel.
Reimplemented from Tool.
Definition at line 150 of file RoadTool.cpp.
|
virtual |
Perform tool on mouse down.
Execute the tool on mouse up - Place a road segment.
Reimplemented from Tool.
Definition at line 159 of file RoadTool.cpp.
|
virtual |
Move the end of the road segment.
Reimplemented from Tool.
Definition at line 306 of file RoadTool.cpp.
|
virtual |
Reimplemented from Tool.
Definition at line 336 of file RoadTool.cpp.
Snaps pLoc to another road endpoint if close enough.
Definition at line 105 of file RoadTool.cpp.
|
protected |
Definition at line 42 of file RoadTool.h.