Exemplo n.º 1
0
        public override void ApplyDefaultData(HapticSystemAttribute hapticSystemInfo)
        {
            base.ApplyDefaultData(hapticSystemInfo);

            indexFingerCoordinates  = Resources.Load <ScriptableBodyCoordinate>(hapticSystemInfo.AdditionalData[0] as string);
            middleFingerCoordinates = Resources.Load <ScriptableBodyCoordinate>(hapticSystemInfo.AdditionalData[1] as string);
            ringFingerCoordinates   = Resources.Load <ScriptableBodyCoordinate>(hapticSystemInfo.AdditionalData[2] as string);
            pinkyFingerCoordinates  = Resources.Load <ScriptableBodyCoordinate>(hapticSystemInfo.AdditionalData[3] as string);

            isRightHand = (bool)hapticSystemInfo.AdditionalData[4];
        }
        public virtual void ApplyDefaultData(HapticSystemAttribute hapticSystemAtt)
        {
            // Check to see if the first data point is a BodyCoordinateSystem
            ScriptableBodyCoordinate bodyCoordinate = Resources.Load <ScriptableBodyCoordinate>(hapticSystemAtt.AffectedBodyFileLocation);

            if (bodyCoordinate != null)
            {
                affectedBodyPart = bodyCoordinate;
            }

            hapticSystemInfo = hapticSystemAtt;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Allows the manager to know that a device is able to target a specific body part
 /// </summary>
 /// <param name="device">The haptic device that is able to target a body coordinate</param>
 /// <param name="hitLocation">The body coordinate system that it can handle</param>
 public void AddDevicePerBodyLocation(HapticDevice device, ScriptableBodyCoordinate hitLocation)
 {
     if (bodyAffectedByDevice.ContainsKey(hitLocation.affectableBodyParts))
     {
         bodyAffectedByDevice[hitLocation.affectableBodyParts].Add(device);
     }
     else
     {
         bodyAffectedByDevice[hitLocation.affectableBodyParts] = new List <HapticDevice>
         {
             device
         };
     }
 }