public void WeightedAddPose(float weight, ref FingerPoseData data) { spread += weight * data.spread; muscle1 += weight * data.muscle1; muscle2 += weight * data.muscle2; muscle3 += weight * data.muscle3; }
public FingerPoseData this[int idx] { get { if (idx < 0 || idx >= HumanFingerCount) { throw new IndexOutOfRangeException(); } switch (idx) { case 0: return(thumb); case 1: return(index); case 2: return(middle); case 3: return(ring); default: return(little); } } set { if (idx < 0 || idx >= HumanFingerCount) { throw new IndexOutOfRangeException(); } switch (idx) { case 0: thumb = value; break; case 1: index = value; break; case 2: middle = value; break; case 3: ring = value; break; default: little = value; break; } } }