LLToolGrab Class Reference

#include <lltoolgrab.h>

Inheritance diagram for LLToolGrab:

Inheritance graph
[legend]
Collaboration diagram for LLToolGrab:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLToolGrab (LLToolComposite *composite=NULL)
 ~LLToolGrab ()
BOOL handleHover (S32 x, S32 y, MASK mask)
BOOL handleMouseDown (S32 x, S32 y, MASK mask)
BOOL handleMouseUp (S32 x, S32 y, MASK mask)
BOOL handleDoubleClick (S32 x, S32 y, MASK mask)
void render ()
void draw ()
virtual void handleSelect ()
virtual void handleDeselect ()
virtual LLViewerObjectgetEditingObject ()
virtual LLVector3d getEditingPointGlobal ()
virtual BOOL isEditing ()
virtual void stopEditing ()
virtual void onMouseCaptureLost ()
BOOL hasGrabOffset ()
LLVector3 getGrabOffset (S32 x, S32 y)
BOOL handleObjectHit (LLViewerObject *objectp, S32 x, S32 y, MASK mask)
BOOL getHideBuildHighlight ()

Static Public Member Functions

static void pickCallback (S32 x, S32 y, MASK mask)

Private Types

enum  EGrabMode {
  GRAB_INACTIVE, GRAB_ACTIVE_CENTER, GRAB_NONPHYSICAL, GRAB_LOCKED,
  GRAB_NOOBJECT
}

Private Member Functions

LLVector3d getGrabPointGlobal ()
void startGrab (S32 x, S32 y)
void stopGrab ()
void startSpin ()
void stopSpin ()
void handleHoverSpin (S32 x, S32 y, MASK mask)
void handleHoverActive (S32 x, S32 y, MASK mask)
void handleHoverInactive (S32 x, S32 y, MASK mask)
void handleHoverFailed (S32 x, S32 y, MASK mask)

Private Attributes

EGrabMode mMode
BOOL mVerticalDragging
BOOL mHitLand
LLUUID mHitObjectID
LLPointer< LLViewerObjectmGrabObject
LLTimer mGrabTimer
LLVector3 mGrabOffsetFromCenterInitial
LLVector3 mGrabOffset
LLVector3d mGrabHiddenOffsetFromCamera
LLVector3d mDragStartPointGlobal
LLVector3d mDragStartFromCamera
S32 mLastMouseX
S32 mLastMouseY
S32 mMouseDownX
S32 mMouseDownY
MASK mMouseMask
S32 mAccumDeltaX
S32 mAccumDeltaY
BOOL mHasMoved
BOOL mOutsideSlop
BOOL mDeselectedThisClick
BOOL mSpinGrabbing
LLQuaternion mSpinRotation
BOOL mHideBuildHighlight


Detailed Description

Definition at line 45 of file lltoolgrab.h.


Member Enumeration Documentation

enum LLToolGrab::EGrabMode [private]

Enumerator:
GRAB_INACTIVE 
GRAB_ACTIVE_CENTER 
GRAB_NONPHYSICAL 
GRAB_LOCKED 
GRAB_NOOBJECT 

Definition at line 92 of file lltoolgrab.h.


Constructor & Destructor Documentation

LLToolGrab::LLToolGrab ( LLToolComposite composite = NULL  ) 

Definition at line 77 of file lltoolgrab.cpp.

LLToolGrab::~LLToolGrab (  ) 

Definition at line 92 of file lltoolgrab.cpp.


Member Function Documentation

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

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

Reimplemented from LLTool.

Definition at line 127 of file lltoolgrab.cpp.

