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

Blend edges out tool. More...

#include <ObjectTool.h>

Inherits Tool.

Public Member Functions

 ObjectTool (void)
 Constructor.
 
 ~ObjectTool (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)
 
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 Real calcAngle (Coord3D downPt, Coord3D curPt, WbView *pView)
 
- 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
 
- Protected Attributes inherited from Tool
Int m_toolID
 
Int m_cursorID
 
HCURSOR m_cursor
 
Int m_prevXIndex
 
Int m_prevYIndex
 

Detailed Description

Blend edges out tool.

ObjectTool Does the BlendEdgesOut tool operation.

Definition at line 35 of file ObjectTool.h.

Constructor & Destructor Documentation

◆ ObjectTool()

ObjectTool::ObjectTool ( void )

Constructor.

Definition at line 41 of file ObjectTool.cpp.

◆ ~ObjectTool()

ObjectTool::~ObjectTool ( void )

Destructor.

Definition at line 47 of file ObjectTool.cpp.

Member Function Documentation

◆ activate()

void ObjectTool::activate ( )
virtual

Become the current tool.

Shows the object options panel.

Reimplemented from Tool.

Definition at line 92 of file ObjectTool.cpp.

◆ calcAngle()

Real ObjectTool::calcAngle ( Coord3D downPt,
Coord3D curPt,
WbView * pView )
static

Definition at line 51 of file ObjectTool.cpp.

◆ deactivate()

void ObjectTool::deactivate ( )
virtual

Become not the current tool.

Turn off object tracking.

Reimplemented from Tool.

Definition at line 84 of file ObjectTool.cpp.

◆ mouseDown()

void ObjectTool::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 103 of file ObjectTool.cpp.

◆ mouseMoved()

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

Tracking - show the object.

Reimplemented from Tool.

Definition at line 114 of file ObjectTool.cpp.

◆ mouseUp()

void ObjectTool::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 144 of file ObjectTool.cpp.

Member Data Documentation

◆ m_downPt2d

CPoint ObjectTool::m_downPt2d
protected

Definition at line 38 of file ObjectTool.h.

◆ m_downPt3d

Coord3D ObjectTool::m_downPt3d
protected

Definition at line 39 of file ObjectTool.h.


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