LLToolBrushLand Class Reference

#include <lltoolbrush.h>

Inheritance diagram for LLToolBrushLand:

Inheritance graph
[legend]
Collaboration diagram for LLToolBrushLand:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLToolBrushLand ()
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual void handleSelect ()
virtual void handleDeselect ()
virtual BOOL isAlwaysRendered ()
virtual void render ()
void onMouseCaptureLost ()
void modifyLandInSelectionGlobal ()
virtual void undo ()
virtual BOOL canUndo ()
virtual BOOL canRedo ()

Static Public Member Functions

static void onIdle (void *brush_tool)

Protected Member Functions

void brush (void)
void modifyLandAtPointGlobal (const LLVector3d &spot, MASK mask)
void determineAffectedRegions (LLLinkedList< LLViewerRegion > &regions, const LLVector3d &spot) const
void renderOverlay (LLSurface &land, const LLVector3 &pos_region, const LLVector3 &pos_world)
bool canTerraform (LLViewerRegion *regionp) const
void alertNoTerraform (LLViewerRegion *regionp)

Protected Attributes

F32 mStartingZ
S32 mMouseX
S32 mMouseY
S32 mBrushIndex
BOOL mGotHover
BOOL mLastShowParcelOwners
BOOL mBrushSelected
LLLinkedList< LLViewerRegionmLastAffectedRegions

Detailed Description

Definition at line 51 of file lltoolbrush.h.


Constructor & Destructor Documentation

LLToolBrushLand::LLToolBrushLand (  ) 

============================================================================ Class LLToolBrushLand ============================================================================

Definition at line 92 of file lltoolbrush.cpp.

References LLControlGroup::getS32(), gSavedSettings, and mBrushIndex.


Member Function Documentation

void LLToolBrushLand::alertNoTerraform ( LLViewerRegion regionp  )  [protected]

Definition at line 597 of file lltoolbrush.cpp.

References LLViewerWindow::alertXml(), LLViewerRegion::getName(), and gViewerWindow.

Referenced by handleMouseDown(), and modifyLandInSelectionGlobal().

void LLToolBrushLand::brush ( void   )  [protected]

Definition at line 334 of file lltoolbrush.cpp.

References LLKeyboard::currentMask(), gKeyboard, gViewerWindow, LLVector3d::mdV, mMouseX, mMouseY, modifyLandAtPointGlobal(), LLViewerWindow::mousePointOnLandGlobal(), TRUE, VX, and VY.

