当前位置: 首页>>代码示例>>C#>>正文


C# HandModel.GetLeapHand方法代码示例

本文整理汇总了C#中HandModel.GetLeapHand方法的典型用法代码示例。如果您正苦于以下问题:C# HandModel.GetLeapHand方法的具体用法?C# HandModel.GetLeapHand怎么用?C# HandModel.GetLeapHand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HandModel的用法示例。


在下文中一共展示了HandModel.GetLeapHand方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateTracker

    protected override void UpdateTracker()
    {
        previousPosition = Position;
        previousOrientation = Orientation;
        previousGrabbingStrength = currentGrabbingStrength;

        //get the rightmost hand in the frame
        if (handController.GetAllGraphicsHands().Length != 0)
        {
            handModel = handController.GetAllGraphicsHands()[0];
            handModel.transform.GetComponentInChildren<SkinnedMeshRenderer>().enabled = visibleHand;
            hand = handModel.GetLeapHand();
            currentGrabbingStrength = lowPassFilter(hand.GrabStrength, previousGrabbingStrength);

            Position = lowPassFilter(handModel.GetPalmPosition(), previousPosition);
            Orientation = lowPassFilter(handModel.GetPalmDirection(), previousOrientation);
        }

        //mask/display the graphical hand on key down
        if (Input.GetKeyDown(visibleHandKey))
        {
            var smr = handModel.transform.GetComponentInChildren<SkinnedMeshRenderer>();
            visibleHand = !visibleHand;
        }

        Translation = Position - previousPosition;
        Rotation = previousOrientation - Orientation;
    }
开发者ID:Shujin-IIE,项目名称:RVSI-InteractionsTechniques,代码行数:28,代码来源:Virtual3DTrackerLeap.cs

示例2: ReleaseFireBall

	void ReleaseFireBall(HandModel hand){


		if (currentFireBall && IsCastingStarted && !HandRecog.IsHandClenchingNonStrict (hand, clenchingAngle) && hand.GetLeapHand().Confidence > confidenceLevel) {

			currentFireBall.Release (hand.GetPalmDirection (), 5.0f);
			IsCastingStarted = false;
			currentFireBall = null;

			spellControl.ReleaseCastingControl ();
		}


	}
开发者ID:xzs424,项目名称:Mage-Simulator-Wizard-Adventure,代码行数:14,代码来源:MageFireHandController.cs

示例3: CastFireBall

	void CastFireBall(HandModel hand){
		
		if (!IsCastingStarted && hand.GetLeapHand().Confidence >= confidenceLevel && !spellControl.SpellCasting()) {

			spellControl.SpellCasting ();

			IsCastingStarted = true;

			currentFireBall = GameObject.Instantiate (fireBallPrefab, GetFireBallSpawnPosition (hand, fireBallSpawnLocation), hand.gameObject.transform.rotation) as FireBall;

			//currentFireBall.transform.SetParent (handController.transform);
		}
			
	}
开发者ID:xzs424,项目名称:Mage-Simulator-Wizard-Adventure,代码行数:14,代码来源:MageFireHandController.cs

示例4: Start

 void Start()
 {
     active = false;
     hand_model = GetComponent<HandModel>();
     leap_hand = hand_model.GetLeapHand();
     if (leap_hand == null) Debug.LogError("No leap_hand founded");
     if(isRight)
     {
         if(!lControl.rightHanded)
         {
             isRight = false;
         }
     }
     else
     {
         if(lControl.leftHanded)
         {
             isRight = true;
         }
     }
 }
开发者ID:WilliamRADFunk,项目名称:vedic,代码行数:21,代码来源:RaycastHandler.cs

示例5: AngleBetweenFingerTipsHorizontal

	public static float AngleBetweenFingerTipsHorizontal(HandModel hand, int fingerIndexOne, int fingerIndexTwo){


		float angle = AngleBetweenFingerTips(hand,fingerIndexOne, fingerIndexTwo,hand.GetPalmNormal());

		if (hand.GetLeapHand ().IsRight)
			return -angle;

		return angle;

	}
开发者ID:xzs424,项目名称:Mage-Simulator-Wizard-Adventure,代码行数:11,代码来源:HandRecog.cs

示例6: DestroyHand

    /**
      * Destroys a HandModel instance if HandController.destroyHands is true (the default).
      * If you set destroyHands to false, you must destroy the hand instances elsewhere in your code.
      * EDIT BV : put back the hands in the initial position
      */
    protected void DestroyHand(HandModel hand_model)
    {
        if (hand_model.GetLeapHand().IsLeft) {
            lefthand = null;
            //Debug.Log("DestroyHand: minus left hand");
        } else {
            righthand = null;
            //Debug.Log("DestroyHand: minus right hand");
        }

        if (destroyHands)
            Destroy(hand_model.gameObject);
        else
            hand_model.SetLeapHand(null);
        //Debug.Log("DestroyHand " + hand_model);
    }
开发者ID:ifgx,项目名称:scripts-spr3,代码行数:21,代码来源:HandController.cs

示例7: GetHandInfo

 private void GetHandInfo()
 {
     //Get hand info and if there's no hand in the scene, don't run the rest of the update
     handModel = GetComponent<HandModel>();
     leapHand = handModel.GetLeapHand();
     if (leapHand == null)
         return;
 }
开发者ID:TheHolodeckProject,项目名称:UnityHolodeckProject,代码行数:8,代码来源:LeapStretch.cs

示例8: IsReadyToCastFireBall

	bool IsReadyToCastFireBall(HandModel hand){

		return HandRecog.IsPalmFacingUpwards (hand, palmFacingUpAngle) && HandRecog.IsHandClenchingStrict (hand, clenchingAngle) && hand.GetLeapHand().Confidence >= confidenceLevel;

	}
开发者ID:xzs424,项目名称:Mage-Simulator-Wizard-Adventure,代码行数:5,代码来源:MageFireHandController.cs


注:本文中的HandModel.GetLeapHand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。