References FALSE, gAgent, gDebugClicks, gViewerWindow, LLTool::handleMouseDown(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLAgent::leftButtonGrabbed(), llendl, llinfos, mHitLand, pickCallback(), and TRUE.

Referenced by LLToolGun::handleMouseDown(), and LLToolCompGun::handleMouseDown().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from LLTool.

Definition at line 754 of file lltoolgrab.cpp.

References FALSE, gBasicToolset, GRAB_INACTIVE, LLTool::handleMouseUp(), LLTool::hasMouseCapture(), mMode, NULL, LLToolset::selectTool(), LLTool::setMouseCapture(), and TRUE.

Here is the call graph for this function:

BOOL LLToolGrab::handleDoubleClick ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLTool.

Definition at line 117 of file lltoolgrab.cpp.

References FALSE, gDebugClicks, llendl, and llinfos.

Referenced by LLToolCompGun::handleDoubleClick().

Here is the caller graph for this function:

void LLToolGrab::render (  )  [virtual]

Reimplemented from LLTool.

Definition at line 871 of file lltoolgrab.cpp.

void LLToolGrab::draw ( void   )  [virtual]

Reimplemented from LLTool.

Definition at line 868 of file lltoolgrab.cpp.

void LLToolGrab::handleSelect (  )  [virtual]

Reimplemented from LLTool.

Definition at line 97 of file lltoolgrab.cpp.

References FALSE, gFloaterTools, gGrabBtnSpin, gGrabBtnVertical, and LLFloaterTools::setStatusText().

Here is the call graph for this function:

void LLToolGrab::handleDeselect (  )  [virtual]

Reimplemented from LLTool.

Definition at line 108 of file lltoolgrab.cpp.

References FALSE, LLTool::hasMouseCapture(), and LLTool::setMouseCapture().

Here is the call graph for this function:

LLViewerObject * LLToolGrab::getEditingObject (  )  [virtual]

Reimplemented from LLTool.

Definition at line 881 of file lltoolgrab.cpp.

References mGrabObject.

Referenced by LLVOAvatar::needsRenderBeam().

Here is the caller graph for this function:

LLVector3d LLToolGrab::getEditingPointGlobal (  )  [virtual]

Reimplemented from LLTool.

Definition at line 887 of file lltoolgrab.cpp.

References getGrabPointGlobal().

Here is the call graph for this function:

BOOL LLToolGrab::isEditing (  )  [virtual]

Reimplemented from LLTool.

Definition at line 874 of file lltoolgrab.cpp.

References mGrabObject, and NULL.

Referenced by LLVOAvatar::needsRenderBeam().

Here is the caller graph for this function:

void LLToolGrab::stopEditing (  )  [virtual]

Reimplemented from LLTool.

Definition at line 777 of file lltoolgrab.cpp.

References FALSE, LLTool::hasMouseCapture(), and LLTool::setMouseCapture().

Here is the call graph for this function:

void LLToolGrab::onMouseCaptureLost (  )  [virtual]

BOOL LLToolGrab::hasGrabOffset (  )  [inline]

Definition at line 68 of file lltoolgrab.h.

References TRUE.

LLVector3 LLToolGrab::getGrabOffset ( S32  x,
S32  y 
)

BOOL LLToolGrab::handleObjectHit ( LLViewerObject objectp,
S32  x,
S32  y,
MASK  mask 
)

BOOL LLToolGrab::getHideBuildHighlight (  )  [inline]

Definition at line 75 of file lltoolgrab.h.

References mHideBuildHighlight.

void LLToolGrab::pickCallback ( S32  x,
S32  y,
MASK  mask 
) [static]

LLVector3d LLToolGrab::getGrabPointGlobal (  )  [private]

Definition at line 892 of file lltoolgrab.cpp.

References gAgent, LLAgent::getCameraPositionGlobal(), LLAgent::getPositionGlobal(), GRAB_ACTIVE_CENTER, GRAB_INACTIVE, GRAB_LOCKED, GRAB_NONPHYSICAL, GRAB_NOOBJECT, mGrabHiddenOffsetFromCamera, and mMode.

Referenced by getEditingPointGlobal().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLToolGrab::startGrab ( S32  x,
S32  y 
) [private]

void LLToolGrab::stopGrab (  )  [private]

void LLToolGrab::startSpin (  )  [private]

void LLToolGrab::stopSpin (  )  [private]

void LLToolGrab::handleHoverSpin ( S32  x,
S32  y,
MASK  mask 
) [private]

void LLToolGrab::handleHoverActive ( S32  x,
S32  y,
MASK  mask 
) [private]

Definition at line 429 of file lltoolgrab.cpp.

References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_GrabOffsetInitial, _PREHASH_GrabPosition, _PREHASH_ObjectData, _PREHASH_ObjectGrabUpdate, _PREHASH_ObjectID, _PREHASH_ObjectSpinUpdate, _PREHASH_Rotation, _PREHASH_SessionID, _PREHASH_TimeSinceLast, LLMessageSystem::addQuatFast(), LLMessageSystem::addU32Fast(), LLMessageSystem::addUUIDFast(), LLMessageSystem::addVector3Fast(), ANIMATE, LLAgent::calcFocusPositionTargetGlobal(), LLAgent::cameraMouselook(), LLAgent::cameraOrbitAround(), LLAgent::clearFocusObject(), LLViewerWindow::clickPointInWorldGlobal(), LLWorld::clipToVisibleRegions(), DEG_TO_RAD, FALSE, gAgent, LLAgent::getAvatarObject(), LLAgent::getCameraPositionGlobal(), LLTimer::getElapsedTimeAndResetF32(), LLAgent::getFocusOnAvatar(), LLAgent::getID(), LLSingleton< LLSelectMgr >::getInstance(), LLSingleton< LLWorld >::getInstance(), LLSingleton< LLViewerCamera >::getInstance(), LLCoordFrame::getLeftAxis(), LLAgent::getPosAgentFromGlobal(), LLXform::getRoot(), LLAgent::getSessionID(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gFPSClamped, gGrabBtnSpin, gGrabBtnVertical, gMessageSystem, gViewerWindow, LLTool::hasMouseCapture(), llassert, lldebugst, llendl, mAccumDeltaX, mAccumDeltaY, MASK_SPIN, MASK_VERTICAL, MAX_OBJECT_Z, mDragStartFromCamera, mDragStartPointGlobal, LLVector3d::mdV, mGrabHiddenOffsetFromCamera, mGrabObject, mGrabOffsetFromCenterInitial, mGrabTimer, mHasMoved, mOutsideSlop, LLViewerWindow::moveCursorToCenter(), mSpinGrabbing, mSpinRotation, mVerticalDragging, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLVector3d::normVec(), LLUUID::null, LLViewerCamera::projectPosAgentToScreen(), LLWorld::resolveLandHeightGlobal(), S32, LLMessageSystem::sendMessage(), LLViewerWindow::setCursor(), LLAgent::setFocusGlobal(), LLAgent::setFocusOnAvatar(), LLTool::setMouseCapture(), LLVector3d::setVec(), SLOP_DIST_SQ, startSpin(), stopSpin(), TRUE, UI_CURSOR_ARROW, LLSelectMgr::updateSelectionCenter(), VZ, LLAgent::yaw(), and LLVector3d::z_axis.

Referenced by handleHover().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLToolGrab::handleHoverInactive ( S32  x,
S32  y,
MASK  mask 
) [private]

Definition at line 683 of file lltoolgrab.cpp.

References LLAgent::cameraThirdPerson(), DEG_TO_RAD, gAgent, LLControlGroup::getBOOL(), LLViewerWindow::getWindowWidth(), gFPSClamped, gSavedSettings, gViewerWindow, lldebugst, llendl, LLViewerWindow::setCursor(), UI_CURSOR_TOOLGRAB, and LLAgent::yaw().

Referenced by handleHover().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLToolGrab::handleHoverFailed ( S32  x,
S32  y,
MASK  mask 
) [private]

Definition at line 713 of file lltoolgrab.cpp.

References GRAB_LOCKED, GRAB_NOOBJECT, gViewerWindow, llassert, lldebugst, llendl, mMode, mMouseDownX, mMouseDownY, mOutsideSlop, S32, LLViewerWindow::setCursor(), SLOP_DIST_SQ, TRUE, UI_CURSOR_ARROW, UI_CURSOR_GRABLOCKED, and UI_CURSOR_NO.

Referenced by handleHover().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 96 of file lltoolgrab.h.

Referenced by handleHoverActive(), handleObjectHit(), and stopGrab().

Definition at line 98 of file lltoolgrab.h.

Referenced by handleMouseDown().

Definition at line 99 of file lltoolgrab.h.

Referenced by handleObjectHit(), and pickCallback().

Definition at line 102 of file lltoolgrab.h.

Referenced by handleHoverActive(), and startGrab().

Definition at line 104 of file lltoolgrab.h.

Referenced by handleHoverActive(), and startGrab().

Definition at line 105 of file lltoolgrab.h.

Referenced by handleObjectHit(), and stopGrab().

Definition at line 106 of file lltoolgrab.h.

Referenced by getGrabPointGlobal(), handleHoverActive(), and startGrab().

Definition at line 108 of file lltoolgrab.h.

Referenced by handleHoverActive(), and startGrab().

Definition at line 109 of file lltoolgrab.h.

Referenced by handleHoverActive(), and startGrab().

Definition at line 111 of file lltoolgrab.h.

Referenced by handleHover().

Definition at line 112 of file lltoolgrab.h.

Referenced by handleHover().

Definition at line 113 of file lltoolgrab.h.

Referenced by handleHoverFailed(), handleObjectHit(), and onMouseCaptureLost().

Definition at line 114 of file lltoolgrab.h.

Referenced by handleHoverFailed(), handleObjectHit(), and onMouseCaptureLost().

Definition at line 115 of file lltoolgrab.h.

Referenced by handleObjectHit().

Definition at line 116 of file lltoolgrab.h.

Referenced by handleHoverActive(), handleObjectHit(), and onMouseCaptureLost().

Definition at line 117 of file lltoolgrab.h.

Referenced by handleHoverActive(), handleObjectHit(), and onMouseCaptureLost().

Definition at line 118 of file lltoolgrab.h.

Referenced by handleHoverActive(), handleObjectHit(), and onMouseCaptureLost().

Definition at line 119 of file lltoolgrab.h.

Referenced by handleHoverActive(), handleHoverFailed(), and handleObjectHit().

Definition at line 120 of file lltoolgrab.h.

Referenced by pickCallback().

Definition at line 122 of file lltoolgrab.h.

Referenced by handleHoverActive(), startSpin(), and stopSpin().

Definition at line 123 of file lltoolgrab.h.

Referenced by handleHoverActive(), and startSpin().

Definition at line 125 of file lltoolgrab.h.

Referenced by getHideBuildHighlight(), handleObjectHit(), onMouseCaptureLost(), and stopGrab().


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

Generated on Fri May 16 09:17:26 2008 for SecondLife by  doxygen 1.5.5