summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-08-23 14:15:17 -0400
committerLoren Shih <seraph@lindenlab.com>2010-08-23 14:15:17 -0400
commit78538f4f618bebbdb4b441dc2b1e23877c0d3cb9 (patch)
tree23ff0b931ba2603711fd378af21dbd307610e9bf
parent27c855149e657cebda863e279c8545f7816e1c18 (diff)
Changed Acceleration to gain.
Changed behavior of gain. Changed names of Driver/Driven params.
-rw-r--r--indra/newview/character/avatar_lad.xml24
-rw-r--r--indra/newview/llvoavatar.cpp30
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml5
3 files changed, 32 insertions, 27 deletions
diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index cdb3684034..4f64d669f5 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -4047,7 +4047,7 @@
id="507"
group="0"
sex="female"
- name="Breast_Gravity_Driven"
+ name="Breast_Gravity"
label="Breast Buoyancy"
wearable="shape"
edit_group="driven"
@@ -4115,7 +4115,7 @@
id="684"
group="0"
sex="female"
- name="Breast_Female_Cleavage_Driven"
+ name="Breast_Female_Cleavage"
label="Breast Cleavage"
wearable="shape"
edit_group="driven"
@@ -9119,9 +9119,9 @@ render_pass="bump">
edit_group="shape_physics"
label_min="Less"
label_max="More"
- value_default="2"
+ value_default="0"
value_min="0"
- value_max="10"
+ value_max="2"
camera_elevation=".3"
camera_distance=".8">
<param_driver />
@@ -9149,14 +9149,14 @@ render_pass="bump">
id="1078"
group="0"
sex="female"
- name="Breast_Physics_Side_Bounce"
- label="Breast Physics Side Bounce"
+ name="Breast_Physics_Side_Gain"
+ label="Breast Physics Side Gain"
wearable="shape"
edit_group="shape_physics"
label_min="Less"
label_max="More"
value_default="10"
- value_min="0"
+ value_min="1"
value_max="100"
camera_elevation=".3"
camera_distance=".8">
@@ -9240,14 +9240,14 @@ render_pass="bump">
id="1083"
group="0"
sex="female"
- name="Breast_Physics_UpDown_Bounce"
- label="Breast Physics UpDown Bounce"
+ name="Breast_Physics_UpDown_Gain"
+ label="Breast Physics UpDown Gain"
wearable="shape"
edit_group="shape_physics"
label_min="Less"
label_max="More"
value_default="50"
- value_min="0"
+ value_min="1"
value_max="100"
camera_elevation=".3"
camera_distance=".8">
@@ -9312,7 +9312,7 @@ render_pass="bump">
id="1087"
group="0"
sex="female"
- name="Breast_Female_Cleavage"
+ name="Breast_Female_Cleavage_Driver"
label="Breast Cleavage"
wearable="shape"
edit_group="shape_torso"
@@ -9333,7 +9333,7 @@ render_pass="bump">
id="1088"
group="0"
sex="female"
- name="Breast_Gravity"
+ name="Breast_Gravity_Driver"
label="Breast Buoyancy"
wearable="shape"
edit_group="shape_torso"
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f595a05a28..0f5df8ce12 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -598,7 +598,7 @@ public:
mBreastGravityParam = (F32)0.0;
mBreastSpringParam = LLVector3((F32)3.0, (F32)0.0, (F32)3.0);
- mBreastAccelerationParam = LLVector3((F32)50.0, (F32)0.0, (F32)50.0);
+ mBreastGainParam = LLVector3((F32)50.0, (F32)0.0, (F32)50.0);
mBreastDampingParam = LLVector3((F32)0.3, (F32)0.0, (F32)0.3);
mBreastMaxVelocityParam = LLVector3((F32)10.0, (F32)0.0, (F32)10.0);
@@ -669,17 +669,17 @@ public:
// User-set params
static const std::string breast_param_names_user[3] =
{
- "Breast_Female_Cleavage",
+ "Breast_Female_Cleavage_Driver",
"",
- "Breast_Gravity"
+ "Breast_Gravity_Driver"
};
// Params driven by this algorithm
static const std::string breast_param_names_driven[3] =
{
- "Breast_Female_Cleavage_Driven",
+ "Breast_Female_Cleavage",
"",
- "Breast_Gravity_Driven"
+ "Breast_Gravity"
};
for (U32 i=0; i < 3; i++)
@@ -779,7 +779,6 @@ public:
mCharLastAcceleration_local_vec = char_acceleration_local_vec;
- char_acceleration_local_vec *= mBreastAccelerationParam;
return char_acceleration_local_vec;
}
@@ -795,7 +794,7 @@ public:
char dummy_str[255];
fscanf(fread,"%s %f\n",dummy_str, &mBreastMassParam);
fscanf(fread,"%s %f %f %f\n",dummy_str, &mBreastSpringParam[0],&mBreastSpringParam[1],&mBreastSpringParam[2]);
- fscanf(fread,"%s %f %f %f\n",dummy_str, &mBreastAccelerationParam[0],&mBreastAccelerationParam[1],&mBreastAccelerationParam[2]);
+ fscanf(fread,"%s %f %f %f\n",dummy_str, &mBreastGainParam[0],&mBreastGainParam[1],&mBreastGainParam[2]);
fscanf(fread,"%s %f %f %f\n",dummy_str, &mBreastDampingParam[0],&mBreastDampingParam[1],&mBreastDampingParam[2]);
fscanf(fread,"%s %f %f %f\n",dummy_str, &mBreastMaxVelocityParam[0],&mBreastMaxVelocityParam[1],&mBreastMaxVelocityParam[2]);
fscanf(fread,"%s %f %f %f\n",dummy_str, &mBreastDragParam[0], &mBreastDragParam[1], &mBreastDragParam[2]);
@@ -818,13 +817,13 @@ public:
mBreastGravityParam = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Gravity"))->getWeight();
mBreastSpringParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Spring"))->getWeight();
- mBreastAccelerationParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Bounce"))->getWeight();
+ mBreastGainParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Gain"))->getWeight();
mBreastDampingParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Damping"))->getWeight();
mBreastMaxVelocityParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Range"))->getWeight();
mBreastDragParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Drag"))->getWeight();
mBreastSpringParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Spring"))->getWeight();
- mBreastAccelerationParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Bounce"))->getWeight();
+ mBreastGainParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Gain"))->getWeight();
mBreastDampingParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Damping"))->getWeight();
mBreastMaxVelocityParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Range"))->getWeight();
mBreastDragParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Drag"))->getWeight();
@@ -856,9 +855,13 @@ public:
const LLVector3 spring_length_local = breast_current_local_pt-breast_user_local_pt;
LLVector3 force_spring_local_vec = -spring_length_local; force_spring_local_vec *= mBreastSpringParam;
- const LLVector3 force_accel_local_vec = char_acceleration_local_vec * mBreastMassParam;
-
+
+ LLVector3 force_accel_local_vec = char_acceleration_local_vec * mBreastMassParam;
const LLVector3 force_gravity_local_vec = toLocal(LLVector3(0,0,1))* mBreastGravityParam * mBreastMassParam;
+ force_accel_local_vec += force_gravity_local_vec;
+ force_accel_local_vec[0] *= mBreastGainParam[0];
+ force_accel_local_vec[1] *= mBreastGainParam[1];
+ force_accel_local_vec[2] *= mBreastGainParam[2];
LLVector3 force_damping_local_vec = -mBreastDampingParam; force_damping_local_vec *= mBreastVelocity_local_vec;
@@ -867,13 +870,14 @@ public:
force_drag_local_vec[1] *= mBreastDragParam[1];
force_drag_local_vec[2] *= mBreastDragParam[2];
- const LLVector3 force_net_local_vec =
+ LLVector3 force_net_local_vec =
force_accel_local_vec +
force_gravity_local_vec +
force_spring_local_vec +
force_damping_local_vec +
force_drag_local_vec;
+
LLVector3 acceleration_local_vec = force_net_local_vec / mBreastMassParam;
mBreastVelocity_local_vec += acceleration_local_vec;
mBreastVelocity_local_vec.clamp(-mBreastMaxVelocityParam, mBreastMaxVelocityParam);
@@ -946,7 +950,7 @@ private:
LLVector3 mBreastSpringParam;
LLVector3 mBreastDampingParam;
- LLVector3 mBreastAccelerationParam;
+ LLVector3 mBreastGainParam;
LLVector3 mBreastMaxVelocityParam;
LLVector3 mBreastDragParam;
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index e16bbfa5a5..7a010697ac 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2473,15 +2473,16 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="Breast Physics Mass">Breast Mass</string>
<string name="Breast Physics Smoothing">Breast Smoothing</string>
+<string name="Breast Physics Gravity">Breast Gravity</string>
<string name="Breast Physics Side Spring">Breast Side Spring</string>
-<string name="Breast Physics Side Bounce">Breast Side Bounce</string>
+<string name="Breast Physics Side Gain">Breast Side Gain</string>
<string name="Breast Physics Side Damping">Breast Side Damping</string>
<string name="Breast Physics Side Drag">Breast Side Drag</string>
<string name="Breast Physics Side Range">Breast Side Max</string>
<string name="Breast Physics UpDown Spring">Breast UpDown Spring</string>
-<string name="Breast Physics UpDown Bounce">Breast UpDown Bounce</string>
+<string name="Breast Physics UpDown Gain">Breast UpDown Gain</string>
<string name="Breast Physics UpDown Damping">Breast UpDown Damping</string>
<string name="Breast Physics UpDown Drag">Breast UpDown Drag</string>
<string name="Breast Physics UpDown Range">Breast UpDown Range</string>