#include <llmaniprotate.h>
Inheritance diagram for LLManipRotate:
Definition at line 46 of file llmaniprotate.h.
LLManipRotate::LLManipRotate | ( | LLToolComposite * | composite | ) |
Definition at line 89 of file llmaniprotate.cpp.
BOOL LLManipRotate::canAffectSelection | ( | ) | [virtual] |
Implements LLManip.
Definition at line 1869 of file llmaniprotate.cpp.
References f, func, LLControlGroup::getBOOL(), gSavedSettings, and LLManip::mObjectSelection.
Referenced by handleMouseDownOnPart().
Definition at line 519 of file llmaniprotate.cpp.
References LLAgent::clearFocusObject(), LLWorld::clipToVisibleRegions(), dialog_refresh_all(), dragConstrained(), dragUnconstrained(), FALSE, gAgent, LLXform::getParent(), LLAgent::getPosAgentFromGlobal(), LLAgent::getPosGlobalFromAgent(), LLXform::getPosition(), LLViewerObject::getPositionAgent(), LLViewerObject::getPositionEdit(), LLViewerObject::getRenderRotation(), LLXform::getRotation(), LLViewerObject::getRotationEdit(), LLSelectMgr::getSelection(), gSelectMgr, gWorldp, i, LLViewerObject::isAttachment(), LLPrimitive::isAvatar(), LLXform::isRootEdit(), LLManip::LL_ROT_GENERAL, LLViewerObject::mChildList, LLViewerObject::mDrawable, mManipPart, LLManip::mObjectSelection, mRotation, mRotationCenter, mSmoothRotate, LLPointer< Type >::notNull(), LLViewerObject::permModify(), LLViewerObject::permMove(), LLManip::rebuild(), LLViewerObject::setPosition(), LLViewerObject::setPositionAgent(), LLViewerObject::setPositionParent(), LLViewerObject::setRotation(), LLSelectMgr::updateSelectionCenter(), and updateVisiblity().
Referenced by handleHover().
LLQuaternion LLManipRotate::dragConstrained | ( | S32 | x, | |
S32 | y | |||
) | [private] |
Definition at line 1293 of file llmaniprotate.cpp.
References LLVector3::abs(), angle, LLQuaternion::DEFAULT, DEG_TO_RAD, dot(), f, F_PI_BY_TWO, FALSE, gAgent, LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLAgent::getCameraPositionAgent(), getConstraintAxis(), LLControlGroup::getF32(), LLSelectMgr::getGrid(), LLSelectMgr::getGridMode(), LLManip::getMousePointOnPlaneAgent(), getObjectAxisClosestToMouse(), LLAgent::getPosAgentFromGlobal(), GRID_MODE_REF_OBJECT, gSavedSettings, gSelectMgr, 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().
LLQuaternion LLManipRotate::dragUnconstrained | ( | S32 | x, | |
S32 | y | |||
) | [private] |
Definition at line 1194 of file llmaniprotate.cpp.
References angle, LLQuaternion::DEFAULT, f, 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().
LLVector3 LLManipRotate::findNearestPointOnRing | ( | S32 | x, | |
S32 | y, | |||
const LLVector3 & | center, | |||
const LLVector3 & | axis | |||
) | [private] |
Definition at line 443 of file llmaniprotate.cpp.
References LLManip::getMousePointOnPlaneAgent(), mRadiusMeters, and LLVector3::normVec().
Referenced by handleMouseDownOnPart().
LLVector3 LLManipRotate::getConstraintAxis | ( | ) | [private] |
Definition at line 1251 of file llmaniprotate.cpp.
References LLSelectMgr::getGrid(), gSelectMgr, 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 1812 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::handleDeselect | ( | ) | [virtual] |
Reimplemented from LLManip.
Definition at line 117 of file llmaniprotate.cpp.
References LLManip::handleDeselect(), LLManip::LL_NO_PART, LLManip::mHighlightedPart, and mManipPart.
Reimplemented from LLManip.
Definition at line 476 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().
Reimplemented from LLTool.
Definition at line 360 of file llmaniprotate.cpp.
References FALSE, gViewerWindow, handleMouseDownOnPart(), LLViewerWindow::lastObjectHit(), LLManip::LL_NO_PART, LLManip::mHighlightedPart, LLManip::mObjectSelection, and TRUE.
Implements LLManip.
Definition at line 378 of file llmaniprotate.cpp.
References canAffectSelection(), DEG_TO_RAD, LLSelectMgr::enableSilhouette(), f, FALSE, findNearestPointOnRing(), gAgent, getConstraintAxis(), LLManip::getMousePointOnPlaneAgent(), LLManip::getPivotPoint(), LLAgent::getPosAgentFromGlobal(), LLAgent::getPosGlobalFromAgent(), gSelectMgr, 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().
Reimplemented from LLManip.
Definition at line 454 of file llmaniprotate.cpp.
References LLSelectMgr::enableSilhouette(), gSelectMgr, 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().
void LLManipRotate::handleSelect | ( | ) | [virtual] |
Reimplemented from LLManip.
Definition at line 109 of file llmaniprotate.cpp.
References gFloaterTools, gSelectMgr, LLManip::handleSelect(), LLSelectMgr::saveSelectedObjectTransform(), SELECT_ACTION_TYPE_PICK, and LLFloaterTools::setStatusText().
Implements LLManip.
Definition at line 1673 of file llmaniprotate.cpp.
References f, gAgent, LLSelectMgr::getGrid(), LLManip::getMousePointOnPlaneAgent(), LLAgent::getPosAgentFromGlobal(), LLViewerObject::getRenderRotation(), LLViewerWindow::getWindowHeight(), gSelectMgr, 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(), 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().
LLVector3 LLManipRotate::intersectMouseWithSphere | ( | S32 | x, | |
S32 | y, | |||
const LLVector3 & | sphere_center, | |||
F32 | sphere_radius | |||
) | [static, private] |
Definition at line 1611 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 1619 of file llmaniprotate.cpp.
References dot(), f, LLVector3::normVec(), and LLVector3::zero.
Referenced by intersectMouseWithSphere().
void LLManipRotate::mouseToRay | ( | S32 | x, | |
S32 | y, | |||
LLVector3 * | ray_pt, | |||
LLVector3 * | ray_dir | |||
) | [static, private] |
Definition at line 1654 of file llmaniprotate.cpp.
References f, gAgent, gCamera, LLAgent::getAvatarObject(), LLAgent::getCameraPositionAgent(), LLSelectMgr::getSelection(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gSelectMgr, gViewerWindow, LLVOAvatar::mHUDCurZoom, LLVector3::normVec(), LLViewerCamera::projectScreenToPosAgent(), and SELECT_TYPE_HUD.
Referenced by intersectMouseWithSphere().
void LLManipRotate::render | ( | ) | [virtual] |
Reimplemented from LLTool.
Definition at line 124 of file llmaniprotate.cpp.
References a, b, c, CIRCLE_STEPS, f, gAgent, LLQuaternion::getAngleAxis(), LLAgent::getAvatarObject(), LLQuaternion::getEulerAngles(), LLSelectMgr::getGrid(), LLCriticalDamp::getInterpolant(), LLAgent::getPosAgentFromGlobal(), LLViewerObject::getRotationEdit(), LLAgent::getUpAxis(), gl_circle_2d(), gl_ring(), gl_washer_2d(), glColor4f, glMultMatrixf, glPopMatrix, glRotatef, glTranslatef, gSelectMgr, i, LLMatrix4::initRows(), left, 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, RAD_TO_DEG, RADIUS_PIXELS, renderActiveRing(), renderSnapGuides(), LLManip::renderXYZ(), S32, SELECT_TYPE_HUD, SELECTED_MANIPULATOR_SCALE, LLColor4::setVec(), TRUE, updateVisiblity(), VW, VX, VY, VZ, WIDTH_PIXELS, x, y, and z.
void LLManipRotate::renderActiveRing | ( | F32 | radius, | |
F32 | width, | |||
const LLColor4 & | center_color, | |||
const LLColor4 & | side_color | |||
) | [private] |
Definition at line 728 of file llmaniprotate.cpp.
References CIRCLE_STEPS, f, FALSE, gl_ring(), and TRUE.
Referenced by render().
void LLManipRotate::renderSnapGuides | ( | ) | [private] |
Definition at line 742 of file llmaniprotate.cpp.
References LLVector3::abs(), CIRCLE_STEPS, DEG_TO_RAD, dot(), f, F_PI, FALSE, gAgent, LLQuaternion::getAngleAxis(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLAgent::getCameraPositionAgent(), getConstraintAxis(), LLSelectMgr::getGrid(), LLSelectMgr::getGridMode(), LLSelectNode::getObject(), getObjectAxisClosestToMouse(), LLAgent::getPosAgentFromGlobal(), LLViewerObject::getRenderRotation(), gl_arc_2d(), gl_circle_2d(), glBegin, glColor4fv, glEnd, glPopMatrix, glRotatef, glTranslatef, GRID_MODE_REF_OBJECT, gSavedSettings, gSelectMgr, i, 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, TRUE, VX, VY, VZ, LLColor4::white, x, LLVector3::x_axis, y, LLVector3::y_axis, z, and LLVector3::z_axis.
Referenced by render().
void LLManipRotate::updateHoverView | ( | ) | [private] |
BOOL LLManipRotate::updateVisiblity | ( | ) | [private] |
Definition at line 1113 of file llmaniprotate.cpp.
References AXIS_ONTO_CAM_TOLERANCE, dist_vec(), f, FALSE, gAgent, gCamera, LLCoordFrame::getAtAxis(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLAgent::getCameraPositionAgent(), getConstraintAxis(), LLControlGroup::getF32(), 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.
BOOL LLManipRotate::mCamEdgeOn [private] |
Definition at line 117 of file llmaniprotate.h.
Referenced by dragConstrained(), renderSnapGuides(), and updateVisiblity().
LLCoordGL LLManipRotate::mCenterScreen [private] |
Definition at line 97 of file llmaniprotate.h.
Referenced by dragUnconstrained(), and updateVisiblity().
LLVector3 LLManipRotate::mCenterToCam [private] |
Definition at line 106 of file llmaniprotate.h.
Referenced by dragConstrained(), handleMouseDownOnPart(), and updateVisiblity().
F32 LLManipRotate::mCenterToCamMag [private] |
LLVector3 LLManipRotate::mCenterToCamNorm [private] |
Definition at line 107 of file llmaniprotate.h.
Referenced by dragConstrained(), dragUnconstrained(), getConstraintAxis(), handleMouseDownOnPart(), highlightManipulators(), render(), and updateVisiblity().
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().
LLVector4 LLManipRotate::mManipulatorScales [private] |
LLVector4 LLManipRotate::mManipulatorVertices[6] [private] |
Definition at line 119 of file llmaniprotate.h.
LLVector3 LLManipRotate::mMouseCur [private] |
Definition at line 103 of file llmaniprotate.h.
Referenced by dragConstrained(), dragUnconstrained(), and handleMouseDownOnPart().
LLVector3 LLManipRotate::mMouseDown [private] |
Definition at line 102 of file llmaniprotate.h.
Referenced by dragConstrained(), dragUnconstrained(), getObjectAxisClosestToMouse(), 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().
LLQuaternion LLManipRotate::mRotation [private] |
LLVector3d LLManipRotate::mRotationCenter [private] |
Definition at line 96 of file llmaniprotate.h.
Referenced by drag(), dragConstrained(), dragUnconstrained(), handleMouseDownOnPart(), highlightManipulators(), render(), renderSnapGuides(), and updateVisiblity().
BOOL LLManipRotate::mSendUpdateOnMouseUp [private] |
Definition at line 114 of file llmaniprotate.h.
BOOL LLManipRotate::mSmoothRotate [private] |