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

Select tile tool. More...

#include <WaterTool.h>

Inherits PolygonTool.

Public Member Functions

 WaterTool (void)
 Constructor.
 
 ~WaterTool (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 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 Bool isActive (void)
 
- 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 Member Functions

void fillTheArea (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 Perform the fill water area on mouse down.
 
PolygonTriggeradjustSpacing (PolygonTrigger *trigger, Real spacing)
 Adjust the spacing.
 
- 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

Real m_currentZ
 
- 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
 

Static Protected Attributes

static Bool m_water_isActive = false
 
- 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
 

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)
 

Detailed Description

Select tile tool.

WaterTool Does the add/select water polygon operation.

Definition at line 38 of file WaterTool.h.

Constructor & Destructor Documentation

◆ WaterTool()

WaterTool::WaterTool ( void )

Constructor.

Definition at line 44 of file WaterTool.cpp.

◆ ~WaterTool()

WaterTool::~WaterTool ( void )

Destructor.

Definition at line 56 of file WaterTool.cpp.

Member Function Documentation

◆ activate()

void WaterTool::activate ( )
virtual

Become the current tool.

Shows the no options panel.

Reimplemented from PolygonTool.

Definition at line 76 of file WaterTool.cpp.

◆ adjustSpacing()

PolygonTrigger * WaterTool::adjustSpacing ( PolygonTrigger * trigger,
Real spacing )
protected

Adjust the spacing.

Definition at line 492 of file WaterTool.cpp.

◆ deactivate()

void WaterTool::deactivate ( )
virtual

Become not the current tool.

Clears it's is active flag.

Reimplemented from PolygonTool.

Definition at line 67 of file WaterTool.cpp.

◆ fillTheArea()

void WaterTool::fillTheArea ( TTrackingMode m,
CPoint viewPt,
WbView * pView,
CWorldBuilderDoc * pDoc )
protected

Perform the fill water area on mouse down.

Definition at line 202 of file WaterTool.cpp.

◆ isActive()

static Bool WaterTool::isActive ( void )
inlinestatic

Definition at line 50 of file WaterTool.h.

◆ mouseDown()

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

Perform tool on mouse down.

Perform the tool behavior on mouse down.

Reimplemented from PolygonTool.

Definition at line 95 of file WaterTool.cpp.

◆ mouseMoved()

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

Left button move code.

Reimplemented from PolygonTool.

Definition at line 144 of file WaterTool.cpp.

◆ mouseUp()

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

Mouse up - not much.

Reimplemented from PolygonTool.

Definition at line 191 of file WaterTool.cpp.

◆ setCursor()

void WaterTool::setCursor ( void )
virtual

Set the cursor.

Reimplemented from PolygonTool.

Definition at line 124 of file WaterTool.cpp.

Member Data Documentation

◆ m_currentZ

Real WaterTool::m_currentZ
protected

Definition at line 47 of file WaterTool.h.

◆ m_water_isActive

Bool WaterTool::m_water_isActive = false
staticprotected

Definition at line 45 of file WaterTool.h.


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