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

#include <BuildListTool.h>

Inherits Tool.

Public Member Functions

 BuildListTool (void)
 Constructor.
 
 ~BuildListTool (void)
 Destructor.
 
virtual void mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 Perform tool on mouse down.
 
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 void setCursor (void)
 
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 Bool followsTerrain (void)
 Become not the current tool.
 
virtual WorldHeightMapEditgetHeightMap (void)
 

Static Public Member Functions

static void addBuilding (void)
 Shows the object options panel.
 
static Bool isActive (void)
 
- 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

CPoint m_downPt2d
 
Coord3D m_downPt3d
 
Coord3D m_prevPt3d
 
BuildListInfom_curObject
 
Bool m_moving
 True if we are drag moving an object.
 
Bool m_rotating
 True if we are rotating an object.
 
Bool m_mouseUpRotate
 True if we are over the "rotate" hotspot.
 
HCURSOR m_rotateCursor
 
Bool m_mouseUpMove
 True if we are over the "move" hotspot.
 
HCURSOR m_moveCursor
 
HCURSOR m_pointerCursor
 
PickUnitDialog m_pickBuildingDlg
 
Bool m_created
 
- Protected Attributes inherited from Tool
Int m_toolID
 
Int m_cursorID
 
HCURSOR m_cursor
 
Int m_prevXIndex
 
Int m_prevYIndex
 

Static Protected Attributes

static PickUnitDialogm_static_pickBuildingDlg = NULL
 
static Bool m_isActive = false
 

Detailed Description

BuildListTool Does the add item to build list tool operation.

Definition at line 38 of file BuildListTool.h.

Constructor & Destructor Documentation

◆ BuildListTool()

BuildListTool::BuildListTool ( void )

Constructor.

Definition at line 46 of file BuildListTool.cpp.

◆ ~BuildListTool()

BuildListTool::~BuildListTool ( void )

Destructor.

Definition at line 57 of file BuildListTool.cpp.

Member Function Documentation

◆ activate()

void BuildListTool::activate ( )
virtual

Become the current tool.

Shows the object options panel.

Reimplemented from Tool.

Definition at line 103 of file BuildListTool.cpp.

◆ addBuilding()

void BuildListTool::addBuilding ( void )
static

Shows the object options panel.

Definition at line 91 of file BuildListTool.cpp.

◆ deactivate()

void BuildListTool::deactivate ( )
virtual

Become not the current tool.

Clears the isActive flag.

Reimplemented from Tool.

Definition at line 123 of file BuildListTool.cpp.

◆ isActive()

static Bool BuildListTool::isActive ( void )
inlinestatic

Definition at line 70 of file BuildListTool.h.

◆ mouseDown()

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

Perform tool on mouse down.

Execute the tool on mouse down - Place an object.

Reimplemented from Tool.

Definition at line 159 of file BuildListTool.cpp.

◆ mouseMoved()

void BuildListTool::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 190 of file BuildListTool.cpp.

◆ mouseUp()

void BuildListTool::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 255 of file BuildListTool.cpp.

◆ setCursor()

void BuildListTool::setCursor ( void )
virtual

Set the cursor.

Reimplemented from Tool.

Definition at line 136 of file BuildListTool.cpp.

Member Data Documentation

◆ m_created

Bool BuildListTool::m_created
protected

Definition at line 55 of file BuildListTool.h.

◆ m_curObject

BuildListInfo* BuildListTool::m_curObject
protected

Definition at line 44 of file BuildListTool.h.

◆ m_downPt2d

CPoint BuildListTool::m_downPt2d
protected

Definition at line 41 of file BuildListTool.h.

◆ m_downPt3d

Coord3D BuildListTool::m_downPt3d
protected

Definition at line 42 of file BuildListTool.h.

◆ m_isActive

Bool BuildListTool::m_isActive = false
staticprotected

Definition at line 58 of file BuildListTool.h.

◆ m_mouseUpMove

Bool BuildListTool::m_mouseUpMove
protected

True if we are over the "move" hotspot.

Definition at line 51 of file BuildListTool.h.

◆ m_mouseUpRotate

Bool BuildListTool::m_mouseUpRotate
protected

True if we are over the "rotate" hotspot.

Definition at line 49 of file BuildListTool.h.

◆ m_moveCursor

HCURSOR BuildListTool::m_moveCursor
protected

Definition at line 52 of file BuildListTool.h.

◆ m_moving

Bool BuildListTool::m_moving
protected

True if we are drag moving an object.

Definition at line 46 of file BuildListTool.h.

◆ m_pickBuildingDlg

PickUnitDialog BuildListTool::m_pickBuildingDlg
protected

Definition at line 54 of file BuildListTool.h.

◆ m_pointerCursor

HCURSOR BuildListTool::m_pointerCursor
protected

Definition at line 53 of file BuildListTool.h.

◆ m_prevPt3d

Coord3D BuildListTool::m_prevPt3d
protected

Definition at line 43 of file BuildListTool.h.

◆ m_rotateCursor

HCURSOR BuildListTool::m_rotateCursor
protected

Definition at line 50 of file BuildListTool.h.

◆ m_rotating

Bool BuildListTool::m_rotating
protected

True if we are rotating an object.

Definition at line 47 of file BuildListTool.h.

◆ m_static_pickBuildingDlg

PickUnitDialog * BuildListTool::m_static_pickBuildingDlg = NULL
staticprotected

Definition at line 57 of file BuildListTool.h.


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