示例#1
0
 public override void checkClassifier(EmbodiedClassifier classifier)
 {
     //I imagine this needing to call to two other scripts, each one dealing with each hand
     //and updating their side of the arc. However is there a way to use different types of
     //classifiers in the same file? (can this be simplified to a single file or less than 3 to 4 scripts?
     throw new System.NotImplementedException();
 }
 public override void pinFunction(RSDESPin pin, EmbodiedClassifier classifier)
 {
     if (pin != null)
     {
         pin.toggleTerminator();
     }
 }
 public override void pinFunction(RSDESPin pin, EmbodiedClassifier classifier)
 {
     if (pin != null)
     {
         pin.toggleHorizonPlane();
     }
 }
 public override void checkClassifier(EmbodiedClassifier classifier)
 {
     if (Operations.Angle(classifier.direction, new float3(0, 1, 0)) - desiredAngle < angleTol && Time.time > startTime + cooldown)
     {
         startTime = Time.time;
         RSDESManager.ins.GlobalLatitude = !RSDESManager.ins.GlobalLatitude;
         classifier.shouldFinish         = true;
     }
 }
示例#5
0
 public override void pinFunction(RSDESPin pin, EmbodiedClassifier classifier)
 {
     if (pin != null)
     {
         //TODO fix this its failing
         UnityEngine.Debug.Log("I made it so far");
         pin.StarMode = RSDESPin.starFieldSelect.single;
         UnityEngine.Debug.Log("I am this: " + pin.StarMode);
     }
 }
示例#6
0
        public override void checkClassifier(EmbodiedClassifier classifier)
        {
            //look at whether the gesture being performed is close to the surface of the Earth
            float dist = IMRE.Math.Operations.magnitude((float3)RSDESManager.earthPos - classifier.origin);

            if (Unity.Mathematics.math.abs(RSDESManager.EarthRadius - dist) < tolerance && Time.time > _startTime + cooldown)
            {
                //figure out when the gesture began
                _startTime = Time.time;

                //make a pin at a location on the Earth closest to where the gesture is
                RSDESPin.Constructor(GeoPlanetMaths.latlong(classifier.origin, RSDESManager.earthPos));

                //the gesture has completed the functionality.
                classifier.shouldFinish = true;
            }
        }
        public override void checkClassifier(EmbodiedClassifier classifier)
        {
            float   bestDist = tolerance;
            pinData pin      = default(pinData);

            //find closest point
            for (int i = 0; i < RSDESManager.ins.pinnedPoints.Count; i++)
            {
                if ((Operations.magnitude(classifier.origin - (float3)(RSDESManager.ins.pinnedPoints[i].contactPoint)) < bestDist) &&
                    (Operations.Angle(classifier.direction,
                                      pinDirection(RSDESManager.ins.pinnedPoints[i].pin)) < angleTolerance))
                {
                    pin      = RSDESManager.ins.pinnedPoints[i];
                    bestDist = Operations.magnitude(classifier.origin - (float3)RSDESManager.ins.pinnedPoints[i].contactPoint);
                }
            }
            if (!pin.Equals(default(pinData)))
            {
                pinFunction(pin.pin, classifier);
            }
        }
 public override void endAction(EmbodiedClassifier classifier)
 {
     throw new System.NotImplementedException();
 }
示例#9
0
 public override void pinFunction(RSDESPin pin, EmbodiedClassifier classifier)
 {
     throw new System.NotImplementedException();
 }
 public abstract void pinFunction(RSDESPin pin, EmbodiedClassifier classifier);
 public override void endAction(EmbodiedClassifier classifier)
 {
     return;
 }
示例#12
0
 public override void endAction(EmbodiedClassifier classifier)
 {
     //do nothing
 }
示例#13
0
 public override void pinFunction(RSDESPin pin, EmbodiedClassifier classifier)
 {
     pin.Latlong = GeoPlanetMaths.latlong(classifier.origin, RSDESManager.earthPos);
 }