Tanoda
PolyHand.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using UnityEngine;
10using System.Collections;
11using Leap;
12
13namespace Leap.Unity {
20 public class PolyHand : HandModel {
21 public override ModelType HandModelType {
22 get {
23 return ModelType.Graphics;
24 }
25 }
26 public override bool SupportsEditorPersistence() {
27 return true;
28 }
30 public override void InitHand() {
32
33 for (int f = 0; f < fingers.Length; ++f) {
34 if (fingers[f] != null) {
37 }
38 }
39 }
40
42 public override void UpdateHand() {
44
45 for (int f = 0; f < fingers.Length; ++f) {
46 if (fingers[f] != null) {
48 }
49 }
50 }
51
53 protected void SetPalmOrientation() {
54 if (palm != null) {
55 palm.position = GetPalmPosition();
56 palm.rotation = GetPalmRotation();
57 }
58 }
59 }
60
61}
The Finger class represents a tracked finger.
Definition: Finger.cs:20
FingerType
Enumerates the names of the fingers.
Definition: Finger.cs:167
Finger.FingerType fingerType
Definition: FingerModel.cs:34
virtual void InitFinger()
Definition: FingerModel.cs:69
abstract void UpdateFinger()
Vector3 GetPalmPosition()
Definition: HandModel.cs:66
FingerModel[] fingers
Definition: HandModel.cs:47
Quaternion GetPalmRotation()
Definition: HandModel.cs:73
override ModelType HandModelType
Definition: PolyHand.cs:21
override bool SupportsEditorPersistence()
Returns whether or not this hand model supports editor persistence. This is false by default and must...
Definition: PolyHand.cs:26
override void InitHand()
Definition: PolyHand.cs:30
void SetPalmOrientation()
Definition: PolyHand.cs:53
override void UpdateHand()
Definition: PolyHand.cs:42