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

Select tile tool. More...

#include <WaypointTool.h>

Inherits Tool.

Public Member Functions

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

Static Public Member Functions

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 Member Functions

MapObjectpickWaypoint (Coord3D loc)
 

Protected Attributes

Int m_downWaypointID
 
Coord3D m_mouseDownPt
 
- 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_isActive = false
 

Detailed Description

Select tile tool.

WaypointTool Does the add/select waypoint operation.

Definition at line 36 of file WaypointTool.h.

Constructor & Destructor Documentation

◆ WaypointTool()

WaypointTool::WaypointTool ( void )

Constructor.

Definition at line 45 of file WaypointTool.cpp.

◆ ~WaypointTool()

WaypointTool::~WaypointTool ( void )

Destructor.

Definition at line 51 of file WaypointTool.cpp.

Member Function Documentation

◆ activate()

void WaypointTool::activate ( )
virtual

Become the current tool.

Shows the terrain materials options panel.

Reimplemented from Tool.

Definition at line 62 of file WaypointTool.cpp.

◆ deactivate()

void WaypointTool::deactivate ( )
virtual

Become not the current tool.

Clears it's is active flag.

Reimplemented from Tool.

Definition at line 56 of file WaypointTool.cpp.

◆ isActive()

static Bool WaypointTool::isActive ( void )
inlinestatic

Definition at line 51 of file WaypointTool.h.

◆ mouseDown()

void WaypointTool::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 108 of file WaypointTool.cpp.

◆ mouseMoved()

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

Left button move code.

Reimplemented from Tool.

Definition at line 141 of file WaypointTool.cpp.

◆ mouseUp()

void WaypointTool::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 157 of file WaypointTool.cpp.

◆ pickWaypoint()

MapObject * WaypointTool::pickWaypoint ( Coord3D loc)
protected

Definition at line 71 of file WaypointTool.cpp.

Member Data Documentation

◆ m_downWaypointID

Int WaypointTool::m_downWaypointID
protected

Definition at line 43 of file WaypointTool.h.

◆ m_isActive

Bool WaypointTool::m_isActive = false
staticprotected

Definition at line 45 of file WaypointTool.h.

◆ m_mouseDownPt

Coord3D WaypointTool::m_mouseDownPt
protected

Definition at line 44 of file WaypointTool.h.


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