예제 #1
0
 /// base constructor
 /// @param timeToHoldPose the time the user is required to hold the pose.
 /// @param maxMoveSpeed the maximum speed (in mm/sec) allowed for each of the relevant joints.
 /// @param angleTolerance  the hands are supposed to be at about 45 degrees in each direction.
 /// This is the allowed tolerance in degrees (i.e. a tolerance of 10 means everything from 35
 /// degrees to 55 degrees is ok
 /// in each axis. @note for the elbow displacement in the y axis this is the MINIMUM we have to be larger
 /// @param timeToSavePoints the time we use to average points
 public NIExitPoseDetector(float timeToHoldPose, float maxMoveSpeed, float angleTolerance, float timeToSavePoints)
 {
     m_maxMoveSpeed     = maxMoveSpeed;
     m_timeToHoldPose   = timeToHoldPose;
     m_timeToSavePoints = timeToSavePoints;
     m_angleTolerance   = angleTolerance;
     m_holdingPose      = false;
     m_timeDetectedPose = 0;
     m_firedEvent       = false;
     m_pointsRightHand  = new NITimedPointSpeedListUtility(timeToSavePoints);
     m_pointsLeftHand   = new NITimedPointSpeedListUtility(timeToSavePoints);
     m_pointsRightElbow = new NITimedPointSpeedListUtility(timeToSavePoints);
     m_pointsLeftElbow  = new NITimedPointSpeedListUtility(timeToSavePoints);
 }
예제 #2
0
 /// base constructor
 /// @param timeToHoldPose the time the user is required to hold the pose.
 /// @param maxMoveSpeed the maximum speed (in mm/sec) allowed for each of the relevant joints.
 /// @param angleTolerance This is the allowed tolerance in degrees 
 /// @param timeToSavePoints the time we use to average points
 public HandupPoseDetector(bool useRightHand, float timeToHoldPose, float maxMoveSpeed, float angleTolerance, float timeToSavePoints)
 {
     m_useRightHand = useRightHand;
     m_maxMoveSpeed = maxMoveSpeed;
     m_timeToHoldPose = timeToHoldPose;
     m_timeToSavePoints = timeToSavePoints;
     m_angleTolerance = angleTolerance;
     m_holdingPose = false;
     m_timeDetectedPose = 0;
     m_firedEvent = false;
     m_pointsHand = new NITimedPointSpeedListUtility(timeToSavePoints);
     m_pointsElbow = new NITimedPointSpeedListUtility(timeToSavePoints);
     m_pointsShoulder = new NITimedPointSpeedListUtility(timeToSavePoints);
 }
예제 #3
0
    /// base constructor
    /// @param timeToHoldPose the time the user is required to hold the pose.
    /// @param maxMoveSpeed the maximum speed (in mm/sec) allowed for each of the relevant joints.
    /// @param angleTolerance This is the allowed tolerance in degrees 
    /// @param timeToSavePoints the time we use to average points
    public SwipeGestureDetector(SwipeDirection direction, bool useRightHand, 
		float swipeMinimalLength, float swipeMaximalHeight,
		int swipeMininalDuration, int swipeMaximalDuration,
		float detectionThreshHold)
    {
        m_swipeDirection = direction;
        m_useRightHand = useRightHand;
        m_swipeMinimalLength = swipeMinimalLength;
        m_swipeMaximalHeight = swipeMaximalHeight;
        m_swipeMininalDuration = swipeMininalDuration;
        m_swipeMaximalDuration = swipeMaximalDuration;
        m_detectionThreshHold = detectionThreshHold;
        m_maxMoveSpeed = 100f;
        m_timeToHoldPose = 1f;
        m_timeToSavePoints = 0.5f;

        m_holdingPose = false;
        m_timeDetectedPose = 0;
        m_firedEvent = false;
        m_pointsHand = new TimedPointList(15);
        m_pointsTorso = new NITimedPointSpeedListUtility (m_timeToSavePoints);
        //m_pointsElbow = new NITimedPointSpeedListUtility(timeToSavePoints);
        //m_pointsShoulder = new NITimedPointSpeedListUtility(timeToSavePoints);
    }
예제 #4
0
 /// mono-behavior initialization
 public void Start()
 {
     m_points = new NITimedPointSpeedListUtility(0.5f);
 }
예제 #5
0
 /// mono-behavior initialization
 public void Start()
 {
     m_points = new NITimedPointSpeedListUtility(0.5f);
 }
예제 #6
0
 /// base constructor
 /// @param timeToHoldPose the time the user is required to hold the pose.
 /// @param maxMoveSpeed the maximum speed (in mm/sec) allowed for each of the relevant joints.
 /// @param angleTolerance  the hands are supposed to be at about 45 degrees in each direction. 
 /// This is the allowed tolerance in degrees (i.e. a tolerance of 10 means everything from 35 
 /// degrees to 55 degrees is ok
 /// in each axis. @note for the elbow displacement in the y axis this is the MINIMUM we have to be larger
 /// @param timeToSavePoints the time we use to average points
 public NIExitPoseDetector(float timeToHoldPose, float maxMoveSpeed, float angleTolerance, float timeToSavePoints)
 {
     m_maxMoveSpeed=maxMoveSpeed;
     m_timeToHoldPose=timeToHoldPose;
     m_timeToSavePoints = timeToSavePoints;
     m_angleTolerance = angleTolerance;
     m_holdingPose=false;
     m_timeDetectedPose=0;
     m_firedEvent=false;
     m_pointsRightHand = new NITimedPointSpeedListUtility(timeToSavePoints);
     m_pointsLeftHand = new NITimedPointSpeedListUtility(timeToSavePoints);
     m_pointsRightElbow = new NITimedPointSpeedListUtility(timeToSavePoints);
     m_pointsLeftElbow = new NITimedPointSpeedListUtility(timeToSavePoints);
 }