本文整理汇总了C#中HandModel类的典型用法代码示例。如果您正苦于以下问题:C# HandModel类的具体用法?C# HandModel怎么用?C# HandModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HandModel类属于命名空间,在下文中一共展示了HandModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateHand
HandModel CreateHand(HandModel model) {
HandModel hand_model = Instantiate(model, transform.position, transform.rotation)
as HandModel;
hand_model.gameObject.SetActive(true);
IgnoreHandCollisions(hand_model);
return hand_model;
}
示例2: Start
void Start()
{
handmodel = GetComponent<HandModel>();
_grabedObj = null;
palmPostion = handmodel.GetPalmPosition();
velocity = Vector3.zero;
}
示例3: EmitHand
protected void EmitHand(HandModel value = null)
{
EventHandler<LMWidgets.EventArg<HandData>> handler = HandEvent;
if (handler != null) {
handler (this, new LMWidgets.EventArg<HandData> (new HandData (value)));
}
}
示例4: Start
public void Start()
{
if (!LeapHandController)
throw new System.Exception("Leap Hand Controller has not been assigned!");
_handModel = Utilities.GetHandModel(LeapHandController, HandModelType);
}
示例5: IsReadyToCastBolts
bool IsReadyToCastBolts(HandModel leftHand, HandModel rightHand){
//Debug.Log (HandRecog.PalmsFacingEachOther (handController, leftHand, rightHand, palmDirMinAngle));
return HandRecog.PalmsFacingEachOther (handController, leftHand, rightHand, palmDirMinAngle) &&
HandRecog.IsHandClenchingStrict (leftHand, handClenchingMinAngle) && HandRecog.IsHandClenchingStrict (rightHand, handClenchingMinAngle);
}
示例6: Start
// Use this for initialization
void Start()
{
Current_Hand = new HandAttributes();
cur_hand_model = transform.GetComponent<HandModel>();
handInFrame = false;
// Debug.Log(cur_hand_model.name);
}
示例7: DistanceBetweenPalms
public static float DistanceBetweenPalms(HandModel handOne, HandModel handTwo){
Vector3 handOnePalmPos = handOne.GetPalmPosition();
Vector3 handTwoPalmPos = handTwo.GetPalmPosition ();
return Math3dExt.Distance (handOnePalmPos, handTwoPalmPos);
}
示例8: DirectionBetweenPalm
public static Vector3 DirectionBetweenPalm(HandModel fromHand, HandModel toHand){
Vector3 fromHandPalmPos = fromHand.GetPalmPosition ();
Vector3 toHandPalmPos = toHand.GetPalmPosition ();
return Math3dExt.Direction (fromHandPalmPos, toHandPalmPos);
}
示例9: 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));
}
示例10: GetAllGraphicsHands
public HandModel[] GetAllGraphicsHands()
{
if (hand_graphics_ == null)
return new HandModel[0];
HandModel[] models = new HandModel[hand_graphics_.Count];
hand_graphics_.Values.CopyTo(models, 0);
return models;
}
示例11: FirstRightHand
HandModel FirstRightHand(HandModel[] handsInScene)
{
foreach (HandModel hand in handsInScene) {
if (hand.GetLeapHand ().IsRight)
return hand;
}
return null;
}
示例12: Awake
protected virtual void Awake() {
_handModel = GetComponent<HandModel>();
_renderer = GetComponentInChildren<Renderer>();
_fadePropertyBlock = new MaterialPropertyBlock();
_renderer.GetPropertyBlock(_fadePropertyBlock);
_fadePropertyBlock.SetFloat("_Fade", 0);
_renderer.SetPropertyBlock(_fadePropertyBlock);
}
示例13: IsHand
private bool IsHand(Collider other)
{
if (other.transform.parent && other.transform.parent.parent && other.transform.parent.parent.GetComponent<HandModel> ()) {
_HandModel = other.transform.parent.parent.GetComponent<HandModel> ();
return true;
} else {
_HandModel = null;
return false;
}
}
示例14: IsHandPresent
private bool IsHandPresent()
{
if (!_handModel)
_handModel = Utilities.GetHandModel(LeapHandController, HandModelType);
if (_handModel == null)
return false;
return true;
}
示例15: Fire
IEnumerator Fire(HandModel currentHand)
{
canFire = false;
//Debug.Log (canFire);
GameObject justFired = Instantiate (ammo, currentHand.transform.position + currentHand.GetPalmNormal() * offset , currentHand.GetPalmRotation()) as GameObject;
justFired.GetComponent<moveProjectile> ().target = target;
//justFired.GetComponent<moveProjectile> ().force = Quaternion.LookRotation( handController.transform.forward, Vector3.down).eulerAngles;
yield return new WaitForSeconds (delay);
canFire = true;
}