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

#include <FenceTool.h>

Inherits Tool.

Public Member Functions

 FenceTool (void)
 Constructor.
 
 ~FenceTool (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)
 
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

void updateMapObjectList (Coord3D downPt, Coord3D curPt, WbView *pView, CWorldBuilderDoc *pDoc, Bool checkPlayers)
 

Protected Attributes

CPoint m_downPt2d
 
Coord3D m_downPt3d
 
MapObjectm_mapObjectList
 
Real m_curObjectWidth
 
Real m_curObjectOffset
 
Int m_objectCount
 
- 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

FenceTool Does the fence tool operation.

Definition at line 36 of file FenceTool.h.

Constructor & Destructor Documentation

◆ FenceTool()

FenceTool::FenceTool ( void )

Constructor.

Definition at line 40 of file FenceTool.cpp.

◆ ~FenceTool()

FenceTool::~FenceTool ( void )

Destructor.

Definition at line 50 of file FenceTool.cpp.

Member Function Documentation

◆ activate()

void FenceTool::activate ( )
virtual

Become the current tool.

Shows the object options panel.

Reimplemented from Tool.

Definition at line 136 of file FenceTool.cpp.

◆ deactivate()

void FenceTool::deactivate ( )
virtual

Become not the current tool.

Turn off object tracking.

Reimplemented from Tool.

Definition at line 128 of file FenceTool.cpp.

◆ mouseDown()

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

Execute the tool on mouse down - Place an object.

Reimplemented from Tool.

Definition at line 148 of file FenceTool.cpp.

◆ mouseMoved()

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

Tracking - show the object.

Reimplemented from Tool.

Definition at line 172 of file FenceTool.cpp.

◆ mouseUp()

void FenceTool::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 201 of file FenceTool.cpp.

◆ updateMapObjectList()

void FenceTool::updateMapObjectList ( Coord3D downPt,
Coord3D curPt,
WbView * pView,
CWorldBuilderDoc * pDoc,
Bool checkPlayers )
protected

Definition at line 58 of file FenceTool.cpp.

Member Data Documentation

◆ m_curObjectOffset

Real FenceTool::m_curObjectOffset
protected

Definition at line 43 of file FenceTool.h.

◆ m_curObjectWidth

Real FenceTool::m_curObjectWidth
protected

Definition at line 42 of file FenceTool.h.

◆ m_downPt2d

CPoint FenceTool::m_downPt2d
protected

Definition at line 39 of file FenceTool.h.

◆ m_downPt3d

Coord3D FenceTool::m_downPt3d
protected

Definition at line 40 of file FenceTool.h.

◆ m_mapObjectList

MapObject* FenceTool::m_mapObjectList
protected

Definition at line 41 of file FenceTool.h.

◆ m_objectCount

Int FenceTool::m_objectCount
protected

Definition at line 44 of file FenceTool.h.


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