summaryrefslogtreecommitdiff
path: root/indra/newview/llmanipscale.h
diff options
context:
space:
mode:
authorRicky Curtice <kf6kjg+hg@gmail.com>2014-02-18 23:20:46 -0800
committerRicky Curtice <kf6kjg+hg@gmail.com>2014-02-18 23:20:46 -0800
commit9f4031edffa86f194bad440bc2940648cca7368d (patch)
tree064be0a3b24577e20c02c511cfb6053afd638217 /indra/newview/llmanipscale.h
parenta060dcfff790f16dd4a0097e0eca4ff4b7f3d0de (diff)
STORM-1920: Documented the meaning of some of the variables involved, built simplest change to solve issue.
The highlighting code assumed that the axis of the scaling movement was aligned with the scale tick marks - e.g. one of the cardinal directions with respect to the OBB of the selection. This was and is NOT true when dragging from the corner, aka scaling more than one axis at a time. The solution was to calculate the measured distance by projecting the snapped distance along the snap direction onto the axis of the relevant snap guide. This gives the correct values, and is nice and clean - both in the change involved, and in the values returned. However, while the fundamental misunderstanding in the code has been cleaned up by this change, the tick_val variable has so much jitter in the bottom end that the is_approx_equal function doesn’t come true > 98% of the time. This is the next problem to solve.
Diffstat (limited to 'indra/newview/llmanipscale.h')
-rwxr-xr-xindra/newview/llmanipscale.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h
index 5cb8898fd0..652b90d59e 100755
--- a/indra/newview/llmanipscale.h
+++ b/indra/newview/llmanipscale.h
@@ -148,10 +148,10 @@ private:
typedef std::set<ManipulatorHandle*, compare_manipulators> minpulator_list_t;
minpulator_list_t mProjectedManipulators;
LLVector4 mManipulatorVertices[14];
- F32 mScaleSnapUnit1; // size of snap multiples for axis 1
- F32 mScaleSnapUnit2; // size of snap multiples for axis 2
- LLVector3 mScalePlaneNormal1; // normal of plane in which scale occurs that most faces camera
- LLVector3 mScalePlaneNormal2; // normal of plane in which scale occurs that most faces camera
+ F32 mScaleSnapUnit1; //!< Size of snap multiples for axis 1.
+ F32 mScaleSnapUnit2; //!< Size of snap multiples for axis 2.
+ LLVector3 mScalePlaneNormal1; //!< Normal of plane in which scale occurs that most faces camera.
+ LLVector3 mScalePlaneNormal2; //!< Normal of plane in which scale occurs that most faces camera.
LLVector3 mSnapGuideDir1;
LLVector3 mSnapGuideDir2;
LLVector3 mSnapDir1;
@@ -159,8 +159,8 @@ private:
F32 mSnapRegimeOffset;
F32 mSnapGuideLength;
LLVector3 mScaleCenter;
- LLVector3 mScaleDir;
- F32 mScaleSnapValue;
+ LLVector3 mScaleDir; //!< The direction of the scaling action. In face-dragging this is aligned with one of the cardinal axis relative to the prim, but in corner-dragging this is along the diagonal.
+ F32 mScaleSnapValue; //!< The distance of the current position nearest the mouse location, measured along mScaleDir. Is measured either from the center or from the far face/corner depending upon whether uniform scaling is true or false respectively.
BOOL mInSnapRegime;
F32* mManipulatorScales;
};