virtual BOOL LLToolBrushLand::canRedo (  )  [inline, virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 80 of file lltoolbrush.h.

References FALSE.

bool LLToolBrushLand::canTerraform ( LLViewerRegion regionp  )  const [protected]

Definition at line 589 of file lltoolbrush.cpp.

References LLViewerRegion::canManageEstate(), LLViewerRegion::getRegionFlags(), and REGION_FLAGS_BLOCK_TERRAFORM.

Referenced by handleMouseDown(), and modifyLandInSelectionGlobal().

virtual BOOL LLToolBrushLand::canUndo (  )  [inline, virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 77 of file lltoolbrush.h.

References TRUE.

void LLToolBrushLand::determineAffectedRegions ( LLLinkedList< LLViewerRegion > &  regions,
const LLVector3d spot 
) const [protected]

Definition at line 505 of file lltoolbrush.cpp.

References LLLinkedList< DATA_TYPE >::addData(), LLLinkedList< DATA_TYPE >::checkData(), gWorldPointer, LAND_BRUSH_SIZE, mBrushIndex, LLVector3d::mdV, NULL, VX, and VY.

Referenced by modifyLandAtPointGlobal(), modifyLandInSelectionGlobal(), and render().

void LLToolBrushLand::handleDeselect (  )  [virtual]

Reimplemented from LLTool.

Definition at line 429 of file lltoolbrush.cpp.

References FALSE, gEditMenuHandler, LLControlGroup::getBOOL(), gParcelMgr, gSavedSettings, mBrushSelected, mLastShowParcelOwners, NULL, LLControlGroup::setBOOL(), LLViewerParcelMgr::setSelectionVisible(), and TRUE.

BOOL LLToolBrushLand::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLTool.

Definition at line 385 of file lltoolbrush.cpp.

References LLViewerWindow::getWindow(), gViewerWindow, LLTool::hasMouseCapture(), lldebugst, llendl, mGotHover, mMouseX, mMouseY, LLWindow::setCursor(), TRUE, and UI_CURSOR_TOOLLAND.

BOOL LLToolBrushLand::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLTool.

Definition at line 347 of file lltoolbrush.cpp.

References LLCallbackList::addFunction(), alertNoTerraform(), canTerraform(), FALSE, LLViewerRegion::getLand(), LLRegionPosition::getPositionRegion(), LLRegionPosition::getRegion(), LLSurface::getZ(), gIdleCallbacks, gParcelMgr, gViewerWindow, i, j, llclamp(), LLVector3d::mdV, LLSurface::mGridsPerEdge, mMouseX, mMouseY, LLViewerWindow::mousePointOnLandGlobal(), mStartingZ, LLVector3::mV, onIdle(), S32, LLTool::setMouseCapture(), LLViewerParcelMgr::setSelectionVisible(), TRUE, VX, and VY.

BOOL LLToolBrushLand::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLTool.

Definition at line 397 of file lltoolbrush.cpp.

References LLCallbackList::deleteFunction(), FALSE, gIdleCallbacks, gParcelMgr, LLTool::hasMouseCapture(), mLastAffectedRegions, onIdle(), LLLinkedList< DATA_TYPE >::removeAllNodes(), LLTool::setMouseCapture(), LLViewerParcelMgr::setSelectionVisible(), and TRUE.

void LLToolBrushLand::handleSelect (  )  [virtual]

Reimplemented from LLTool.

Definition at line 415 of file lltoolbrush.cpp.

References gEditMenuHandler, LLControlGroup::getBOOL(), gFloaterTools, gSavedSettings, mBrushSelected, mLastShowParcelOwners, LLControlGroup::setBOOL(), LLFloaterTools::setStatusText(), and TRUE.

virtual BOOL LLToolBrushLand::isAlwaysRendered (  )  [inline, virtual]

Reimplemented from LLTool.

Definition at line 65 of file lltoolbrush.h.

References TRUE.

void LLToolBrushLand::modifyLandAtPointGlobal ( const LLVector3d spot,
MASK  mask 
) [protected]

Definition at line 104 of file lltoolbrush.cpp.

References _PREHASH_Action, _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_BrushSize, _PREHASH_East, _PREHASH_Height, _PREHASH_LocalID, _PREHASH_ModifyBlock, _PREHASH_ModifyLand, _PREHASH_North, _PREHASH_ParcelData, _PREHASH_Seconds, _PREHASH_SessionID, _PREHASH_South, _PREHASH_West, LLMessageSystem::addF32Fast(), LLMessageSystem::addS32Fast(), LLMessageSystem::addU8Fast(), LLMessageSystem::addUUIDFast(), determineAffectedRegions(), LLSurfacePatch::dirtyZ(), E_LAND_INVALID, E_LAND_LEVEL, E_LAND_LOWER, E_LAND_NOISE, E_LAND_RAISE, E_LAND_REVERT, E_LAND_SMOOTH, gAgent, LLLinkedList< DATA_TYPE >::getFirstData(), LLAgent::getID(), LLLinkedList< DATA_TYPE >::getNextData(), LLControlGroup::getS32(), LLAgent::getSessionID(), gFPSClamped, gMessageSystem, gSavedSettings, mBrushIndex, mLastAffectedRegions, mStartingZ, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), NULL, LLSurface::resolvePatchRegion(), S32, LLMessageSystem::sendMessage(), VX, and VY.

Referenced by brush().

void LLToolBrushLand::modifyLandInSelectionGlobal (  ) 

Definition at line 182 of file lltoolbrush.cpp.

References _PREHASH_Action, _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_BrushSize, _PREHASH_East, _PREHASH_Height, _PREHASH_LocalID, _PREHASH_ModifyBlock, _PREHASH_ModifyLand, _PREHASH_North, _PREHASH_ParcelData, _PREHASH_Seconds, _PREHASH_SessionID, _PREHASH_South, _PREHASH_West, LLMessageSystem::addF32Fast(), LLMessageSystem::addS32Fast(), LLMessageSystem::addU8Fast(), LLMessageSystem::addUUIDFast(), alertNoTerraform(), canTerraform(), LLVector3::clamp(), determineAffectedRegions(), LLSurfacePatch::dirtyZ(), E_LAND_LEVEL, E_LAND_LOWER, E_LAND_NOISE, E_LAND_RAISE, E_LAND_REVERT, E_LAND_SMOOTH, f, gAgent, LLToolMgr::getCurrentTool(), LLLinkedList< DATA_TYPE >::getFirstData(), LLAgent::getID(), LLViewerRegion::getLand(), LLParcel::getLocalID(), LLLinkedList< DATA_TYPE >::getNextData(), LLViewerParcelMgr::getParcelSelection(), LLRegionPosition::getPositionRegion(), LLRegionPosition::getRegion(), LLControlGroup::getS32(), LLViewerParcelMgr::getSelection(), LLAgent::getSessionID(), LLSurface::getZ(), gMessageSystem, gParcelMgr, gSavedSettings, gToolMgr, gToolParcel, i, j, llclamp(), mBrushIndex, LLVector3d::mdV, LLSurface::mGridsPerEdge, mLastAffectedRegions, mStartingZ, LLVector3::mV, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), NULL, LLLinkedList< DATA_TYPE >::removeAllNodes(), LLSurface::resolvePatchRegion(), S32, LLViewerParcelMgr::selectionEmpty(), LLMessageSystem::sendMessage(), VX, and VY.

