LLManipTranslate Class Reference

#include <llmaniptranslate.h>

Inheritance diagram for LLManipTranslate:

Inheritance graph
[legend]
Collaboration diagram for LLManipTranslate:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLManipTranslate (LLToolComposite *composite)
virtual ~LLManipTranslate ()
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 render ()
virtual void handleSelect ()
virtual void handleDeselect ()
virtual void highlightManipulators (S32 x, S32 y)
virtual BOOL handleMouseDownOnPart (S32 x, S32 y, MASK mask)
virtual BOOL canAffectSelection ()

Static Public Member Functions

static void restoreGL ()

Protected Types

enum  EHandleType { HANDLE_CONE, HANDLE_BOX, HANDLE_SPHERE }

Protected Member Functions

void renderArrow (S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, BOOL reverse_direction)
void renderTranslationHandles ()
void renderText ()
void renderSnapGuides ()
void renderGrid (F32 x, F32 y, F32 size, F32 r, F32 g, F32 b, F32 a)
void renderGridVert (F32 x_trans, F32 y_trans, F32 r, F32 g, F32 b, F32 alpha)
void highlightIntersection (LLVector3 normal, LLVector3 selection_center, LLQuaternion grid_rotation, LLColor4 inner_color)
F32 getMinGridScale ()

Private Types

typedef std::set
< ManipulatorHandle
*, compare_manipulators
minpulator_list_t

Private Attributes

S32 mLastHoverMouseX
S32 mLastHoverMouseY
BOOL mSendUpdateOnMouseUp
BOOL mMouseOutsideSlop
BOOL mCopyMadeThisDrag
S32 mMouseDownX
S32 mMouseDownY
F32 mAxisArrowLength
F32 mConeSize
F32 mArrowLengthMeters
F32 mGridSizeMeters
F32 mPlaneManipOffsetMeters
EManipPart mManipPart
LLVector3 mManipNormal
LLVector3d mDragCursorStartGlobal
LLVector3d mDragSelectionStartGlobal
LLTimer mUpdateTimer
minpulator_list_t mProjectedManipulators
LLVector4 mManipulatorVertices [18]
F32 mSnapOffsetMeters
LLVector3 mSnapOffsetAxis
LLQuaternion mGridRotation
LLVector3 mGridOrigin
LLVector3 mGridScale
F32 mSubdivisions
BOOL mInSnapRegime
BOOL mSnapped
LLVector3 mArrowScales
LLVector3 mPlaneScales
LLVector4 mPlaneManipPositions

Classes

struct  compare_manipulators
class  ManipulatorHandle


Detailed Description

Definition at line 40 of file llmaniptranslate.h.


Member Typedef Documentation

Definition at line 118 of file llmaniptranslate.h.


Member Enumeration Documentation

Enumerator:
HANDLE_CONE 
HANDLE_BOX 
HANDLE_SPHERE 

Definition at line 71 of file llmaniptranslate.h.


Constructor & Destructor Documentation

LLManipTranslate::LLManipTranslate ( LLToolComposite composite  ) 

Definition at line 103 of file llmaniptranslate.cpp.

References restoreGL(), and sGridTex.

Here is the call graph for this function:

LLManipTranslate::~LLManipTranslate (  )  [virtual]

Definition at line 247 of file llmaniptranslate.cpp.

References mProjectedManipulators.


Member Function Documentation

void LLManipTranslate::restoreGL (  )  [static]

Definition at line 130 of file llmaniptranslate.cpp.

References d, i, j, and sGridTex.

Referenced by LLManipTranslate(), and LLViewerWindow::restoreGL().

Here is the caller graph for this function:

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

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

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

Reimplemented from LLManip.

Definition at line 382 of file llmaniptranslate.cpp.

