#include <llmaniprotate.h>
Definition at line 46 of file llmaniprotate.h.
LLManipRotate::LLManipRotate | ( | LLToolComposite * | composite | ) |
Definition at line 88 of file llmaniprotate.cpp.
Reimplemented from LLTool.
Definition at line 359 of file llmaniprotate.cpp.
References FALSE, gViewerWindow, handleMouseDownOnPart(), LLViewerWindow::lastObjectHit(), LLManip::LL_NO_PART, LLManip::mHighlightedPart, LLManip::mObjectSelection, and TRUE.
Reimplemented from LLManip.
Definition at line 453 of file llmaniprotate.cpp.
References LLSelectMgr::enableSilhouette(), LLSingleton< LLSelectMgr >::getInstance(), handleHover(), LLManip::handleMouseUp(), LLTool::hasMouseCapture(), LLManip::LL_NO_PART, mManipPart, LLSelectMgr::saveSelectedObjectTransform(), SELECT_ACTION_TYPE_PICK, LLSelectMgr::sendMultipleUpdate(), TRUE, UPD_POSITION, UPD_ROTATION, and LLSelectMgr::updateSelectionCenter().
Reimplemented from LLManip.
Definition at line 475 of file llmaniprotate.cpp.
References drag(), FALSE, gViewerWindow, LLTool::hasMouseCapture(), highlightManipulators(), lldebugst, llendl, LLManip::mObjectSelection, LLViewerWindow::setCursor(), LLTool::setMouseCapture(), TRUE, and UI_CURSOR_TOOLROTATE.
Referenced by handleMouseUp().
void LLManipRotate::render | ( | ) | [virtual] |
Reimplemented from LLTool.
Definition at line 123 of file llmaniprotate.cpp.
References CIRCLE_STEPS, LLGLImmediate::color4f(), gAgent, LLQuaternion::getAngleAxis(), LLAgent::getAvatarObject(), LLQuaternion::getEulerAngles(), LLSelectMgr::getGrid(), LLSingleton< LLSelectMgr >::getInstance(), LLCriticalDamp::getInterpolant(), LLAgent::getPosAgentFromGlobal(), LLViewerObject::getRotationEdit(), LLAgent::getUpAxis(), gGL, gl_circle_2d(), gl_ring(), gl_washer_2d(), i, LLMatrix4::initRows(), lerp(), LLManip::LL_NO_PART, LLManip::LL_ROT_ROLL, LLManip::LL_ROT_X, LLManip::LL_ROT_Y, LLManip::LL_ROT_Z, llround(), MANIPULATOR_SCALE_HALF_LIFE, mCenterToCamNorm, mCenterToProfilePlane, LLManip::mHighlightedPart, LLVOAvatar::mHUDCurZoom, mManipPart, mManipulatorScales, LLMatrix4::mMatrix, LLManip::mObjectSelection, mRadiusMeters, mRotationCenter, LLVector4::mV, LLVector3::mV, LLVector3::normVec(), RAD_TO_DEG, RADIUS_PIXELS, renderActiveRing(), renderSnapGuides(), LLManip::renderXYZ(), S32, SELECT_TYPE_HUD, SELECTED_MANIPULATOR_SCALE, LLColor4::setVec(), TRUE, updateVisiblity(), VW, VX, VY, VZ, and WIDTH_PIXELS.
void LLManipRotate::handleSelect | ( | ) | [virtual] |
Reimplemented from LLManip.
Definition at line 108 of file llmaniprotate.cpp.
References LLSingleton< LLSelectMgr >::getInstance(), gFloaterTools, LLManip::handleSelect(), LLSelectMgr::saveSelectedObjectTransform(), SELECT_ACTION_TYPE_PICK, and LLFloaterTools::setStatusText().
void LLManipRotate::handleDeselect | ( | ) | [virtual] |
Reimplemented from LLManip.
Definition at line 116 of file llmaniprotate.cpp.
References LLManip::handleDeselect(), LLManip::LL_NO_PART, LLManip::mHighlightedPart, and mManipPart.
Implements LLManip.
Definition at line 377 of file llmaniprotate.cpp.
References canAffectSelection(), DEG_TO_RAD, LLSelectMgr::enableSilhouette(), FALSE, findNearestPointOnRing(), gAgent, getConstraintAxis(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::getMousePointOnPlaneAgent(), LLManip::getPivotPoint(), LLAgent::getPosAgentFromGlobal(), LLAgent::getPosGlobalFromAgent(), highlightManipulators(), intersectMouseWithSphere(), LLManip::LL_ROT_GENERAL, llabs(), LLVector3::magVecSquared(), mCenterToCam, mCenterToCamNorm, LLManip::mHighlightedPart, mManipPart, mMouseCur, mMouseDown, mRadiusMeters, mRotationCenter, LLVector3::normVec(), projected_vec(), S32, LLSelectMgr::saveSelectedObjectTransform(), SELECT_ACTION_TYPE_ROTATE, LLTool::setMouseCapture(), SNAP_GUIDE_INNER_RADIUS, sqrtf, and TRUE.
Referenced by handleMouseDown().
Implements LLManip.
Definition at line 1670 of file llmaniprotate.cpp.
References gAgent, LLSelectMgr::getGrid(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::getMousePointOnPlaneAgent(), LLAgent::getPosAgentFromGlobal(), LLViewerObject::getRenderRotation(), LLViewerWindow::getWindowHeight(), gViewerWindow, LLManip::LL_NO_PART, LLManip::LL_ROT_GENERAL, LLManip::LL_ROT_ROLL, LLManip::LL_ROT_X, LLManip::LL_ROT_Y, LLManip::LL_ROT_Z, llabs(), llmax(), LLVector3::magVec(), MAX_MANIP_SELECT_DISTANCE, mCenterToCamNorm, LLManip::mHighlightedPart, LLManip::mObjectSelection, mRadiusMeters, mRotationCenter, LLVector3::normVec(), RADIUS_PIXELS, TRUE, WIDTH_PIXELS, LLVector3::x_axis, LLVector3::y_axis, and LLVector3::z_axis.
Referenced by handleHover(), and handleMouseDownOnPart().
BOOL LLManipRotate::canAffectSelection | ( | ) | [virtual] |
Implements LLManip.
Definition at line 1866 of file llmaniprotate.cpp.
References LLControlGroup::getBOOL(), gSavedSettings, LLManip::mObjectSelection, LLViewerObject::permModify(), and LLViewerObject::permMove().
Referenced by handleMouseDownOnPart().
void LLManipRotate::updateHoverView | ( | ) | [private] |
Definition at line 516 of file llmaniprotate.cpp.
References LLAgent::clearFocusObject(), LLWorld::clipToVisibleRegions(), dialog_refresh_all(), dragConstrained(), dragUnconstrained(), FALSE, gAgent, LLSingleton< LLSelectMgr >::getInstance(), LLSingleton< LLWorld >::getInstance(), LLSelectNode::getObject(), LLXform::getParent(), LLAgent::getPosAgentFromGlobal(), LLAgent::getPosGlobalFromAgent(), LLXform::getPosition(), LLViewerObject::getPositionAgent(), LLViewerObject::getPositionEdit(), LLViewerObject::getRenderPosition(), LLViewerObject::getRenderRotation(), LLXform::getRotation(), LLViewerObject::getRotationEdit(), LLViewerObject::getRotationRegion(), LLSelectMgr::getSelection(), LLManip::getSelection(), LLXform::getWorldPosition(), LLXform::getWorldRotation(), i, LLViewerObject::isAttachment(), LLPrimitive::isAvatar(), LLXform::isRootEdit(), LLViewerObject::isSelected(), LLManip::LL_ROT_GENERAL, LLViewerObject::mDrawable, LLSelectNode::mIndividualSelection, LLSelectNode::mLastPositionLocal, LLSelectNode::mLastRotation, mManipPart, LLManip::mObjectSelection, mRotation, mRotationCenter, LLSelectNode::mSavedPositionGlobal, LLSelectNode::mSavedPositionLocal, LLSelectNode::mSavedRotation, mSmoothRotate, LLPointer< Type >::notNull(), LLViewerObject::permModify(), LLViewerObject::permMove(), LLManip::rebuild(), LLXform::setPosition(), LLViewerObject::setPosition(), LLViewerObject::setRotation(), LLQuaternion::transQuat(), LLSelectMgr::updateSelectionCenter(), and updateVisiblity().
Referenced by handleHover().
void LLManipRotate::renderSnapGuides | ( | ) | [private] |
Definition at line 739 of file llmaniprotate.cpp.
References LLVector3::abs(), LLGLImmediate::begin(), CIRCLE_STEPS, LLGLImmediate::color4fv(), DEG_TO_RAD, dot(), LLGLImmediate::end(), F_PI, FALSE, gAgent, LLQuaternion::getAngleAxis(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLAgent::getCameraPositionAgent(), getConstraintAxis(), LLSelectMgr::getGrid(), LLSelectMgr::getGridMode(), LLSingleton< LLSelectMgr >::getInstance(), LLSelectNode::getObject(), getObjectAxisClosestToMouse(), LLAgent::getPosAgentFromGlobal(), LLViewerObject::getRenderRotation(), gGL, gl_arc_2d(), gl_circle_2d(), GRID_MODE_REF_OBJECT, gSavedSettings, i, LLVertexBuffer::LINES, mCamEdgeOn, LLManip::mInSnapRegime, LLManip::mObjectSelection, mRadiusMeters, mRotationCenter, LLColor4::mV, LLVector3::mV, LLVector3::normVec(), projected_vec(), RAD_TO_DEG, LLManip::renderTickText(), S32, SELECT_TYPE_ATTACHMENT, SELECT_TYPE_HUD, LLManip::setupSnapGuideRenderPass(), LLVector3::setVec(), LLQuaternion::shortestArc(), SNAP_GUIDE_INNER_RADIUS, SNAP_GUIDE_RADIUS_1, SNAP_GUIDE_RADIUS_2, SNAP_GUIDE_RADIUS_3, SNAP_GUIDE_RADIUS_4, SNAP_GUIDE_RADIUS_5, LLVertexBuffer::TRIANGLES, TRUE, LLGLImmediate::vertex3fv(), VX, VY, VZ, LLColor4::white, LLVector3::x_axis, LLVector3::y_axis, and LLVector3::z_axis.
Referenced by render().
void LLManipRotate::renderActiveRing | ( | F32 | radius, | |
F32 | width, | |||
const LLColor4 & | center_color, | |||
const LLColor4 & | side_color | |||
) | [private] |
Definition at line 725 of file llmaniprotate.cpp.
References CIRCLE_STEPS, FALSE, gl_ring(), and TRUE.
Referenced by render().
BOOL LLManipRotate::updateVisiblity | ( | ) | [private] |
Definition at line 1110 of file llmaniprotate.cpp.
References AXIS_ONTO_CAM_TOLERANCE, dist_vec(), FALSE, gAgent, LLCoordFrame::getAtAxis(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLAgent::getCameraPositionAgent(), getConstraintAxis(), LLControlGroup::getF32(), LLSingleton< LLViewerCamera >::getInstance(), LLManip::getPivotPoint(), LLAgent::getPosAgentFromGlobal(), LLAgent::getPosGlobalFromAgent(), LLAgent::getPositionAgent(), LLCamera::getView(), LLCamera::getViewHeightInPixels(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gSavedSettings, gViewerWindow, LLTool::hasMouseCapture(), LLManip::LL_ROT_X, llabs(), mCamEdgeOn, mCenterScreen, mCenterToCam, mCenterToCamMag, mCenterToCamNorm, mCenterToProfilePlane, mCenterToProfilePlaneMag, LLVector3d::mdV, LLVOAvatar::mHUDCurZoom, mManipPart, LLManip::mObjectSelection, mRadiusMeters, mRotationCenter, LLVector3::normVec(), LLViewerCamera::projectPosAgentToScreen(), RADIUS_PIXELS, S32, SELECT_TYPE_HUD, LLCoord::set(), TRUE, VY, and VZ.
Referenced by drag(), and render().
LLVector3 LLManipRotate::findNearestPointOnRing | ( | S32 | x, | |
S32 | y, | |||
const LLVector3 & | center, | |||
const LLVector3 & | axis | |||
) | [private] |
Definition at line 442 of file llmaniprotate.cpp.
References LLManip::getMousePointOnPlaneAgent(), mRadiusMeters, and LLVector3::normVec().
Referenced by handleMouseDownOnPart().
LLQuaternion LLManipRotate::dragUnconstrained | ( | S32 | x, | |
S32 | y | |||
) | [private] |
Definition at line 1191 of file llmaniprotate.cpp.
References LLQuaternion::DEFAULT, F_PI_BY_TWO, gAgent, LLAgent::getCameraPositionAgent(), LLManip::getMousePointOnPlaneAgent(), LLAgent::getPosAgentFromGlobal(), intersectMouseWithSphere(), is_approx_zero(), mCenterScreen, mCenterToCamNorm, mCenterToProfilePlane, mCenterToProfilePlaneMag, mMouseCur, mMouseDown, LLManip::mObjectSelection, mRadiusMeters, mRotationCenter, LLCoord::mX, LLCoord::mY, LLVector3::normVec(), RADIUS_PIXELS, and SELECT_TYPE_HUD.
Referenced by drag().
LLQuaternion LLManipRotate::dragConstrained | ( | S32 | x, | |
S32 | y | |||
) | [private] |
Definition at line 1290 of file llmaniprotate.cpp.
References LLVector3::abs(), LLQuaternion::DEFAULT, DEG_TO_RAD, dot(), F_PI_BY_TWO, FALSE, gAgent, LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLAgent::getCameraPositionAgent(), getConstraintAxis(), LLControlGroup::getF32(), LLSelectMgr::getGrid(), LLSelectMgr::getGridMode(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::getMousePointOnPlaneAgent(), getObjectAxisClosestToMouse(), LLAgent::getPosAgentFromGlobal(), GRID_MODE_REF_OBJECT, gSavedSettings, llabs(), llmin(), LLVector3::magVec(), LLVector3::magVecSquared(), mCamEdgeOn, mCenterToCam, mCenterToCamNorm, LLManip::mInSnapRegime, mMouseCur, mMouseDown, LLManip::mObjectSelection, mRadiusMeters, mRotationCenter, LLSelectNode::mSavedRotation, mSmoothRotate, LLVector3::mV, LLVector3::normVec(), projected_vec(), RAD_TO_DEG, S32, SELECT_TYPE_ATTACHMENT, SELECT_TYPE_HUD, LLVector3::setVec(), SNAP_ANGLE_DETENTE, SNAP_ANGLE_INCREMENT, SNAP_GUIDE_INNER_RADIUS, sqrtf, TRUE, VX, VY, VZ, LLVector3::x_axis, LLVector3::y_axis, and LLVector3::z_axis.
Referenced by drag().
LLVector3 LLManipRotate::getConstraintAxis | ( | ) | [private] |
Definition at line 1248 of file llmaniprotate.cpp.
References LLSelectMgr::getGrid(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::LL_ROT_ROLL, LLManip::LL_ROT_X, llendl, llerrs, llwarns, mCenterToCamNorm, mManipPart, LLManip::mObjectSelection, LLVector3::mV, S32, and TRUE.
Referenced by dragConstrained(), handleMouseDownOnPart(), renderSnapGuides(), and updateVisiblity().
Definition at line 1809 of file llmaniprotate.cpp.
References LLVector3::abs(), LLVector3::clearVec(), mMouseDown, LLManip::mObjectSelection, LLSelectNode::mSavedRotation, LLVector3::mV, S32, TRUE, VX, VY, VZ, LLVector3::x_axis, LLVector3::x_axis_neg, LLVector3::y_axis, LLVector3::y_axis_neg, LLVector3::z_axis, and LLVector3::z_axis_neg.
Referenced by dragConstrained(), and renderSnapGuides().
void LLManipRotate::mouseToRay | ( | S32 | x, | |
S32 | y, | |||
LLVector3 * | ray_pt, | |||
LLVector3 * | ray_dir | |||
) | [static, private] |
Definition at line 1651 of file llmaniprotate.cpp.
References gAgent, LLAgent::getAvatarObject(), LLAgent::getCameraPositionAgent(), LLSingleton< LLViewerCamera >::getInstance(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::getSelection(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gViewerWindow, LLVOAvatar::mHUDCurZoom, LLVector3::normVec(), LLViewerCamera::projectScreenToPosAgent(), and SELECT_TYPE_HUD.
Referenced by intersectMouseWithSphere().
LLVector3 LLManipRotate::intersectMouseWithSphere | ( | S32 | x, | |
S32 | y, | |||
const LLVector3 & | sphere_center, | |||
F32 | sphere_radius | |||
) | [static, private] |
Definition at line 1608 of file llmaniprotate.cpp.
References intersectRayWithSphere(), and mouseToRay().
Referenced by dragUnconstrained(), and handleMouseDownOnPart().
LLVector3 LLManipRotate::intersectRayWithSphere | ( | const LLVector3 & | ray_pt, | |
const LLVector3 & | ray_dir, | |||
const LLVector3 & | sphere_center, | |||
F32 | sphere_radius | |||
) | [static, private] |
Definition at line 1616 of file llmaniprotate.cpp.
References dot(), LLVector3::normVec(), and LLVector3::zero.
Referenced by intersectMouseWithSphere().
LLVector3d LLManipRotate::mRotationCenter [private] |
Definition at line 96 of file llmaniprotate.h.
Referenced by drag(), dragConstrained(), dragUnconstrained(), handleMouseDownOnPart(), highlightManipulators(), render(), renderSnapGuides(), and updateVisiblity().
LLCoordGL LLManipRotate::mCenterScreen [private] |
Definition at line 97 of file llmaniprotate.h.
Referenced by dragUnconstrained(), and updateVisiblity().
LLQuaternion LLManipRotate::mRotation [private] |
LLVector3 LLManipRotate::mMouseDown [private] |
Definition at line 102 of file llmaniprotate.h.
Referenced by dragConstrained(), dragUnconstrained(), getObjectAxisClosestToMouse(), and handleMouseDownOnPart().
LLVector3 LLManipRotate::mMouseCur [private] |
Definition at line 103 of file llmaniprotate.h.
Referenced by dragConstrained(), dragUnconstrained(), and handleMouseDownOnPart().
F32 LLManipRotate::mRadiusMeters [private] |
Definition at line 104 of file llmaniprotate.h.
Referenced by dragConstrained(), dragUnconstrained(), findNearestPointOnRing(), handleMouseDownOnPart(), highlightManipulators(), render(), renderSnapGuides(), and updateVisiblity().
LLVector3 LLManipRotate::mCenterToCam [private] |
Definition at line 106 of file llmaniprotate.h.
Referenced by dragConstrained(), handleMouseDownOnPart(), and updateVisiblity().
LLVector3 LLManipRotate::mCenterToCamNorm [private] |
Definition at line 107 of file llmaniprotate.h.
Referenced by dragConstrained(), dragUnconstrained(), getConstraintAxis(), handleMouseDownOnPart(), highlightManipulators(), render(), and updateVisiblity().
F32 LLManipRotate::mCenterToCamMag [private] |
Definition at line 109 of file llmaniprotate.h.
Referenced by dragUnconstrained(), render(), and updateVisiblity().
F32 LLManipRotate::mCenterToProfilePlaneMag [private] |
Definition at line 110 of file llmaniprotate.h.
Referenced by dragUnconstrained(), and updateVisiblity().
EManipPart LLManipRotate::mManipPart [private] |
Definition at line 112 of file llmaniprotate.h.
Referenced by drag(), getConstraintAxis(), handleDeselect(), handleMouseDownOnPart(), handleMouseUp(), render(), and updateVisiblity().
BOOL LLManipRotate::mSendUpdateOnMouseUp [private] |
Definition at line 114 of file llmaniprotate.h.
BOOL LLManipRotate::mSmoothRotate [private] |
BOOL LLManipRotate::mCamEdgeOn [private] |
Definition at line 117 of file llmaniprotate.h.
Referenced by dragConstrained(), renderSnapGuides(), and updateVisiblity().
LLVector4 LLManipRotate::mManipulatorVertices[6] [private] |
Definition at line 119 of file llmaniprotate.h.
LLVector4 LLManipRotate::mManipulatorScales [private] |