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

Scorch tool. More...

#include <ScorchTool.h>

Inherits Tool.

Public Member Functions

 ScorchTool (void)
 Constructor.
 
 ~ScorchTool (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 activate ()
 Become the current tool.
 
virtual void deactivate ()
 Become not 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 Bool followsTerrain (void)
 Become not the current tool.
 
virtual WorldHeightMapEditgetHeightMap (void)
 

Protected Member Functions

MapObjectpickScorch (Coord3D loc)
 

Protected Attributes

Coord3D m_mouseDownPt
 
- 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

Scorch tool.

ScorchTool

Definition at line 34 of file ScorchTool.h.

Constructor & Destructor Documentation

◆ ScorchTool()

ScorchTool::ScorchTool ( void )

Constructor.

Definition at line 41 of file ScorchTool.cpp.

◆ ~ScorchTool()

ScorchTool::~ScorchTool ( void )

Destructor.

Definition at line 47 of file ScorchTool.cpp.

Member Function Documentation

◆ activate()

void ScorchTool::activate ( )
virtual

Become the current tool.

Shows the terrain materials options panel.

Reimplemented from Tool.

Definition at line 57 of file ScorchTool.cpp.

◆ deactivate()

void ScorchTool::deactivate ( )
virtual

Become not the current tool.

Clears it's is active flag.

Reimplemented from Tool.

Definition at line 52 of file ScorchTool.cpp.

◆ mouseDown()

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

Perform tool on mouse down.

Perform the tool behavior on mouse down.

Reimplemented from Tool.

Definition at line 102 of file ScorchTool.cpp.

◆ mouseMoved()

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

Left button move code.

Reimplemented from Tool.

Definition at line 130 of file ScorchTool.cpp.

◆ mouseUp()

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

Execute the tool on mouse up - Place an object.

Reimplemented from Tool.

Definition at line 145 of file ScorchTool.cpp.

◆ pickScorch()

MapObject * ScorchTool::pickScorch ( Coord3D loc)
protected

Definition at line 65 of file ScorchTool.cpp.

Member Data Documentation

◆ m_mouseDownPt

Coord3D ScorchTool::m_mouseDownPt
protected

Definition at line 41 of file ScorchTool.h.


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