#include <lltoolbrush.h>
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 () const |
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 (region_list_t ®ions, 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 |
region_list_t | mLastAffectedRegions |
Private Types | |
typedef std::set < LLViewerRegion * > | region_list_t |
Definition at line 49 of file lltoolbrush.h.
typedef std::set<LLViewerRegion*> LLToolBrushLand::region_list_t [private] |
Definition at line 51 of file lltoolbrush.h.
LLToolBrushLand::LLToolBrushLand | ( | ) |
============================================================================ Class LLToolBrushLand ============================================================================
Definition at line 91 of file lltoolbrush.cpp.
References LLControlGroup::getS32(), gSavedSettings, and mBrushIndex.
Reimplemented from LLTool.
Definition at line 346 of file lltoolbrush.cpp.
References LLCallbackList::addFunction(), alertNoTerraform(), canTerraform(), FALSE, LLSingleton< LLViewerParcelMgr >::getInstance(), LLViewerRegion::getLand(), LLRegionPosition::getPositionRegion(), LLRegionPosition::getRegion(), LLSurface::getZ(), gIdleCallbacks, 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.
Reimplemented from LLTool.
Definition at line 396 of file lltoolbrush.cpp.
References LLCallbackList::deleteFunction(), FALSE, LLSingleton< LLViewerParcelMgr >::getInstance(), gIdleCallbacks, LLTool::hasMouseCapture(), mLastAffectedRegions, onIdle(), LLTool::setMouseCapture(), LLViewerParcelMgr::setSelectionVisible(), and TRUE.
Reimplemented from LLTool.
Definition at line 384 of file lltoolbrush.cpp.
References LLViewerWindow::getWindow(), gViewerWindow, LLTool::hasMouseCapture(), lldebugst, llendl, mGotHover, mMouseX, mMouseY, LLWindow::setCursor(), TRUE, and UI_CURSOR_TOOLLAND.
void LLToolBrushLand::handleSelect | ( | ) | [virtual] |
Reimplemented from LLTool.
Definition at line 414 of file lltoolbrush.cpp.
References LLEditMenuHandler::gEditMenuHandler, LLControlGroup::getBOOL(), gFloaterTools, gSavedSettings, mBrushSelected, mLastShowParcelOwners, LLControlGroup::setBOOL(), LLFloaterTools::setStatusText(), and TRUE.
void LLToolBrushLand::handleDeselect | ( | ) | [virtual] |
Reimplemented from LLTool.
Definition at line 428 of file lltoolbrush.cpp.
References FALSE, LLEditMenuHandler::gEditMenuHandler, LLControlGroup::getBOOL(), LLSingleton< LLViewerParcelMgr >::getInstance(), gSavedSettings, mBrushSelected, mLastShowParcelOwners, NULL, LLControlGroup::setBOOL(), LLViewerParcelMgr::setSelectionVisible(), and TRUE.
virtual BOOL LLToolBrushLand::isAlwaysRendered | ( | ) | [inline, virtual] |
void LLToolBrushLand::render | ( | ) | [virtual] |
Reimplemented from LLTool.
Definition at line 441 of file lltoolbrush.cpp.
References determineAffectedRegions(), FALSE, gAgent, LLViewerRegion::getLand(), LLViewerRegion::getPosRegionFromGlobal(), LLAgent::getRegion(), LLControlGroup::getS32(), gSavedSettings, gViewerWindow, mBrushIndex, LLVector3d::mdV, mGotHover, mMouseX, mMouseY, LLViewerWindow::mousePointOnLandGlobal(), renderOverlay(), VX, and VY.
void LLToolBrushLand::onIdle | ( | void * | brush_tool | ) | [static] |
Definition at line 533 of file lltoolbrush.cpp.
References LLCallbackList::deleteFunction(), LLToolMgr::getCurrentTool(), LLSingleton< LLToolMgr >::getInstance(), and gIdleCallbacks.
Referenced by handleMouseDown(), handleMouseUp(), and onMouseCaptureLost().
void LLToolBrushLand::onMouseCaptureLost | ( | ) | [virtual] |
Reimplemented from LLTool.
Definition at line 547 of file lltoolbrush.cpp.
References LLCallbackList::deleteFunction(), gIdleCallbacks, and onIdle().
void LLToolBrushLand::modifyLandInSelectionGlobal | ( | ) |
Definition at line 181 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, LLViewerRegion::forceUpdate(), gAgent, LLViewerRegion::getHost(), LLAgent::getID(), LLSingleton< LLToolSelectLand >::getInstance(), LLSingleton< LLToolMgr >::getInstance(), LLSingleton< LLViewerParcelMgr >::getInstance(), LLViewerRegion::getLand(), LLParcel::getLocalID(), LLViewerParcelMgr::getParcelSelection(), LLRegionPosition::getPositionRegion(), LLViewerRegion::getPosRegionFromGlobal(), LLRegionPosition::getRegion(), LLControlGroup::getS32(), LLViewerParcelMgr::getSelection(), LLAgent::getSessionID(), LLViewerRegion::getWidth(), LLSurface::getZ(), gMessageSystem, gSavedSettings, i, j, llclamp(), mBrushIndex, LLVector3d::mdV, LLSurface::mGridsPerEdge, mLastAffectedRegions, mStartingZ, LLVector3::mV, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLSurface::resolvePatchRegion(), S32, LLMessageSystem::sendMessage(), VX, and VY.
Referenced by click_apply_to_selection().
void LLToolBrushLand::undo | ( | ) | [virtual] |
Reimplemented from LLEditMenuHandler.
Definition at line 553 of file lltoolbrush.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_SessionID, _PREHASH_UndoLand, LLMessageSystem::addUUIDFast(), gAgent, LLViewerRegion::getHost(), LLAgent::getID(), LLAgent::getSessionID(), gMessageSystem, mLastAffectedRegions, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), and LLMessageSystem::sendMessage().
virtual BOOL LLToolBrushLand::canUndo | ( | ) | const [inline, virtual] |
void LLToolBrushLand::brush | ( | void | ) | [protected] |
Definition at line 333 of file lltoolbrush.cpp.
References LLKeyboard::currentMask(), gKeyboard, gViewerWindow, LLVector3d::mdV, mMouseX, mMouseY, modifyLandAtPointGlobal(), LLViewerWindow::mousePointOnLandGlobal(), TRUE, VX, and VY.
void LLToolBrushLand::modifyLandAtPointGlobal | ( | const LLVector3d & | spot, | |
MASK | mask | |||
) | [protected] |
Definition at line 103 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, LLViewerRegion::forceUpdate(), gAgent, LLViewerRegion::getHost(), LLAgent::getID(), LLViewerRegion::getLand(), LLViewerRegion::getPosRegionFromGlobal(), LLControlGroup::getS32(), LLAgent::getSessionID(), gFPSClamped, gMessageSystem, gSavedSettings, mBrushIndex, mLastAffectedRegions, mStartingZ, LLVector3::mV, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLSurface::resolvePatchRegion(), S32, LLMessageSystem::sendMessage(), VX, and VY.
Referenced by brush().
void LLToolBrushLand::determineAffectedRegions | ( | region_list_t & | regions, | |
const LLVector3d & | spot | |||
) | const [protected] |
Definition at line 500 of file lltoolbrush.cpp.
References LLSingleton< LLWorld >::getInstance(), LLWorld::getRegionFromPosGlobal(), LAND_BRUSH_SIZE, mBrushIndex, LLVector3d::mdV, NULL, VX, and VY.
Referenced by modifyLandAtPointGlobal(), modifyLandInSelectionGlobal(), and render().
void LLToolBrushLand::renderOverlay | ( | LLSurface & | land, | |
const LLVector3 & | pos_region, | |||
const LLVector3 & | pos_world | |||
) | [protected] |
Definition at line 471 of file lltoolbrush.cpp.
References LLGLImmediate::begin(), LLGLImmediate::color4fv(), LLGLImmediate::end(), LLSurface::getZ(), gGL, i, j, LAND_BRUSH_SIZE, llfloor(), mBrushIndex, LLSurface::mGridsPerEdge, LLVector3::mV, LLColor4::mV, OVERLAY_COLOR, LLVertexBuffer::POINTS, S32, LLGLImmediate::vertex3f(), VX, and VY.
Referenced by render().
bool LLToolBrushLand::canTerraform | ( | LLViewerRegion * | regionp | ) | const [protected] |
Definition at line 584 of file lltoolbrush.cpp.
References LLViewerRegion::canManageEstate(), LLViewerRegion::getRegionFlags(), and REGION_FLAGS_BLOCK_TERRAFORM.
Referenced by handleMouseDown(), and modifyLandInSelectionGlobal().
void LLToolBrushLand::alertNoTerraform | ( | LLViewerRegion * | regionp | ) | [protected] |
Definition at line 592 of file lltoolbrush.cpp.
References LLViewerWindow::alertXml(), LLViewerRegion::getName(), and gViewerWindow.
Referenced by handleMouseDown(), and modifyLandInSelectionGlobal().
F32 LLToolBrushLand::mStartingZ [protected] |
Definition at line 95 of file lltoolbrush.h.
Referenced by handleMouseDown(), modifyLandAtPointGlobal(), and modifyLandInSelectionGlobal().
S32 LLToolBrushLand::mMouseX [protected] |
Definition at line 96 of file lltoolbrush.h.
Referenced by brush(), handleHover(), handleMouseDown(), and render().
S32 LLToolBrushLand::mMouseY [protected] |
Definition at line 97 of file lltoolbrush.h.
Referenced by brush(), handleHover(), handleMouseDown(), and render().
S32 LLToolBrushLand::mBrushIndex [protected] |
Definition at line 98 of file lltoolbrush.h.
Referenced by determineAffectedRegions(), LLToolBrushLand(), modifyLandAtPointGlobal(), modifyLandInSelectionGlobal(), render(), and renderOverlay().
BOOL LLToolBrushLand::mGotHover [protected] |
BOOL LLToolBrushLand::mLastShowParcelOwners [protected] |
BOOL LLToolBrushLand::mBrushSelected [protected] |
region_list_t LLToolBrushLand::mLastAffectedRegions [protected] |
Definition at line 103 of file lltoolbrush.h.
Referenced by handleMouseUp(), modifyLandAtPointGlobal(), modifyLandInSelectionGlobal(), and undo().