Referenced by click_apply_to_selection().

void LLToolBrushLand::onIdle ( void brush_tool  )  [static]

Definition at line 538 of file lltoolbrush.cpp.

References LLCallbackList::deleteFunction(), LLToolMgr::getCurrentTool(), gIdleCallbacks, and gToolMgr.

Referenced by handleMouseDown(), handleMouseUp(), and onMouseCaptureLost().

void LLToolBrushLand::onMouseCaptureLost (  )  [virtual]

Reimplemented from LLTool.

Definition at line 552 of file lltoolbrush.cpp.

References LLCallbackList::deleteFunction(), gIdleCallbacks, and onIdle().

void LLToolBrushLand::render (  )  [virtual]

Reimplemented from LLTool.

Definition at line 442 of file lltoolbrush.cpp.

References determineAffectedRegions(), FALSE, gAgent, LLLinkedList< DATA_TYPE >::getFirstData(), LLLinkedList< DATA_TYPE >::getNextData(), LLViewerRegion::getPosRegionFromGlobal(), LLAgent::getRegion(), LLControlGroup::getS32(), gSavedSettings, gViewerWindow, mBrushIndex, LLVector3d::mdV, mGotHover, mMouseX, mMouseY, LLViewerWindow::mousePointOnLandGlobal(), NULL, renderOverlay(), VX, and VY.

void LLToolBrushLand::renderOverlay ( LLSurface land,
const LLVector3 pos_region,
const LLVector3 pos_world 
) [protected]

Definition at line 472 of file lltoolbrush.cpp.

References f, LLSurface::getZ(), glBegin, glColor4fv, glTranslatef, i, j, LAND_BRUSH_SIZE, llfloor(), mBrushIndex, LLSurface::mGridsPerEdge, LLVector3::mV, LLColor4::mV, OVERLAY_COLOR, S32, VX, and VY.

Referenced by render().

void LLToolBrushLand::undo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 558 of file lltoolbrush.cpp.

References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_SessionID, _PREHASH_UndoLand, LLMessageSystem::addUUIDFast(), gAgent, LLLinkedList< DATA_TYPE >::getFirstData(), LLAgent::getID(), LLLinkedList< DATA_TYPE >::getNextData(), LLAgent::getSessionID(), gMessageSystem, mLastAffectedRegions, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), NULL, and LLMessageSystem::sendMessage().


Member Data Documentation

S32 LLToolBrushLand::mBrushIndex [protected]

Definition at line 102 of file lltoolbrush.h.

Referenced by determineAffectedRegions(), LLToolBrushLand(), modifyLandAtPointGlobal(), modifyLandInSelectionGlobal(), render(), and renderOverlay().

BOOL LLToolBrushLand::mBrushSelected [protected]

Definition at line 105 of file lltoolbrush.h.

Referenced by handleDeselect(), and handleSelect().

BOOL LLToolBrushLand::mGotHover [protected]

Definition at line 103 of file lltoolbrush.h.

Referenced by handleHover(), and render().

LLLinkedList<LLViewerRegion> LLToolBrushLand::mLastAffectedRegions [protected]

Definition at line 106 of file lltoolbrush.h.

Referenced by handleMouseUp(), modifyLandAtPointGlobal(), modifyLandInSelectionGlobal(), and undo().

BOOL LLToolBrushLand::mLastShowParcelOwners [protected]

Definition at line 104 of file lltoolbrush.h.

Referenced by handleDeselect(), and handleSelect().

S32 LLToolBrushLand::mMouseX [protected]

Definition at line 100 of file lltoolbrush.h.

Referenced by brush(), handleHover(), handleMouseDown(), and render().

S32 LLToolBrushLand::mMouseY [protected]

Definition at line 101 of file lltoolbrush.h.

Referenced by brush(), handleHover(), handleMouseDown(), and render().

F32 LLToolBrushLand::mStartingZ [protected]

Definition at line 99 of file lltoolbrush.h.

Referenced by handleMouseDown(), modifyLandAtPointGlobal(), and modifyLandInSelectionGlobal().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:52 2010 for Second Life Viewer by  doxygen 1.4.7