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

#include <MoundTool.h>

Inherits Tool.

Inherited by DigTool.

Public Member Functions

 MoundTool (void)
 Constructor.
 
 ~MoundTool (void)
 Destructor.
 
virtual void mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 
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.
 
virtual WorldHeightMapEditgetHeightMap (void)
 
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.
 

Static Public Member Functions

static Int getMoundHeight (void)
 
static void setMoundHeight (Int height)
 
static Int getWidth (void)
 
static Int getFeather (void)
 Returns width.
 
static void setWidth (Int width)
 Returns feather.
 
static void setFeather (Int feather)
 Set the brush feather and notify the height options panel of the change.
 
- 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 Attributes

WorldHeightMapEditm_htMapEditCopy
 
WorldHeightMapEditm_htMapSaveCopy
 
Bool m_raising
 True if mounding, false if digging.
 
Int m_lastMoveTime
 Last system clock time.
 
- Protected Attributes inherited from Tool
Int m_toolID
 
Int m_cursorID
 
HCURSOR m_cursor
 
Int m_prevXIndex
 
Int m_prevYIndex
 

Static Protected Attributes

static Int m_moundHeight =0
 
static Int m_brushWidth
 
static Int m_brushFeather
 

Detailed Description

Definition at line 33 of file MoundTool.h.

Constructor & Destructor Documentation

◆ MoundTool()

MoundTool::MoundTool ( void )

Constructor.

Definition at line 45 of file MoundTool.cpp.

◆ ~MoundTool()

MoundTool::~MoundTool ( void )

Destructor.

Definition at line 54 of file MoundTool.cpp.

Member Function Documentation

◆ activate()

void MoundTool::activate ( )
virtual

Become the current tool.

Shows the brush options panel.

Reimplemented from Tool.

Definition at line 94 of file MoundTool.cpp.

◆ getFeather()

static Int MoundTool::getFeather ( void )
inlinestatic

Returns width.

Definition at line 54 of file MoundTool.h.

◆ getHeightMap()

virtual WorldHeightMapEdit * MoundTool::getHeightMap ( void )
inlinevirtual

Reimplemented from Tool.

Definition at line 62 of file MoundTool.h.

◆ getMoundHeight()

static Int MoundTool::getMoundHeight ( void )
inlinestatic

Definition at line 51 of file MoundTool.h.

◆ getWidth()

static Int MoundTool::getWidth ( void )
inlinestatic

Definition at line 53 of file MoundTool.h.

◆ mouseDown()

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

Reimplemented from Tool.

Definition at line 101 of file MoundTool.cpp.

◆ mouseMoved()

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

True if the tool tracks the terrain, generally false if it modifies the terrain heights.

Reimplemented from Tool.

Definition at line 129 of file MoundTool.cpp.

◆ mouseUp()

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

Reimplemented from Tool.

Definition at line 118 of file MoundTool.cpp.

◆ setFeather()

void MoundTool::setFeather ( Int feather)
static

Set the brush feather and notify the height options panel of the change.

Definition at line 82 of file MoundTool.cpp.

◆ setMoundHeight()

void MoundTool::setMoundHeight ( Int height)
static

Definition at line 61 of file MoundTool.cpp.

◆ setWidth()

void MoundTool::setWidth ( Int width)
static

Returns feather.

Set the brush width and notify the height options panel of the change.

Definition at line 71 of file MoundTool.cpp.

Member Data Documentation

◆ m_brushFeather

Int MoundTool::m_brushFeather
staticprotected

Definition at line 44 of file MoundTool.h.

◆ m_brushWidth

Int MoundTool::m_brushWidth
staticprotected

Definition at line 43 of file MoundTool.h.

◆ m_htMapEditCopy

WorldHeightMapEdit* MoundTool::m_htMapEditCopy
protected

Definition at line 37 of file MoundTool.h.

◆ m_htMapSaveCopy

WorldHeightMapEdit* MoundTool::m_htMapSaveCopy
protected

Definition at line 38 of file MoundTool.h.

◆ m_lastMoveTime

Int MoundTool::m_lastMoveTime
protected

Last system clock time.

Definition at line 40 of file MoundTool.h.

◆ m_moundHeight

Int MoundTool::m_moundHeight =0
staticprotected

Definition at line 42 of file MoundTool.h.

◆ m_raising

Bool MoundTool::m_raising
protected

True if mounding, false if digging.

Definition at line 39 of file MoundTool.h.


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