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

Fill area with texture tool. More...

#include <FloodFillTool.h>

Inherits Tool.

Public Member Functions

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

Protected Attributes

Int m_textureClassToDraw
 The texture to fill with. Foreground for mousedDown, background for mouseDownRt.
 
HCURSOR m_cliffCursor
 
- 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_adjustCliffTextures = false
 

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

Fill area with texture tool.

Definition at line 34 of file FloodFillTool.h.

Constructor & Destructor Documentation

◆ FloodFillTool()

FloodFillTool::FloodFillTool ( void )

Constructor.

Definition at line 41 of file FloodFillTool.cpp.

◆ ~FloodFillTool()

FloodFillTool::~FloodFillTool ( void )

Destructor.

Definition at line 48 of file FloodFillTool.cpp.

Member Function Documentation

◆ activate()

void FloodFillTool::activate ( )
virtual

Become the current tool.

Shows the terrain materials options panel.

Reimplemented from Tool.

Definition at line 57 of file FloodFillTool.cpp.

◆ getAdjustCliffs()

Bool FloodFillTool::getAdjustCliffs ( void )
inline

Definition at line 50 of file FloodFillTool.h.

◆ mouseUp()

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

Left click code. Sets m_textureClassToDraw and calls eitherMouseDown() Perform the tool behavior on mouse down. Creates a copy of the height map, flood fills it at pt with m_textureClassToDraw which has been set by the calling routine. Then builds the command, and passes it to the doc.

Reimplemented from Tool.

Definition at line 85 of file FloodFillTool.cpp.

◆ setAdjustCliffs()

void FloodFillTool::setAdjustCliffs ( Bool val)
inline

Definition at line 51 of file FloodFillTool.h.

◆ setCursor()

void FloodFillTool::setCursor ( void )
virtual

Set the cursor.

Reimplemented from Tool.

Definition at line 66 of file FloodFillTool.cpp.

Member Data Documentation

◆ m_adjustCliffTextures

Bool FloodFillTool::m_adjustCliffTextures = false
staticprotected

Definition at line 43 of file FloodFillTool.h.

◆ m_cliffCursor

HCURSOR FloodFillTool::m_cliffCursor
protected

Definition at line 42 of file FloodFillTool.h.

◆ m_textureClassToDraw

Int FloodFillTool::m_textureClassToDraw
protected

The texture to fill with. Foreground for mousedDown, background for mouseDownRt.

Definition at line 41 of file FloodFillTool.h.


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