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

#include <RulerTool.h>

Inherits Tool.

Public Member Functions

 RulerTool (void)
 Constructor.
 
 ~RulerTool (void)
 Destructor.
 
virtual void activate ()
 Clear the selection on activate or deactivate.
 
virtual void deactivate ()
 
virtual void setCursor (void)
 
virtual void mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 
virtual void mouseMoved (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 Left button move code.
 
virtual Bool followsTerrain (void)
 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 mouseUp (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 
virtual WorldHeightMapEditgetHeightMap (void)
 

Static Public Member Functions

static void setLength (Real length)
 
static Bool switchType ()
 
static int getType ()
 
static Real getLength (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

Coord3D m_downPt3d
 
int m_rulerType
 
WbViewm_View
 
Real m_savedLength
 
- Protected Attributes inherited from Tool
Int m_toolID
 
Int m_cursorID
 
HCURSOR m_cursor
 
Int m_prevXIndex
 
Int m_prevYIndex
 

Static Protected Attributes

static RulerToolm_staticThis = NULL
 

Detailed Description

Definition at line 29 of file RulerTool.h.

Constructor & Destructor Documentation

◆ RulerTool()

RulerTool::RulerTool ( void )

Constructor.

Definition at line 37 of file RulerTool.cpp.

◆ ~RulerTool()

RulerTool::~RulerTool ( void )

Destructor.

Definition at line 47 of file RulerTool.cpp.

Member Function Documentation

◆ activate()

void RulerTool::activate ( )
virtual

Clear the selection on activate or deactivate.

Reimplemented from Tool.

Definition at line 52 of file RulerTool.cpp.

◆ deactivate()

void RulerTool::deactivate ( )
virtual

Reimplemented from Tool.

Definition at line 63 of file RulerTool.cpp.

◆ followsTerrain()

virtual Bool RulerTool::followsTerrain ( void )
inlinevirtual

Become not the current tool.

Reimplemented from Tool.

Definition at line 51 of file RulerTool.h.

◆ getLength()

Real RulerTool::getLength ( void )
static

Definition at line 179 of file RulerTool.cpp.

◆ getType()

int RulerTool::getType ( )
static

Definition at line 170 of file RulerTool.cpp.

◆ mouseDown()

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

Execute the tool on mouse down

Reimplemented from Tool.

Definition at line 81 of file RulerTool.cpp.

◆ mouseMoved()

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

Left button move code.

Reimplemented from Tool.

Definition at line 98 of file RulerTool.cpp.

◆ setCursor()

void RulerTool::setCursor ( void )
virtual

Set the cursor.

Reimplemented from Tool.

Definition at line 74 of file RulerTool.cpp.

◆ setLength()

void RulerTool::setLength ( Real length)
static

Definition at line 133 of file RulerTool.cpp.

◆ switchType()

Bool RulerTool::switchType ( )
static

Definition at line 152 of file RulerTool.cpp.

Member Data Documentation

◆ m_downPt3d

Coord3D RulerTool::m_downPt3d
protected

Definition at line 32 of file RulerTool.h.

◆ m_rulerType

int RulerTool::m_rulerType
protected

Definition at line 33 of file RulerTool.h.

◆ m_savedLength

Real RulerTool::m_savedLength
protected

Definition at line 35 of file RulerTool.h.

◆ m_staticThis

RulerTool * RulerTool::m_staticThis = NULL
staticprotected

Definition at line 37 of file RulerTool.h.

◆ m_View

WbView* RulerTool::m_View
protected

Definition at line 34 of file RulerTool.h.


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