References LLVector3::abs(), LLAgent::cameraOrbitAround(), LLVOAvatar::clampAttachmentPositions(), LLAgent::clearFocusObject(), LLWorld::clipToVisibleRegions(), DEG_TO_RAD, dialog_refresh_all(), FALSE, gAgent, LLCoordFrame::getAtAxis(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLControlGroup::getF32(), LLSingleton< LLWorld >::getInstance(), LLSingleton< LLViewerCamera >::getInstance(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::getManipAxis(), LLWorld::getMinAllowedZ(), getMinGridScale(), LLManip::getMousePointOnPlaneGlobal(), LLSelectNode::getObject(), LLXform::getParent(), LLPrimitive::getPCode(), LLManip::getPivotPoint(), LLAgent::getPosAgentFromGlobal(), LLAgent::getPosGlobalFromAgent(), LLXform::getPosition(), LLViewerObject::getPositionAgent(), LLViewerObject::getPositionGlobal(), LLXform::getRotation(), LLManip::getSubdivisionLevel(), LLViewerWindow::getWindowWidth(), LLXform::getWorldRotation(), gFPSClamped, gSavedSettings, gViewerWindow, LLTool::hasMouseCapture(), highlightManipulators(), LLViewerObject::isAttachment(), LLXform::isRootEdit(), LLViewerObject::isSelected(), LL_PCODE_LEGACY_GRASS, LLManip::LL_XY_PLANE, LLManip::LL_XZ_PLANE, LLManip::LL_YZ_PLANE, llabs(), llclamp(), lldebugst, llendl, llwarns, LLVector3d::magVecSquared(), MASK_COPY, MAX_OBJECT_Z, mCopyMadeThisDrag, mDragCursorStartGlobal, mDragSelectionStartGlobal, LLVector3d::mdV, mGridOrigin, mGridRotation, mGridScale, LLSelectNode::mIndividualSelection, mInSnapRegime, mLastHoverMouseX, mLastHoverMouseY, LLSelectNode::mLastPositionLocal, mManipNormal, mManipPart, mMouseDownX, mMouseDownY, mMouseOutsideSlop, LLManip::mObjectSelection, MOUSE_DRAG_SLOP, LLSelectNode::mSavedPositionGlobal, LLSelectNode::mSavedPositionLocal, mSnapOffsetAxis, mSnapOffsetMeters, mSubdivisions, LLVector3::mV, LLVector3d::normVec(), LLVector3::normVec(), LLViewerObject::permMove(), projected_vec(), LLManip::rebuild(), LLWorld::resolveLandHeightGlobal(), LLVector3::rotVec(), S32, LLVector3::scaleVec(), SELECT_TYPE_HUD, LLSelectMgr::selectDuplicate(), LLViewerWindow::setCursor(), LLViewerObject::setPosition(), LLVector3d::setVec(), LLManip::sGridMaxSubdivisionLevel, LLManip::sGridMinSubdivisionLevel, LLQuaternion::transQuat(), TRUE, UI_CURSOR_NOLOCKED, UI_CURSOR_TOOLTRANSLATE, LLSelectMgr::updateSelectionCenter(), VX, VY, VZ, and LLVector3::zero.

Referenced by handleMouseUp().

Here is the caller graph for this function:

void LLManipTranslate::render (  )  [virtual]

void LLManipTranslate::handleSelect (  )  [virtual]

void LLManipTranslate::handleDeselect (  )  [virtual]

Reimplemented from LLManip.

Definition at line 260 of file llmaniptranslate.cpp.

References LLManip::handleDeselect(), LLManip::LL_NO_PART, LLManip::mHighlightedPart, and mManipPart.

Here is the call graph for this function:

void LLManipTranslate::highlightManipulators ( S32  x,
S32  y 
) [virtual]

BOOL LLManipTranslate::handleMouseDownOnPart ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Implements LLManip.

Definition at line 288 of file llmaniptranslate.cpp.

References canAffectSelection(), LLSelectMgr::enableSilhouette(), FALSE, gAgent, LLControlGroup::getBOOL(), LLSelectMgr::getGrid(), LLSingleton< LLViewerCamera >::getInstance(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::getManipAxis(), LLManip::getManipNormal(), getMinGridScale(), LLManip::getMousePointOnPlaneGlobal(), LLSelectNode::getObject(), LLManip::getPivotPoint(), LLAgent::getPosGlobalFromAgent(), LLManip::getSubdivisionLevel(), gSavedSettings, gViewerWindow, highlightManipulators(), LLManip::LL_X_ARROW, LLManip::LL_XY_PLANE, LLManip::LL_XZ_PLANE, LLManip::LL_Y_ARROW, LLManip::LL_YZ_PLANE, LLManip::LL_Z_ARROW, llclamp(), llendl, llwarns, mCopyMadeThisDrag, mDragCursorStartGlobal, mDragSelectionStartGlobal, mGridOrigin, mGridRotation, mGridScale, LLManip::mHelpTextTimer, LLManip::mHighlightedPart, mManipNormal, mManipPart, mMouseDownX, mMouseDownY, mMouseOutsideSlop, LLManip::mObjectSelection, mSubdivisions, LLCoord::mX, LLCoord::mY, LLFrameTimer::reset(), S32, LLSelectMgr::saveSelectedObjectTransform(), SELECT_ACTION_TYPE_MOVE, LLViewerWindow::setCursor(), LLUI::setCursorPositionScreen(), LLTool::setMouseCapture(), LLManip::sGridMaxSubdivisionLevel, LLManip::sGridMinSubdivisionLevel, LLManip::sNumTimesHelpTextShown, TRUE, UI_CURSOR_TOOLTRANSLATE, LLSelectMgr::updateSelectionCenter(), and LLVector3::z_axis.

Referenced by handleMouseDown().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLManipTranslate::canAffectSelection (  )  [virtual]

Implements LLManip.

Definition at line 2260 of file llmaniptranslate.cpp.

References LLControlGroup::getBOOL(), gSavedSettings, LLManip::mObjectSelection, LLViewerObject::permModify(), and LLViewerObject::permMove().

Referenced by handleMouseDownOnPart().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipTranslate::renderArrow ( S32  which_arrow,
S32  selected_arrow,
F32  box_size,
F32  arrow_size,
F32  handle_size,
BOOL  reverse_direction 
) [protected]

void LLManipTranslate::renderTranslationHandles (  )  [protected]

Definition at line 1752 of file llmaniptranslate.cpp.

References LLGLImmediate::begin(), LLGLImmediate::color4f(), LLGLImmediate::color4fv(), LLQuaternion::conjQuat(), dist_vec(), LLGLImmediate::end(), FALSE, gAgent, LLQuaternion::getAngleAxis(), LLCoordFrame::getAtAxis(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLAgent::getCameraPositionAgent(), LLControlGroup::getF32(), LLSelectMgr::getGrid(), LLSingleton< LLViewerCamera >::getInstance(), LLSingleton< LLSelectMgr >::getInstance(), LLCriticalDamp::getInterpolant(), LLManip::getManipAxis(), LLCoordFrame::getOrigin(), LLManip::getPivotPoint(), LLViewerObject::getPositionAgent(), LLAgent::getPositionAgent(), LLCamera::getView(), LLCamera::getViewHeightInPixels(), LLViewerWindow::getWindowHeight(), gGL, gSavedSettings, gViewerWindow, i, lerp(), LLVertexBuffer::LINES, LLManip::LL_NO_PART, LLManip::LL_X_ARROW, LLManip::LL_XY_PLANE, LLManip::LL_XZ_PLANE, LLManip::LL_Y_ARROW, LLManip::LL_YZ_PLANE, LLManip::LL_Z_ARROW, llabs(), MANIPULATOR_SCALE_HALF_LIFE, mArrowLengthMeters, mArrowScales, mAxisArrowLength, mConeSize, mGridSizeMeters, LLManip::mHighlightedPart, LLVOAvatar::mHUDCurZoom, MIN_PLANE_MANIP_DOT_PRODUCT, mManipPart, LLManip::mObjectSelection, mPlaneManipOffsetMeters, mPlaneManipPositions, mPlaneScales, LLColor4::mV, LLVector4::mV, LLVector3::mV, LLVector3::normVec(), NUM_AXES, PLANE_TICK_SIZE, LLGLImmediate::popMatrix(), LLGLImmediate::pushMatrix(), RAD_TO_DEG, renderArrow(), S32, SELECT_TYPE_HUD, SELECTED_ARROW_SCALE, LLUI::setLineWidth(), LLVector3::setVec(), LLColor4::setVec(), LLGLImmediate::translatef(), LLVertexBuffer::TRIANGLES, TRUE, LLGLImmediate::vertex3f(), LLGLImmediate::vertex3fv(), VX, VY, VZ, and LLVector3::x_axis.

Referenced by render().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipTranslate::renderText (  )  [protected]

Definition at line 1734 of file llmaniptranslate.cpp.

References LLManip::getPivotPoint(), LLViewerObject::getPositionEdit(), LLManip::mObjectSelection, LLManip::renderXYZ(), and TRUE.

Referenced by render().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipTranslate::renderSnapGuides (  )  [protected]

Definition at line 1075 of file llmaniptranslate.cpp.

References LLVector3::abs(), ARROW_TO_AXIS, LLGLImmediate::begin(), LLGLImmediate::blendFunc(), clamp_rescale(), LLGLImmediate::color4f(), dist_vec(), LLGLImmediate::end(), FALSE, LLGLImmediate::flush(), gAgent, gColors, LLQuaternion::getAngleAxis(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLControlGroup::getColor(), LLFrameTimer::getElapsedTimeF32(), LLControlGroup::getF32(), LLSelectMgr::getGrid(), LLSelectMgr::getGridMode(), LLSingleton< LLViewerCamera >::getInstance(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::getManipAxis(), getMinGridScale(), LLSelectNode::getObject(), LLCoordFrame::getOrigin(), LLManip::getPivotPoint(), LLViewerCamera::getPixelMeterRatio(), LLAgent::getPosAgentFromGlobal(), LLManip::getSavedPivotPoint(), LLManip::getSubdivisionLevel(), LLCoordFrame::getUpAxis(), LLCamera::getView(), LLCamera::getViewHeightInPixels(), LLViewerWindow::getWindowHeight(), gGL, GRID_MODE_WORLD, gSavedSettings, gViewerWindow, highlightIntersection(), hud_render_utf8text(), i, LLVertexBuffer::LINES, LLManip::LL_NO_PART, LLManip::LL_X_ARROW, LLManip::LL_XY_PLANE, LLManip::LL_XZ_PLANE, LLManip::LL_Y_ARROW, LLManip::LL_YZ_PLANE, LLManip::LL_Z_ARROW, llabs(), llclamp(), llfloor(), llmax(), llmin(), llround(), mArrowLengthMeters, mAxisArrowLength, mConeSize, mGridOrigin, mGridRotation, mGridSizeMeters, LLManip::mHelpTextTimer, LLVOAvatar::mHUDCurZoom, mInSnapRegime, mManipPart, LLManip::mObjectSelection, LLSelectNode::mSavedPositionGlobal, mSnapOffsetAxis, mSnapOffsetMeters, LLColor4::mV, LLVector3::mV, LLFontGL::NORMAL, LLVector2::normVec(), LLVector3::normVec(), LLGLImmediate::popMatrix(), LLGLImmediate::pushMatrix(), RAD_TO_DEG, renderGrid(), LLManip::renderGuidelines(), LLManip::renderTickValue(), S32, SELECT_TYPE_HUD, LLManip::setupSnapGuideRenderPass(), LLColor4::setVec(), LLVector3::setVec(), LLManip::sGridMaxSubdivisionLevel, LLManip::sGridMinSubdivisionLevel, sGridTex, LLManip::sHelpTextFadeTime, LLManip::sHelpTextVisibleTime, LLManip::sMaxTimesShowHelpText, SNAP_ARROW_SCALE, SNAP_GUIDE_SCREEN_SIZE, LLManip::sNumTimesHelpTextShown, LLFontGL::sSansSerif, LLManip::sTickLabelSpacing, LLGLImmediate::translatef(), LLVertexBuffer::TRIANGLES, TRUE, LLImageGL::unbindTexture(), LLManip::updateGridSettings(), VALPHA, LLGLImmediate::vertex3fv(), VW, VX, VY, VZ, LLColor4::white, LLVector3::x_axis, LLVector3::y_axis, and LLVector3::z_axis.

Referenced by render().

Here is the caller graph for this function:

void LLManipTranslate::renderGrid ( F32  x,
F32  y,
F32  size,
F32  r,
F32  g,
F32  b,
F32  a 
) [protected]

Definition at line 1591 of file llmaniptranslate.cpp.

References LLGLImmediate::begin(), d, LLGLImmediate::end(), gGL, llmax(), renderGridVert(), sqrtf, LLGLImmediate::texCoord2f(), and LLVertexBuffer::TRIANGLE_STRIP.

Referenced by highlightIntersection(), and renderSnapGuides().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipTranslate::renderGridVert ( F32  x_trans,
F32  y_trans,
F32  r,
F32  g,
F32  b,
F32  alpha 
) [protected]

Definition at line 2238 of file llmaniptranslate.cpp.

References LLGLImmediate::color4f(), gGL, LLManip::LL_XY_PLANE, LLManip::LL_XZ_PLANE, LLManip::LL_YZ_PLANE, mManipPart, and LLGLImmediate::vertex3f().

Referenced by renderGrid().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipTranslate::highlightIntersection ( LLVector3  normal,
LLVector3  selection_center,
LLQuaternion  grid_rotation,
LLColor4  inner_color 
) [protected]

F32 LLManipTranslate::getMinGridScale (  )  [protected]

Definition at line 997 of file llmaniptranslate.cpp.

References LLManip::LL_NO_PART, LLManip::LL_X_ARROW, LLManip::LL_XY_PLANE, LLManip::LL_XZ_PLANE, LLManip::LL_Y_ARROW, LLManip::LL_YZ_PLANE, LLManip::LL_Z_ARROW, llmin(), mGridScale, mManipPart, LLVector3::mV, VX, VY, and VZ.

Referenced by handleHover(), handleMouseDownOnPart(), and renderSnapGuides().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 101 of file llmaniptranslate.h.

Referenced by handleHover().

Definition at line 102 of file llmaniptranslate.h.

Referenced by handleHover().

Definition at line 103 of file llmaniptranslate.h.

Definition at line 104 of file llmaniptranslate.h.

Referenced by handleHover(), and handleMouseDownOnPart().

Definition at line 105 of file llmaniptranslate.h.

Referenced by handleHover(), and handleMouseDownOnPart().

Definition at line 106 of file llmaniptranslate.h.

Referenced by handleHover(), and handleMouseDownOnPart().

Definition at line 107 of file llmaniptranslate.h.

Referenced by handleHover(), and handleMouseDownOnPart().

Definition at line 108 of file llmaniptranslate.h.

Referenced by renderSnapGuides(), and renderTranslationHandles().

Definition at line 109 of file llmaniptranslate.h.

Referenced by renderSnapGuides(), and renderTranslationHandles().

Definition at line 112 of file llmaniptranslate.h.

Referenced by highlightManipulators(), and renderTranslationHandles().

Definition at line 114 of file llmaniptranslate.h.

Referenced by handleHover(), and handleMouseDownOnPart().

Definition at line 115 of file llmaniptranslate.h.

Referenced by handleHover(), and handleMouseDownOnPart().

Definition at line 116 of file llmaniptranslate.h.

Referenced by handleHover(), and handleMouseDownOnPart().

Definition at line 117 of file llmaniptranslate.h.

Definition at line 119 of file llmaniptranslate.h.

Referenced by highlightManipulators(), and ~LLManipTranslate().

Definition at line 120 of file llmaniptranslate.h.

Referenced by highlightManipulators().

Definition at line 121 of file llmaniptranslate.h.

Referenced by handleHover(), and renderSnapGuides().

Definition at line 122 of file llmaniptranslate.h.

Referenced by handleHover(), and renderSnapGuides().

Definition at line 123 of file llmaniptranslate.h.

Referenced by handleHover(), handleMouseDownOnPart(), and renderSnapGuides().

Definition at line 124 of file llmaniptranslate.h.

Referenced by handleHover(), handleMouseDownOnPart(), and renderSnapGuides().

Definition at line 125 of file llmaniptranslate.h.

Referenced by getMinGridScale(), handleHover(), and handleMouseDownOnPart().

Definition at line 126 of file llmaniptranslate.h.

Referenced by handleHover(), and handleMouseDownOnPart().

Reimplemented from LLManip.

Definition at line 127 of file llmaniptranslate.h.

Referenced by handleHover(), handleMouseUp(), and renderSnapGuides().

Definition at line 128 of file llmaniptranslate.h.

Definition at line 129 of file llmaniptranslate.h.

Referenced by renderArrow(), and renderTranslationHandles().

Definition at line 130 of file llmaniptranslate.h.

Referenced by renderTranslationHandles().

Definition at line 131 of file llmaniptranslate.h.

Referenced by highlightManipulators(), and renderTranslationHandles().


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

Generated on Fri May 16 08:52:10 2008 for SecondLife by  doxygen 1.5.5