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


C# HandModel.GetPalmPosition方法代码示例

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


在下文中一共展示了HandModel.GetPalmPosition方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: Start

 void Start()
 {
 	handmodel = GetComponent<HandModel>();
     _grabedObj = null;
     palmPostion = handmodel.GetPalmPosition();
     velocity = Vector3.zero;
 }
开发者ID:pangaeastudio,项目名称:vrgame-bruceli,代码行数:7,代码来源:LeapMotionHand.cs

示例3: DirectionBetweenPalm

	public static Vector3 DirectionBetweenPalm(HandModel fromHand, HandModel toHand){

		Vector3 fromHandPalmPos = fromHand.GetPalmPosition ();
		Vector3 toHandPalmPos = toHand.GetPalmPosition ();

		return Math3dExt.Direction (fromHandPalmPos, toHandPalmPos);

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

示例4: DistanceBetweenPalms

	public static float DistanceBetweenPalms(HandModel handOne, HandModel handTwo){

		Vector3 handOnePalmPos = handOne.GetPalmPosition();
		Vector3 handTwoPalmPos = handTwo.GetPalmPosition ();

		return Math3dExt.Distance (handOnePalmPos, handTwoPalmPos);

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

示例5: GetFireBallSpawnPosition

	Vector3 GetFireBallSpawnPosition(HandModel hand, float distance){

		Vector3 palmPos = hand.GetPalmPosition ();

		Vector3 palmDir = hand.GetPalmNormal ();

		return palmPos + Vector3.Scale(palmDir,new Vector3(distance,distance,distance));
	}
开发者ID:xzs424,项目名称:Mage-Simulator-Wizard-Adventure,代码行数:8,代码来源:MageFireHandController.cs

示例6: CastBolts

	void CastBolts(HandModel leftHand, HandModel rightHand ){


		if (!IsCastingStarted && !spellControl.SpellCasting()) {

			Vector3 middle = leftHand.GetPalmPosition () + rightHand.GetPalmPosition ();

			currentThunderBolt = GameObject.Instantiate (thunderBoltPrefab, middle, gameObject.transform.rotation) as ThunderBolt;
			currentThunderBolt.SetPosition (leftHand.GetPalmPosition (), rightHand.GetPalmPosition ());

			IsCastingStarted = true;
			spellControl.GrabCastingControl ();
		}

	

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

示例7: HorizonCheck

 public bool HorizonCheck(HandModel hand)
 {
     Ray ray = new Ray(m_rayRoot.position, (hand.GetPalmPosition() - m_rayRoot.position).normalized);
     Debug.DrawRay(m_rayRoot.position, ray.direction * 10000.0f, new Color(1.0f, 0.0f,0.0f));
     RaycastHit hitInfo;
     LayerMask mask = LayerMask.GetMask("Earth");
     bool hit = Physics.Raycast(ray, out hitInfo, 10000.0f, mask);
     if ( hit ) {
       return true;
     }
     else {
       return false;
     }
 }
开发者ID:ryanwang,项目名称:VR-Planetarium,代码行数:14,代码来源:HorizonDetector.cs

示例8: MiddleBetweenPalms

	public Vector3 MiddleBetweenPalms(HandModel handOne, HandModel handTwo){

		return Math3dExt.MidPosition (handOne.GetPalmPosition (), handTwo.GetPalmPosition ());

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

示例9: UpdateBolts

	void UpdateBolts(HandModel leftHand, HandModel rightHand){

		if (currentThunderBolt && IsCastingStarted)
			currentThunderBolt.SetPosition (leftHand.GetPalmPosition (), rightHand.GetPalmPosition ());
	}
开发者ID:xzs424,项目名称:Mage-Simulator-Wizard-Adventure,代码行数:5,代码来源:MageThunderHandController.cs


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