Esempio n. 1
0
        private void RemapAdditive(Vector3 source, int sourceDim, ref Vector3 dest, AxisDestination destDim)
        {
            float inp = source[sourceDim];

            if (destDim == AxisDestination.NegativeX || destDim == AxisDestination.NegativeY || destDim == AxisDestination.NegativeZ)
            {
                inp = -inp;
            }
            if (destDim == AxisDestination.PositiveX || destDim == AxisDestination.NegativeX)
            {
                dest[0] += inp;
            }
            else if (destDim == AxisDestination.PositiveY || destDim == AxisDestination.NegativeY)
            {
                dest[1] += inp;
            }
            else if (destDim == AxisDestination.PositiveZ || destDim == AxisDestination.NegativeZ)
            {
                dest[2] += inp;
            }
        }
 private void RemapAdditive(Vector3 source, int sourceDim, ref Vector3 dest, AxisDestination destDim)
 {
     float inp = source[sourceDim];
     if (destDim == AxisDestination.NegativeX || destDim == AxisDestination.NegativeY || destDim == AxisDestination.NegativeZ)
     {
         inp = -inp;
     }
     if (destDim == AxisDestination.PositiveX || destDim == AxisDestination.NegativeX)
     {
         dest[0] += inp;
     }
     else if (destDim == AxisDestination.PositiveY || destDim == AxisDestination.NegativeY)
     {
         dest[1] += inp;
     }
     else if (destDim == AxisDestination.PositiveZ || destDim == AxisDestination.NegativeZ)
     {
         dest[2] += inp;
     }
 }