Select tile tool. More...
#include <PolygonTool.h>
Inherits Tool.
Inherited by PointerTool, and WaterTool.
Public Member Functions | |
| PolygonTool (void) | |
| Constructor. | |
| ~PolygonTool (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) |
| Left button move code. | |
| virtual void | mouseUp (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| virtual void | setCursor (void) |
| virtual void | activate () |
| Become the current tool. | |
| virtual void | deactivate () |
| 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 Bool | followsTerrain (void) |
| Become not the current tool. | |
| virtual WorldHeightMapEdit * | getHeightMap (void) |
Static Public Member Functions | |
| static Bool | isActive (void) |
| static Bool | deleteSelectedPolygon (void) |
| Delete the selected polygon or point. | |
| static Bool | isSelected (PolygonTrigger *pTrig) |
| static Int | getSelectedPointNdx (void) |
| static PolygonTrigger * | pickPolygon (Coord3D loc, CPoint viewPt, WbView *pView) |
| static Bool | isSelectedOpen (void) |
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 Member Functions | |
| Bool | poly_snapToPoly (Coord3D *pLoc) |
| void | poly_pickOnMouseDown (CPoint viewPt, WbView *pView) |
| void | startMouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc) |
| Perform the tool behavior on mouse down. | |
Static Protected Member Functions | |
| static Int | poly_pickPoint (PolygonTrigger *pTrig, CPoint viewPt, WbView *pView) |
| static Int | poly_getInsertIndex (PolygonTrigger *pTrig, Coord3D loc) |
| static Bool | poly_pickPoly (PolygonTrigger *pTrig, Coord3D pLoc, Int tolerance) |
Protected Attributes | |
| Coord3D | m_poly_mouseDownPt |
| Coord3D | m_poly_unsnappedMouseDownPt |
| Bool | m_poly_isDraggingPoint |
| Bool | m_poly_justPicked |
| Bool | m_poly_mouseUpPlus |
| True if we are over the "Add point" hotspot. | |
| HCURSOR | m_poly_plusCursor |
| Bool | m_poly_mouseUpMove |
| True if we are over the "move" hotspot. | |
| HCURSOR | m_poly_moveCursor |
| MovePolygonUndoable * | m_poly_moveUndoable |
Protected Attributes inherited from Tool | |
| Int | m_toolID |
| Int | m_cursorID |
| HCURSOR | m_cursor |
| Int | m_prevXIndex |
| Int | m_prevYIndex |
Static Protected Attributes | |
| static Bool | m_poly_isAdding = false |
| static Int | m_poly_dragPointNdx = -1 |
| static Bool | m_poly_isActive = false |
| static PolygonTrigger * | m_poly_curSelectedPolygon = NULL |
Select tile tool.
PolygonTool Does the add/select polygon operation.
Definition at line 38 of file PolygonTool.h.
| PolygonTool::PolygonTool | ( | void | ) |
Constructor.
Definition at line 50 of file PolygonTool.cpp.
| PolygonTool::~PolygonTool | ( | void | ) |
Destructor.
Definition at line 60 of file PolygonTool.cpp.
|
virtual |
Become the current tool.
Shows the terrain materials options panel.
Reimplemented from Tool.
Reimplemented in PointerTool, and WaterTool.
Definition at line 85 of file PolygonTool.cpp.
|
virtual |
Become not the current tool.
Clears it's is active flag.
Reimplemented from Tool.
Reimplemented in PointerTool, and WaterTool.
Definition at line 71 of file PolygonTool.cpp.
|
static |
Delete the selected polygon or point.
Definition at line 355 of file PolygonTool.cpp.
|
inlinestatic |
Definition at line 74 of file PolygonTool.h.
|
inlinestatic |
Definition at line 71 of file PolygonTool.h.
|
inlinestatic |
Definition at line 73 of file PolygonTool.h.
|
inlinestatic |
Definition at line 76 of file PolygonTool.h.
|
virtual |
Perform tool on mouse down.
Perform the tool behavior on mouse down.
Reimplemented from Tool.
Reimplemented in PointerTool, and WaterTool.
Definition at line 276 of file PolygonTool.cpp.
|
virtual |
Left button move code.
Reimplemented from Tool.
Reimplemented in PointerTool, and WaterTool.
Definition at line 413 of file PolygonTool.cpp.
|
virtual |
Mouse up - not much.
Reimplemented from Tool.
Reimplemented in PointerTool, and WaterTool.
Definition at line 464 of file PolygonTool.cpp.
|
static |
Definition at line 129 of file PolygonTool.cpp.
|
staticprotected |
Definition at line 203 of file PolygonTool.cpp.
|
protected |
Do the pick on poly triggers.
Definition at line 244 of file PolygonTool.cpp.
|
staticprotected |
Definition at line 178 of file PolygonTool.cpp.
|
staticprotected |
Definition at line 100 of file PolygonTool.cpp.
Definition at line 156 of file PolygonTool.cpp.
|
virtual |
Set the cursor.
Reimplemented from Tool.
Reimplemented in PointerTool, and WaterTool.
Definition at line 393 of file PolygonTool.cpp.
|
protected |
Perform the tool behavior on mouse down.
Definition at line 291 of file PolygonTool.cpp.
|
staticprotected |
Definition at line 60 of file PolygonTool.h.
|
staticprotected |
Definition at line 58 of file PolygonTool.h.
Definition at line 59 of file PolygonTool.h.
Definition at line 57 of file PolygonTool.h.
|
protected |
Definition at line 47 of file PolygonTool.h.
|
protected |
Definition at line 48 of file PolygonTool.h.
|
protected |
Definition at line 45 of file PolygonTool.h.
|
protected |
True if we are over the "move" hotspot.
Definition at line 52 of file PolygonTool.h.
|
protected |
True if we are over the "Add point" hotspot.
Definition at line 50 of file PolygonTool.h.
|
protected |
Definition at line 53 of file PolygonTool.h.
|
protected |
Definition at line 55 of file PolygonTool.h.
|
protected |
Definition at line 51 of file PolygonTool.h.
|
protected |
Definition at line 46 of file PolygonTool.h.