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

#include <BorderTool.h>

Inherits Tool.

Public Member Functions

 BorderTool ()
 
 ~BorderTool ()
 
Int getToolID (void)
 
virtual void setCursor (void)
 
virtual void activate ()
 Become the current tool.
 
virtual void deactivate ()
 
virtual Bool followsTerrain (void)
 Become not the current tool.
 
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 void mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 
virtual void mouseUp (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 
- Public Member Functions inherited from Tool
 Tool (Int toolID, Int cursorID)
 Tool class.
 
virtual ~Tool (void)
 Destructor.
 
Int getToolID (void)
 
virtual WorldHeightMapEditgetHeightMap (void)
 

Protected Types

enum  ModificationType { MOD_TYPE_INVALID , MOD_TYPE_UP , MOD_TYPE_FREE , MOD_TYPE_RIGHT }
 

Protected Attributes

Bool m_mouseDown
 
Bool m_addingNewBorder
 
Int m_modifyBorderNdx
 
ModificationType m_modificationType
 
- Protected Attributes inherited from Tool
Int m_toolID
 
Int m_cursorID
 
HCURSOR m_cursor
 
Int m_prevXIndex
 
Int m_prevYIndex
 

Additional Inherited Members

- 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)
 

Detailed Description

Definition at line 22 of file BorderTool.h.

Member Enumeration Documentation

◆ ModificationType

Enumerator
MOD_TYPE_INVALID 
MOD_TYPE_UP 
MOD_TYPE_FREE 
MOD_TYPE_RIGHT 

Definition at line 25 of file BorderTool.h.

Constructor & Destructor Documentation

◆ BorderTool()

BorderTool::BorderTool ( )

Definition at line 30 of file BorderTool.cpp.

◆ ~BorderTool()

BorderTool::~BorderTool ( )

Definition at line 37 of file BorderTool.cpp.

Member Function Documentation

◆ activate()

void BorderTool::activate ( )
virtual

Become the current tool.

Shows the "no options" options panel.

Reimplemented from Tool.

Definition at line 47 of file BorderTool.cpp.

◆ deactivate()

void BorderTool::deactivate ( )
virtual

Reimplemented from Tool.

Definition at line 53 of file BorderTool.cpp.

◆ followsTerrain()

virtual Bool BorderTool::followsTerrain ( void )
inlinevirtual

Become not the current tool.

Reimplemented from Tool.

Definition at line 42 of file BorderTool.h.

◆ getToolID()

Int BorderTool::getToolID ( void )
inline

Definition at line 36 of file BorderTool.h.

◆ mouseDown()

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

Reimplemented from Tool.

Definition at line 121 of file BorderTool.cpp.

◆ mouseMoved()

void BorderTool::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 59 of file BorderTool.cpp.

◆ mouseUp()

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

Reimplemented from Tool.

Definition at line 163 of file BorderTool.cpp.

◆ setCursor()

void BorderTool::setCursor ( void )
virtual

Reimplemented from Tool.

Definition at line 42 of file BorderTool.cpp.

Member Data Documentation

◆ m_addingNewBorder

Bool BorderTool::m_addingNewBorder
protected

Definition at line 27 of file BorderTool.h.

◆ m_modificationType

ModificationType BorderTool::m_modificationType
protected

Definition at line 29 of file BorderTool.h.

◆ m_modifyBorderNdx

Int BorderTool::m_modifyBorderNdx
protected

Definition at line 28 of file BorderTool.h.

◆ m_mouseDown

Bool BorderTool::m_mouseDown
protected

Definition at line 26 of file BorderTool.h.


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