diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/character/avatar_skeleton_spine_joints.xml | 198 | ||||
-rwxr-xr-x | indra/newview/llviewerjointmesh.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 123 |
3 files changed, 284 insertions, 39 deletions
diff --git a/indra/newview/character/avatar_skeleton_spine_joints.xml b/indra/newview/character/avatar_skeleton_spine_joints.xml new file mode 100644 index 0000000000..4124df9055 --- /dev/null +++ b/indra/newview/character/avatar_skeleton_spine_joints.xml @@ -0,0 +1,198 @@ +<linden_skeleton num_bones="109" num_collision_volumes="26" version="2.0"> + <bone aliases="hip avatar_mPelvis" end="0.000 0.000 0.084" group="SL Base" name="mPelvis" pivot="0.000000 0.000000 1.067015" pos="0.000 0.000 1.067" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base" connected="false"> + <collision_volume end="0.020 0.000 0.100" group="Collision" name="PELVIS" pos="-0.01 0 -0.02" rot="0.000000 8.00000 0.000000" scale="0.12 0.16 0.17" support="base"/> + <collision_volume end="-0.100 0.000 0.000" group="Collision" name="BUTT" pos="-0.06 0 -0.1" rot="0.000000 0.00000 0.000000" scale="0.1 0.1 0.1" support="base"/> + <bone connected="true" end="-0.015 0.000 0.205" group="Spine" name="mSpineA" pivot="1.0 0.000000 0.0" pos="1.0 0.000 0.0" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="extended"> + <bone connected="true" end="-0.015 0.000 0.205" group="Spine" name="mSpineB" pivot="0.0 1.0 0.0" pos="0.0 1.0 0.0" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="extended"> + <bone connected="true" end="-0.015 0.000 0.205" group="Spine" name="mSpineC" pivot="0.0 0.0 1.0" pos="0.0 0.0 1.0" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="extended"> + <bone aliases="abdomen avatar_mTorso" connected="true" end="-0.015 0.000 0.205" group="SL Base" name="mTorso" pivot="0.000000 0.000000 0.084073" pos="0.000 0.000 0.084" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.020 0.000 0.100" group="Collision" name="BELLY" pos="0.028 0 0.04" rot="0.000000 8.00000 0.000000" scale="0.09 0.13 0.15" support="base"/> + <collision_volume end="0.000 0.100 0.000" group="Collision" name="LEFT_HANDLE" pos="0.0 0.10 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05" support="base"/> + <collision_volume end="0.000 -0.100 0.000" group="Collision" name="RIGHT_HANDLE" pos="0.0 -0.10 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05" support="base"/> + <collision_volume end="-0.100 0.000 0.000" group="Collision" name="LOWER_BACK" pos="0.0 0.0 0.023" rot="0.000000 0.00000 0.000000" scale="0.09 0.13 0.15" support="base"/> + <bone aliases="chest avatar_mChest" connected="true" end="-0.010 0.000 0.250" group="SL Base" name="mChest" pivot="-0.015368 0.000000 0.204877" pos="-0.015 0.000 0.205" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="-0.080 0.000 0.180" group="Collision" name="CHEST" pos="0.028 0 0.07" rot="0.000000 -10.00000 0.000000" scale="0.11 0.15 0.2" support="base"/> + <collision_volume end="0.080 0.000 0.000" group="Collision" name="LEFT_PEC" pos="0.119 0.082 0.042" rot="0.000000 4.29000 0.000000" scale="0.05 0.05 0.05" support="base"/> + <collision_volume end="0.080 0.000 0.000" group="Collision" name="RIGHT_PEC" pos="0.119 -0.082 0.042" rot="0.000000 4.29000 0.000000" scale="0.05 0.05 0.05" support="base"/> + <collision_volume end="-0.100 0.000 0.000" group="Collision" name="UPPER_BACK" pos="0.0 0.0 0.017" rot="0.000000 0.00000 0.000000" scale="0.09 0.13 0.15" support="base"/> + <bone aliases="neck avatar_mNeck" connected="true" end="0.000 0.000 0.077" group="SL Base" name="mNeck" pivot="-0.009507 0.000000 0.251108" pos="-0.010 0.000 0.251" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.000 0.000 0.080" group="Collision" name="NECK" pos="0.0 0 0.02" rot="0.000000 0.000000 0.000000" scale="0.05 0.06 0.08" support="base"/> + <bone aliases="head avatar_mHead" connected="true" end="0.000 0.000 0.079" group="SL Base" name="mHead" pivot="0.000000 -0.000000 0.075630" pos="0.000 -0.000 0.076" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.000 0.000 0.100" group="Collision" name="HEAD" pos="0.02 0 0.07" rot="0.000000 0.000000 0.000000" scale="0.11 0.09 0.12" support="base"/> + <bone aliases="figureHair avatar_mSkull" connected="true" end="0.000 0.000 0.033" group="SL Base" name="mSkull" pivot="0.000000 0.000000 0.079000" pos="0.000 0.000 0.079" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"/> + <bone aliases="avatar_mEyeRight" end="0.100 0.000 0.000" group="SL Base" name="mEyeRight" pivot="0.098466 -0.036000 0.079000" pos="0.098 -0.036 0.079" rot="0.000000 0.000000 -0.000000" scale="1.000 1.000 1.000" support="base" connected="false"/> + <bone aliases="avatar_mEyeLeft" end="0.100 0.000 0.000" group="SL Base" name="mEyeLeft" pivot="0.098461 0.036000 0.079000" pos="0.098 0.036 0.079" rot="0.000000 -0.000000 0.000000" scale="1.000 1.000 1.000" support="base" connected="false"/> + <bone end="0.024 0.004 0.018" group="Face" name="mFaceForeheadLeft" pivot="0.086323 0.035081 0.128273" pos="0.086 0.035 0.128" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.024 -0.004 0.018" group="Face" name="mFaceForeheadRight" pivot="0.086323 -0.035081 0.128273" pos="0.086 -0.035 0.128" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.027 0.000 0.000" group="Face" name="mFaceEyebrowOuterLeft" pivot="0.084314 0.064144 0.093192" pos="0.084 0.064 0.093" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.027 0.000 0.000" group="Face" name="mFaceEyebrowCenterLeft" pivot="0.095341 0.043099 0.101210" pos="0.095 0.043 0.101" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.027 -0.001 -0.001" group="Face" name="mFaceEyebrowInnerLeft" pivot="0.099350 0.023054 0.097201" pos="0.099 0.023 0.097" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.027 0.000 0.000" group="Face" name="mFaceEyebrowOuterRight" pivot="0.084314 -0.064144 0.093192" pos="0.084 -0.064 0.093" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.027 0.000 0.000" group="Face" name="mFaceEyebrowCenterRight" pivot="0.095341 -0.043099 0.101210" pos="0.095 -0.043 0.101" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.027 0.001 -0.001" group="Face" name="mFaceEyebrowInnerRight" pivot="0.099350 -0.023054 0.097201" pos="0.099 -0.023 0.097" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.038 0.000 0.000" group="Face" name="mFaceEyeLidUpperLeft" pivot="0.087323 0.036081 0.084174" pos="0.087 0.036 0.084" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.100 0.000 0.000" group="Face" name="mFaceEyeAltLeft" pivot="0.098486 0.036009 0.079020" pos="0.098 0.036 0.079" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.036 0.000 0.000" group="Face" name="mFaceEyeLidLowerLeft" pivot="0.086323 0.036081 0.072147" pos="0.086 0.036 0.072" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.038 0.000 0.000" group="Face" name="mFaceEyeLidUpperRight" pivot="0.087323 -0.036081 0.084174" pos="0.087 -0.036 0.084" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.100 0.000 0.000" group="Face" name="mFaceEyeAltRight" pivot="0.098486 -0.036009 0.079020" pos="0.098 -0.036 0.079" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.036 0.000 0.000" group="Face" name="mFaceEyeLidLowerRight" pivot="0.086323 -0.036081 0.072147" pos="0.086 -0.036 0.072" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="-0.019 0.018 0.025" group="Face" name="mFaceEarLeft" pivot="0.025179 0.080180 0.047093" pos="0.025 0.080 0.047" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="-0.019 -0.018 0.025" group="Face" name="mFaceEarRight" pivot="0.025179 -0.080180 0.047093" pos="0.025 -0.080 0.047" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.007 0.005 0.002" group="Face" name="mFaceNoseLeft" pivot="0.121395 0.014036 0.045084" pos="0.121 0.014 0.045" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.031 0.000 0.000" group="Face" name="mFaceNoseCenter" pivot="0.121395 0.000000 0.045084" pos="0.121 0.000 0.045" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.007 -0.005 0.002" group="Face" name="mFaceNoseRight" pivot="0.121395 -0.014036 0.045084" pos="0.121 -0.014 0.045" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.018 0.004 -0.006" group="Face" name="mFaceCheekUpperInnerLeft" pivot="0.101350 0.044099 0.043084" pos="0.101 0.044 0.043" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.005 0.015 0.005" group="Face" name="mFaceCheekUpperOuterLeft" pivot="0.082314 0.057126 0.053102" pos="0.082 0.057 0.053" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.018 -0.004 -0.006" group="Face" name="mFaceCheekUpperInnerRight" pivot="0.101350 -0.044099 0.043084" pos="0.101 -0.044 0.043" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.005 -0.015 0.005" group="Face" name="mFaceCheekUpperOuterRight" pivot="0.082314 -0.057126 0.053102" pos="0.082 -0.057 0.053" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.053 0.004 -0.007" group="Face" name="mFaceLipUpperLeft" pivot="0.081305 0.011027 0.021030" pos="0.081 0.011 0.021" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.053 -0.004 -0.007" group="Face" name="mFaceLipUpperRight" pivot="0.081305 -0.011027 0.021030" pos="0.081 -0.011 0.021" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.037 -0.001 0.000" group="Face" name="mFaceLipCornerLeft" pivot="0.082314 0.033072 0.007002" pos="0.082 0.033 0.007" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.037 0.001 0.000" group="Face" name="mFaceLipCornerRight" pivot="0.082314 -0.033072 0.007002" pos="0.082 -0.033 0.007" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.045 0.000 -0.021" group="Face" name="mFaceJaw" pivot="0.044224 0.000000 0.008003" pos="0.044 0.000 0.008" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="0.020 0.000 0.008" group="Face" name="mFaceTongueBase" pivot="0.045000 0.000000 -0.021000" pos="0.045 0.000 -0.021" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="0.007 0.000 0.003" group="Face" name="mFaceTongueTip" pivot="0.020000 0.000000 0.008000" pos="0.020 0.000 0.008" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + <bone end="0.045 0.000 0.005" group="Face" name="mFaceLipLowerLeft" pivot="0.042000 0.017000 -0.021000" pos="0.042 0.017 -0.021" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + <bone end="0.045 0.000 0.005" group="Face" name="mFaceLipLowerRight" pivot="0.042000 -0.017000 -0.021000" pos="0.042 -0.017 -0.021" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + </bone> + </bone> + </bone> + <bone aliases="lCollar avatar_mCollarLeft" end="0.000 0.079 0.000" group="SL Base" name="mCollarLeft" pivot="-0.020927 0.084665 0.165396" pos="-0.021 0.085 0.165" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base" connected="false"> + <collision_volume end="0.000 0.100 0.000" group="Collision" name="L_CLAVICLE" pos="0.02 0 0.02" rot="0.000000 0.00000 0.000000" scale="0.07 0.14 0.05" support="base"/> + <bone aliases="lShldr avatar_mShoulderLeft" connected="true" end="0.000 0.247 0.000" group="SL Base" name="mShoulderLeft" pivot="0.000000 0.079000 -0.000000" pos="0.000 0.079 -0.000" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.000 0.130 0.000" group="Collision" name="L_UPPER_ARM" pos="0.0 0.12 0.01" rot="-5.000000 0.00000 0.000000" scale="0.05 0.17 0.05" support="base"/> + <bone aliases="lForeArm avatar_mElbowLeft" connected="true" end="0.000 0.205 0.000" group="SL Base" name="mElbowLeft" pivot="0.000000 0.248000 0.000000" pos="0.000 0.248 0.000" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.000 0.100 0.000" group="Collision" name="L_LOWER_ARM" pos="0.0 0.1 0.0" rot="-3.000000 0.00000 0.000000" scale="0.04 0.14 0.04" support="base"/> + <bone aliases="lHand avatar_mWristLeft" connected="true" end="0.000 0.060 0.000" group="SL Base" name="mWristLeft" pivot="-0.000000 0.204846 0.000000" pos="-0.000 0.205 0.000" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.000 0.050 0.000" group="Collision" name="L_HAND" pos="0.01 0.05 0.0" rot="-3.000000 0.00000 -10.000000" scale="0.05 0.08 0.03" support="base"/> + <bone end="-0.001 0.041 -0.004" group="Hand" name="mHandMiddle1Left" pivot="0.013427 0.099641 0.008427" pos="0.013 0.100 0.008" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.001 0.049 -0.006" group="Hand" name="mHandMiddle2Left" pivot="-0.000959 0.040656 -0.004287" pos="-0.001 0.041 -0.004" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.002 0.033 -0.004" group="Hand" name="mHandMiddle3Left" pivot="-0.001476 0.048719 -0.005798" pos="-0.001 0.049 -0.006" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + <bone end="0.019 0.042 -0.004" group="Hand" name="mHandIndex1Left" pivot="0.036416 0.091419 0.010424" pos="0.036 0.091 0.010" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="0.014 0.032 -0.004" group="Hand" name="mHandIndex2Left" pivot="0.019056 0.041560 -0.004473" pos="0.019 0.042 -0.004" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="0.011 0.025 -0.003" group="Hand" name="mHandIndex3Left" pivot="0.014330 0.032011 -0.004359" pos="0.014 0.032 -0.004" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + <bone end="-0.013 0.039 -0.005" group="Hand" name="mHandRing1Left" pivot="-0.010432 0.098025 0.003099" pos="-0.010 0.098 0.003" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.013 0.040 -0.007" group="Hand" name="mHandRing2Left" pivot="-0.013326 0.038577 -0.005495" pos="-0.013 0.039 -0.005" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.010 0.028 -0.004" group="Hand" name="mHandRing3Left" pivot="-0.013398 0.039825 -0.006514" pos="-0.013 0.040 -0.007" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + <bone end="-0.020 0.024 -0.004" group="Hand" name="mHandPinky1Left" pivot="-0.035119 0.095515 -0.001334" pos="-0.035 0.096 -0.001" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.015 0.018 -0.003" group="Hand" name="mHandPinky2Left" pivot="-0.020450 0.023623 -0.003633" pos="-0.020 0.024 -0.004" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.013 0.016 -0.003" group="Hand" name="mHandPinky3Left" pivot="-0.015199 0.018236 -0.003472" pos="-0.015 0.018 -0.003" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + <bone end="0.028 0.030 0.001" group="Hand" name="mHandThumb1Left" pivot="0.035471 0.035681 -0.000635" pos="0.035 0.036 -0.001" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="0.018 0.026 0.001" group="Hand" name="mHandThumb2Left" pivot="0.028355 0.029579 0.001081" pos="0.028 0.030 0.001" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="0.016 0.024 0.001" group="Hand" name="mHandThumb3Left" pivot="0.017873 0.026014 0.000851" pos="0.018 0.026 0.001" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + </bone> + </bone> + </bone> + </bone> + <bone aliases="rCollar avatar_mCollarRight" end="0.000 -0.079 0.000" group="SL Base" name="mCollarRight" pivot="-0.020927 -0.085000 0.165396" pos="-0.021 -0.085 0.165" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base" connected="false"> + <collision_volume end="0.000 -0.100 0.000" group="Collision" name="R_CLAVICLE" pos="0.02 0 0.02" rot="0.000000 0.00000 0.000000" scale="0.07 0.14 0.05" support="base"/> + <bone aliases="rShldr avatar_mShoulderRight" connected="true" end="0.000 -0.247 0.000" group="SL Base" name="mShoulderRight" pivot="0.000000 -0.079418 -0.000000" pos="0.000 -0.079 -0.000" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.000 -0.130 0.000" group="Collision" name="R_UPPER_ARM" pos="0.0 -0.12 0.01" rot="5.000000 0.00000 0.000000" scale="0.05 0.17 0.05" support="base"/> + <bone aliases="rForeArm avatar_mElbowRight" connected="true" end="0.000 -0.205 0.000" group="SL Base" name="mElbowRight" pivot="0.000000 -0.248000 -0.000000" pos="0.000 -0.248 -0.000" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.000 -0.100 0.000" group="Collision" name="R_LOWER_ARM" pos="0.0 -0.1 0.0" rot="3.000000 0.00000 0.000000" scale="0.04 0.14 0.04" support="base"/> + <bone aliases="rHand avatar_mWristRight" connected="true" end="0.000 -0.060 0.000" group="SL Base" name="mWristRight" pivot="-0.000000 -0.205000 -0.000000" pos="0.000 -0.205 -0.000" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.000 -0.050 0.000" group="Collision" name="R_HAND" pos="0.01 -0.05 0.0" rot="3.000000 0.00000 10.000000" scale="0.05 0.08 0.03" support="base"/> + <bone end="-0.001 -0.041 -0.004" group="Hand" name="mHandMiddle1Right" pivot="0.013427 -0.099641 0.008427" pos="0.013 -0.100 0.008" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.001 -0.049 -0.006" group="Hand" name="mHandMiddle2Right" pivot="-0.000959 -0.040656 -0.004287" pos="-0.001 -0.041 -0.004" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.002 -0.033 -0.004" group="Hand" name="mHandMiddle3Right" pivot="-0.001476 -0.048719 -0.005798" pos="-0.001 -0.049 -0.006" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + <bone end="0.019 -0.042 -0.004" group="Hand" name="mHandIndex1Right" pivot="0.036416 -0.091419 0.010424" pos="0.036 -0.091 0.010" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="0.014 -0.032 -0.004" group="Hand" name="mHandIndex2Right" pivot="0.019056 -0.041560 -0.004473" pos="0.019 -0.042 -0.004" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="0.011 -0.025 -0.003" group="Hand" name="mHandIndex3Right" pivot="0.014330 -0.032011 -0.004359" pos="0.014 -0.032 -0.004" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + <bone end="-0.013 -0.039 -0.005" group="Hand" name="mHandRing1Right" pivot="-0.010432 -0.098025 0.003099" pos="-0.010 -0.098 0.003" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.013 -0.040 -0.007" group="Hand" name="mHandRing2Right" pivot="-0.013326 -0.038577 -0.005495" pos="-0.013 -0.039 -0.005" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.010 -0.028 -0.004" group="Hand" name="mHandRing3Right" pivot="-0.013398 -0.039825 -0.006514" pos="-0.013 -0.040 -0.007" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + <bone end="-0.020 -0.024 -0.004" group="Hand" name="mHandPinky1Right" pivot="-0.035119 -0.095515 -0.001334" pos="-0.035 -0.096 -0.001" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.015 -0.018 -0.003" group="Hand" name="mHandPinky2Right" pivot="-0.020450 -0.023623 -0.003633" pos="-0.020 -0.024 -0.004" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.013 -0.016 -0.003" group="Hand" name="mHandPinky3Right" pivot="-0.015199 -0.018236 -0.003472" pos="-0.015 -0.018 -0.003" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + <bone end="0.028 -0.030 0.001" group="Hand" name="mHandThumb1Right" pivot="0.035471 -0.035681 -0.000635" pos="0.035 -0.036 -0.001" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="0.018 -0.026 0.001" group="Hand" name="mHandThumb2Right" pivot="0.028355 -0.029579 0.001081" pos="0.028 -0.030 0.001" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="0.016 -0.024 0.001" group="Hand" name="mHandThumb3Right" pivot="0.017873 -0.026014 0.000851" pos="0.018 -0.026 0.001" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + </bone> + </bone> + </bone> + </bone> + <bone end="-0.015 0.000 0.000" group="Wing" name="mWingsRoot1" pivot="-0.014427 0.000057 -0.000108" pos="-0.014 0.000 -0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.020 0.000 0.000" group="Wing" name="mWingsRoot2" pivot="-0.015000 0.000000 0.000000" pos="-0.015 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.026 0.000 0.000" group="Wing" name="mWingsRoot3" pivot="-0.020095 0.000000 0.000000" pos="-0.020 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone end="-0.168 0.169 0.067" group="Wing" name="mWing1Left" pivot="-0.063834 0.105140 0.181096" pos="-0.064 0.105 0.181" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.181 0.183 -0.000" group="Wing" name="mWing2Left" pivot="-0.167657 0.169194 0.066907" pos="-0.168 0.169 0.067" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.171 0.173 -0.000" group="Wing" name="mWing3Left" pivot="-0.181322 0.182984 -0.000120" pos="-0.181 0.183 -0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.028 0.029 0.000" group="Wing" name="mWing4Left" pivot="-0.170953 0.172520 -0.000113" pos="-0.171 0.173 -0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + </bone> + <bone end="-0.168 -0.169 0.067" group="Wing" name="mWing1Right" pivot="-0.063834 -0.105254 0.181096" pos="-0.064 -0.105 0.181" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.181 -0.183 -0.000" group="Wing" name="mWing2Right" pivot="-0.167657 -0.169194 0.066907" pos="-0.168 -0.169 0.067" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.171 -0.173 -0.000" group="Wing" name="mWing3Right" pivot="-0.181322 -0.182984 -0.000120" pos="-0.181 -0.183 -0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.028 -0.029 0.000" group="Wing" name="mWing4Right" pivot="-0.170953 -0.172520 -0.000113" pos="-0.171 -0.173 -0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + </bone> + </bone> + </bone> + </bone> + </bone> + </bone> + </bone> + </bone> + <bone aliases="rThigh avatar_mHipRight" end="-0.001 0.046 -0.491" group="SL Base" name="mHipRight" pivot="0.033620 -0.128806 -0.041086" pos="0.034 -0.129 -0.041" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base" connected="false"> + <collision_volume end="0.000 0.000 -0.200" group="Collision" name="R_UPPER_LEG" pos="-0.02 0.05 -0.22" rot="0.000000 0.00000 0.000000" scale="0.09 0.09 0.32" support="base"/> + <bone aliases="rShin avatar_mKneeRight" connected="true" end="-0.029 -0.001 -0.469" group="SL Base" name="mKneeRight" pivot="-0.000780 0.048635 -0.490922" pos="-0.001 0.049 -0.491" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="-0.010 0.000 -0.150" group="Collision" name="R_LOWER_LEG" pos="-0.02 0.0 -0.2" rot="0.000000 0.00000 0.000000" scale="0.06 0.06 0.25" support="base"/> + <bone aliases="rFoot avatar_mAnkleRight" connected="true" end="0.112 0.000 -0.061" group="SL Base" name="mAnkleRight" pivot="-0.028869 0.000000 -0.468494" pos="-0.029 0.000 -0.468" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.100 0.000 -0.020" group="Collision" name="R_FOOT" pos="0.077 0.0 -0.041" rot="0.000000 10.00000 0.000000" scale="0.13 0.05 0.05" support="base"/> + <bone aliases="avatar_mFootRight" connected="true" end="0.105 -0.008 -0.000" group="SL Base" name="mFootRight" pivot="0.111956 -0.000000 -0.060637" pos="0.112 -0.000 -0.061" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <bone aliases="avatar_mToeRight" connected="true" end="0.020 0.000 0.000" group="SL Base" name="mToeRight" pivot="0.105399 -0.010408 -0.000104" pos="0.109 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"/> + </bone> + </bone> + </bone> + </bone> + </bone> + <bone aliases="lThigh avatar_mHipLeft" end="-0.001 -0.046 -0.491" group="SL Base" name="mHipLeft" pivot="0.033757 0.126765 -0.040998" pos="0.034 0.127 -0.041" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base" connected="false"> + <collision_volume end="0.000 0.000 -0.200" group="Collision" name="L_UPPER_LEG" pos="-0.02 -0.05 -0.22" rot="0.000000 0.00000 0.000000" scale="0.09 0.09 0.32" support="base"/> + <bone aliases="lShin avatar_mKneeLeft" connected="true" end="-0.029 0.001 -0.469" group="SL Base" name="mKneeLeft" pivot="-0.000887 -0.045568 -0.491053" pos="-0.001 -0.046 -0.491" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="-0.010 0.000 -0.150" group="Collision" name="L_LOWER_LEG" pos="-0.02 0.0 -0.2" rot="0.000000 0.00000 0.000000" scale="0.06 0.06 0.25" support="base"/> + <bone aliases="lFoot avatar_mAnkleLeft" connected="true" end="0.112 0.000 -0.061" group="SL Base" name="mAnkleLeft" pivot="-0.028887 0.001378 -0.468449" pos="-0.029 0.001 -0.468" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <collision_volume end="0.100 0.000 -0.020" group="Collision" name="L_FOOT" pos="0.077 0.0 -0.041" rot="0.000000 10.00000 0.000000" scale="0.13 0.05 0.05" support="base"/> + <bone aliases="avatar_mFootLeft" connected="true" end="0.105 0.008 0.001" group="SL Base" name="mFootLeft" pivot="0.111956 -0.000000 -0.060620" pos="0.112 -0.000 -0.061" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"> + <bone aliases="avatar_mToeLeft" connected="true" end="0.020 0.000 0.000" group="SL Base" name="mToeLeft" pivot="0.105387 0.008270 0.000871" pos="0.109 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" support="base"/> + </bone> + </bone> + </bone> + </bone> + <bone end="-0.197 0.000 0.000" group="Tail" name="mTail1" pivot="-0.116417 0.000000 0.047423" pos="-0.116 0.000 0.047" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"> + <bone connected="true" end="-0.168 0.000 0.000" group="Tail" name="mTail2" pivot="-0.197078 0.000000 0.000000" pos="-0.197 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.142 0.000 0.000" group="Tail" name="mTail3" pivot="-0.168068 0.000000 0.000000" pos="-0.168 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.112 0.000 0.000" group="Tail" name="mTail4" pivot="-0.142056 0.000000 0.000000" pos="-0.142 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.094 0.000 0.000" group="Tail" name="mTail5" pivot="-0.112044 0.000000 0.000000" pos="-0.112 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"> + <bone connected="true" end="-0.025 0.000 0.000" group="Tail" name="mTail6" pivot="-0.094038 0.000000 0.000000" pos="-0.094 0.000 0.000" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended"/> + </bone> + </bone> + </bone> + </bone> + </bone> + <bone end="0.004 0.000 -0.007" group="SL Extended" name="mGroin" pivot="0.064234 0.000000 -0.096868" pos="0.064 0.000 -0.097" rot="0.000000 0.000000 0.000000" scale="1.00 1.00 1.00" support="extended" connected="false"/> + </bone> +</linden_skeleton> + diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index bf7cf08c63..43a81ada49 100755 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -203,7 +203,7 @@ void LLViewerJointMesh::uploadJointMatrices() // DrawElementsBLEND and utility code //-------------------------------------------------------------------- -// compate_int is used by the qsort function to sort the index array +// compare_int is used by the qsort function to sort the index array int compare_int(const void *a, const void *b) { if (*(U32*)a < *(U32*)b) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 762ff95840..84d585df02 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -106,6 +106,7 @@ #include "llscenemonitor.h" #include "llsdserialize.h" #include "llcallstack.h" +#include "llrendersphere.h" extern F32 SPEED_ADJUST_MAX; extern F32 SPEED_ADJUST_MAX_SEC; @@ -1340,6 +1341,43 @@ void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) newMax.add(buffer); } +void render_sphere_and_line(const LLVector3& begin_pos, const LLVector3& end_pos, F32 sphere_scale, const LLVector3& occ_color, const LLVector3& visible_color) +{ + // Unoccluded bone portions + LLGLDepthTest normal_depth(GL_TRUE); + + // Draw line segment for unoccluded joint + gGL.diffuseColor3f(visible_color[0], visible_color[1], visible_color[2]); + + gGL.begin(LLRender::LINES); + gGL.vertex3fv(begin_pos.mV); + gGL.vertex3fv(end_pos.mV); + gGL.end(); + + + // Draw sphere representing joint pos + gGL.pushMatrix(); + gGL.scalef(sphere_scale, sphere_scale, sphere_scale); + gSphere.renderGGL(); + gGL.popMatrix(); + + LLGLDepthTest depth_under(GL_TRUE, GL_FALSE, GL_GREATER); + + // Occluded bone portions + gGL.diffuseColor3f(occ_color[0], occ_color[1], occ_color[2]); + + gGL.begin(LLRender::LINES); + gGL.vertex3fv(begin_pos.mV); + gGL.vertex3fv(end_pos.mV); + gGL.end(); + + // Draw sphere representing joint pos + gGL.pushMatrix(); + gGL.scalef(sphere_scale, sphere_scale, sphere_scale); + gSphere.renderGGL(); + gGL.popMatrix(); +} + //----------------------------------------------------------------------------- // renderCollisionVolumes() //----------------------------------------------------------------------------- @@ -1348,10 +1386,36 @@ void LLVOAvatar::renderCollisionVolumes() std::ostringstream ostr; for (S32 i = 0; i < mNumCollisionVolumes; i++) { - mCollisionVolumes[i].renderCollision(); + //mCollisionVolumes[i].renderCollision(); ostr << mCollisionVolumes[i].getName() << ", "; } + for (S32 i = 0; i < mNumCollisionVolumes; i++) + { + LLAvatarJointCollisionVolume& collision_volume = mCollisionVolumes[i]; + + collision_volume.updateWorldMatrix(); + + gGL.pushMatrix(); + gGL.multMatrix( &collision_volume.getXform()->getWorldMatrix().mMatrix[0][0] ); + + LLVector3 begin_pos(0,0,0); + LLVector3 end_pos(collision_volume.getEnd()); + static F32 sphere_scale = 1.0f; + static F32 center_dot_scale = 0.05f; + + static LLVector3 CV_COLOR_OCCLUDED(0.0f, 0.0f, 1.0f); + static LLVector3 CV_COLOR_VISIBLE(0.5f, 0.5f, 1.0f); + static LLVector3 DOT_COLOR_OCCLUDED(1.0f, 1.0f, 1.0f); + static LLVector3 DOT_COLOR_VISIBLE(1.0f, 1.0f, 1.0f); + + render_sphere_and_line(begin_pos, end_pos, sphere_scale, CV_COLOR_OCCLUDED, CV_COLOR_VISIBLE); + render_sphere_and_line(begin_pos, end_pos, center_dot_scale, DOT_COLOR_OCCLUDED, DOT_COLOR_VISIBLE); + + gGL.popMatrix(); + } + + if (mNameText.notNull()) { LLVector4a unused; @@ -1374,6 +1438,13 @@ void LLVOAvatar::renderBones() avatar_joint_list_t::iterator iter = mSkeleton.begin(); avatar_joint_list_t::iterator end = mSkeleton.end(); + static LLVector3 BASE_COLOR_OCCLUDED(1.0f, 0.0f, 0.0f); + static LLVector3 BASE_COLOR_VISIBLE(0.5f, 0.5f, 0.5f); + static LLVector3 EXTENDED_COLOR_OCCLUDED(0.0f, 1.0f, 0.0f); + static LLVector3 EXTENDED_COLOR_VISIBLE(0.5f, 0.5f, 0.5f); + + static F32 SPHERE_SCALEF = 0.003f; + for (; iter != end; ++iter) { LLJoint* jointp = *iter; @@ -1386,52 +1457,28 @@ void LLVOAvatar::renderBones() jointp->updateWorldMatrix(); LLJoint::SupportCategory sc = jointp->getSupport(); + LLVector3 occ_color, visible_color; - gGL.pushMatrix(); - gGL.multMatrix( &jointp->getXform()->getWorldMatrix().mMatrix[0][0] ); - - gGL.begin(LLRender::LINES); - - LLVector3 v[] = - { - LLVector3(0,0,0), - LLVector3(0,0,0), - }; - v[1] = jointp->getEnd(); - - LLGLDepthTest normal_depth(GL_TRUE); - - // Unoccluded bone portions if (sc == LLJoint::SUPPORT_BASE) { - gGL.diffuseColor3f( 1.0f, 0.5f, 0.5f ); + occ_color = BASE_COLOR_OCCLUDED; + visible_color = BASE_COLOR_VISIBLE; } else { - gGL.diffuseColor3f( 0.5f, 1.0f, 0.5f ); + occ_color = EXTENDED_COLOR_OCCLUDED; + visible_color = EXTENDED_COLOR_VISIBLE; } - - - gGL.vertex3fv(v[0].mV); - gGL.vertex3fv(v[1].mV); - - LLGLDepthTest depth_under(GL_TRUE, GL_FALSE, GL_GREATER); + LLVector3 begin_pos(0,0,0); + LLVector3 end_pos(jointp->getEnd()); - // Unoccluded bone portions - if (sc == LLJoint::SUPPORT_BASE) - { - gGL.diffuseColor3f( 1.0f, 0.0f, 0.0f ); - } - else - { - gGL.diffuseColor3f( 0.0f, 1.0f, 0.0f ); - } - - gGL.vertex3fv(v[0].mV); - gGL.vertex3fv(v[1].mV); - - gGL.end(); + F32 sphere_scale = SPHERE_SCALEF; + + gGL.pushMatrix(); + gGL.multMatrix( &jointp->getXform()->getWorldMatrix().mMatrix[0][0] ); + render_sphere_and_line(begin_pos, end_pos, sphere_scale, occ_color, visible_color); + gGL.popMatrix(); } |