Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
PointerTool Class Reference

Blend edges out tool. More...

#include <PointerTool.h>

Inherits PolygonTool.

Public Member Functions

 PointerTool (void)
 Constructor.
 
 ~PointerTool (void)
 Destructor.
 
virtual void activate ()
 Clear the selection on activate or deactivate.
 
virtual void deactivate ()
 deactivate.
 
virtual void setCursor (void)
 
virtual void mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 
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)
 
- Public Member Functions inherited from PolygonTool
 PolygonTool (void)
 Constructor.
 
 ~PolygonTool (void)
 Destructor.
 
- 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 WorldHeightMapEditgetHeightMap (void)
 

Static Public Member Functions

static void clearSelection (void)
 Clears the selected objects selected flags.
 
static Bool allowPick (MapObject *pMapObj, WbView *pView)
 
- Static Public Member Functions inherited from PolygonTool
static Bool isActive (void)
 
static Bool deleteSelectedPolygon (void)
 Delete the selected polygon or point.
 
static Bool isSelected (PolygonTrigger *pTrig)
 
static Int getSelectedPointNdx (void)
 
static PolygonTriggerpickPolygon (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 Types

enum  { HYSTERESIS = 3 }
 

Protected Member Functions

void checkForPropertiesPanel (void)
 See if a single obj is selected that has properties.
 
- Protected Member Functions inherited from PolygonTool
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.
 

Protected Attributes

CPoint m_downPt2d
 
Coord3D m_downPt3d
 
MapObjectm_curObject
 
Bool m_moving
 True if we are drag moving an object.
 
Bool m_rotating
 True if we are rotating an object.
 
Bool m_dragSelect
 True if we are drag selecting.
 
Bool m_doPolyTool
 True if we are using the polygon tool to modify a polygon triggter.
 
ModifyObjectUndoablem_modifyUndoable
 The modify undoable that is in progress while we track the mouse.
 
Bool m_mouseUpRotate
 True if we are over the "rotate" hotspot.
 
HCURSOR m_rotateCursor
 
Bool m_mouseUpMove
 True if we are over the "move" hotspot.
 
HCURSOR m_moveCursor
 
- Protected Attributes inherited from PolygonTool
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
 
MovePolygonUndoablem_poly_moveUndoable
 
- Protected Attributes inherited from Tool
Int m_toolID
 
Int m_cursorID
 
HCURSOR m_cursor
 
Int m_prevXIndex
 
Int m_prevYIndex
 

Additional Inherited Members

- Static Protected Member Functions inherited from PolygonTool
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)
 
- Static Protected Attributes inherited from PolygonTool
static Bool m_poly_isAdding = false
 
static Int m_poly_dragPointNdx = -1
 
static Bool m_poly_isActive = false
 
static PolygonTriggerm_poly_curSelectedPolygon = NULL
 

Detailed Description

Blend edges out tool.

PointerTool Does the select/move tool operation.

Definition at line 38 of file PointerTool.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
HYSTERESIS 

Definition at line 41 of file PointerTool.h.

Constructor & Destructor Documentation

◆ PointerTool()

PointerTool::PointerTool ( void )

Constructor.

Definition at line 90 of file PointerTool.cpp.

◆ ~PointerTool()

PointerTool::~PointerTool ( void )

Destructor.

Definition at line 102 of file PointerTool.cpp.

Member Function Documentation

◆ activate()

void PointerTool::activate ( )
virtual

Clear the selection on activate or deactivate.

Activate.

Reimplemented from PolygonTool.

Definition at line 171 of file PointerTool.cpp.

◆ allowPick()

Bool PointerTool::allowPick ( MapObject * pMapObj,
WbView * pView )
static

Definition at line 208 of file PointerTool.cpp.

◆ checkForPropertiesPanel()

void PointerTool::checkForPropertiesPanel ( void )
protected

See if a single obj is selected that has properties.

Definition at line 114 of file PointerTool.cpp.

◆ clearSelection()

void PointerTool::clearSelection ( void )
static

Clears the selected objects selected flags.

Clear the selection..

Definition at line 147 of file PointerTool.cpp.

◆ deactivate()

void PointerTool::deactivate ( )
virtual

deactivate.

Reimplemented from PolygonTool.

Definition at line 184 of file PointerTool.cpp.

◆ mouseDown()

void PointerTool::mouseDown ( TTrackingMode m,
CPoint viewPt,
WbView * pView,
CWorldBuilderDoc * pDoc )
virtual

Execute the tool on mouse down - Pick an object.

Reimplemented from PolygonTool.

Definition at line 245 of file PointerTool.cpp.

◆ mouseMoved()

void PointerTool::mouseMoved ( TTrackingMode m,
CPoint viewPt,
WbView * pView,
CWorldBuilderDoc * pDoc )
virtual

Left button move code.

Reimplemented from PolygonTool.

Definition at line 389 of file PointerTool.cpp.

◆ mouseUp()

void PointerTool::mouseUp ( TTrackingMode m,
CPoint viewPt,
WbView * pView,
CWorldBuilderDoc * pDoc )
virtual

Execute the tool on mouse up - if modifying, do the modify, else update the selection.

Reimplemented from PolygonTool.

Definition at line 495 of file PointerTool.cpp.

◆ setCursor()

void PointerTool::setCursor ( void )
virtual

Set the cursor.

Reimplemented from PolygonTool.

Definition at line 191 of file PointerTool.cpp.

Member Data Documentation

◆ m_curObject

MapObject* PointerTool::m_curObject
protected

Definition at line 44 of file PointerTool.h.

◆ m_doPolyTool

Bool PointerTool::m_doPolyTool
protected

True if we are using the polygon tool to modify a polygon triggter.

Definition at line 50 of file PointerTool.h.

◆ m_downPt2d

CPoint PointerTool::m_downPt2d
protected

Definition at line 42 of file PointerTool.h.

◆ m_downPt3d

Coord3D PointerTool::m_downPt3d
protected

Definition at line 43 of file PointerTool.h.

◆ m_dragSelect

Bool PointerTool::m_dragSelect
protected

True if we are drag selecting.

Definition at line 48 of file PointerTool.h.

◆ m_modifyUndoable

ModifyObjectUndoable* PointerTool::m_modifyUndoable
protected

The modify undoable that is in progress while we track the mouse.

Definition at line 52 of file PointerTool.h.

◆ m_mouseUpMove

Bool PointerTool::m_mouseUpMove
protected

True if we are over the "move" hotspot.

Definition at line 56 of file PointerTool.h.

◆ m_mouseUpRotate

Bool PointerTool::m_mouseUpRotate
protected

True if we are over the "rotate" hotspot.

Definition at line 54 of file PointerTool.h.

◆ m_moveCursor

HCURSOR PointerTool::m_moveCursor
protected

Definition at line 57 of file PointerTool.h.

◆ m_moving

Bool PointerTool::m_moving
protected

True if we are drag moving an object.

Definition at line 46 of file PointerTool.h.

◆ m_rotateCursor

HCURSOR PointerTool::m_rotateCursor
protected

Definition at line 55 of file PointerTool.h.

◆ m_rotating

Bool PointerTool::m_rotating
protected

True if we are rotating an object.

Definition at line 47 of file PointerTool.h.


The documentation for this class was generated from the following files: