Tanoda
Leap.Unity.Tests.FrameValidator Class Referenceabstract
Inheritance diagram for Leap.Unity.Tests.FrameValidator:
Leap.Unity.Tests.HandFactoryLeft Leap.Unity.Tests.HandFactoryRight Leap.Unity.Tests.HandFactoryTwoHands Leap.Unity.Tests.TransformCopyIdentity Leap.Unity.Tests.TransformCopyTranslation

Public Member Functions

virtual void Setup ()
 
virtual void Teardown ()
 
void HandsAreUnique ()
 
void HandsHaveFiveFingers ()
 
void FingersHaveFourBones ([ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType fingerType, [ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType boneType)
 
void BoneLength ([ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType fingerType, [ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType boneType)
 
void JointsMatch ([ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType fingerType, [ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType boneType)
 
void CenterIsBetweenJoints ([ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType fingerType, [ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType boneType)
 
void DirectionMatchesJoints ([ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType fingerType, [ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType boneType)
 
void RotationIsValid ()
 

Protected Member Functions

abstract Frame createFrame ()
 
Bone getBone (Hand hand, Finger.FingerType fingerType, Bone.BoneType boneType)
 
void assertVectorsEqual (Vector a, Vector b, string vectorName="Vector")
 

Protected Attributes

Frame _frame
 

Static Protected Attributes

const float TOLERANCE = 0.0001f
 
static Finger.FingerType[] _fingers
 
static Bone.BoneType[] _bones
 

Detailed Description

Definition at line 14 of file FrameValidator.cs.

Member Function Documentation

◆ assertVectorsEqual()

void Leap.Unity.Tests.FrameValidator.assertVectorsEqual ( Vector  a,
Vector  b,
string  vectorName = "Vector" 
)
protected

Definition at line 145 of file FrameValidator.cs.

◆ BoneLength()

void Leap.Unity.Tests.FrameValidator.BoneLength ( [ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType  fingerType,
[ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType  boneType 
)

Definition at line 68 of file FrameValidator.cs.

◆ CenterIsBetweenJoints()

void Leap.Unity.Tests.FrameValidator.CenterIsBetweenJoints ( [ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType  fingerType,
[ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType  boneType 
)

Definition at line 97 of file FrameValidator.cs.

◆ createFrame()

◆ DirectionMatchesJoints()

void Leap.Unity.Tests.FrameValidator.DirectionMatchesJoints ( [ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType  fingerType,
[ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType  boneType 
)

Definition at line 108 of file FrameValidator.cs.

◆ FingersHaveFourBones()

void Leap.Unity.Tests.FrameValidator.FingersHaveFourBones ( [ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType  fingerType,
[ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType  boneType 
)

Definition at line 59 of file FrameValidator.cs.

◆ getBone()

Bone Leap.Unity.Tests.FrameValidator.getBone ( Hand  hand,
Finger.FingerType  fingerType,
Bone.BoneType  boneType 
)
protected

Definition at line 130 of file FrameValidator.cs.

◆ HandsAreUnique()

void Leap.Unity.Tests.FrameValidator.HandsAreUnique ( )

Definition at line 46 of file FrameValidator.cs.

◆ HandsHaveFiveFingers()

void Leap.Unity.Tests.FrameValidator.HandsHaveFiveFingers ( )

Definition at line 52 of file FrameValidator.cs.

◆ JointsMatch()

void Leap.Unity.Tests.FrameValidator.JointsMatch ( [ValueSource(typeof(FrameValidator), "_fingers")] Finger.FingerType  fingerType,
[ValueSource(typeof(FrameValidator), "_bones")] Bone.BoneType  boneType 
)

Definition at line 79 of file FrameValidator.cs.

◆ RotationIsValid()

void Leap.Unity.Tests.FrameValidator.RotationIsValid ( )

Definition at line 124 of file FrameValidator.cs.

◆ Setup()

virtual void Leap.Unity.Tests.FrameValidator.Setup ( )
virtual

Definition at line 34 of file FrameValidator.cs.

◆ Teardown()

virtual void Leap.Unity.Tests.FrameValidator.Teardown ( )
virtual

Definition at line 39 of file FrameValidator.cs.

Member Data Documentation

◆ _bones

Bone.BoneType [] Leap.Unity.Tests.FrameValidator._bones
staticprotected
Initial value:
= {
Bone.BoneType.TYPE_DISTAL,
Bone.BoneType.TYPE_INTERMEDIATE,
Bone.BoneType.TYPE_METACARPAL,
Bone.BoneType.TYPE_PROXIMAL
}

Definition at line 24 of file FrameValidator.cs.

◆ _fingers

Finger.FingerType [] Leap.Unity.Tests.FrameValidator._fingers
staticprotected
Initial value:
= {
Finger.FingerType.TYPE_INDEX,
Finger.FingerType.TYPE_MIDDLE,
Finger.FingerType.TYPE_PINKY,
Finger.FingerType.TYPE_RING,
Finger.FingerType.TYPE_THUMB
}

Definition at line 16 of file FrameValidator.cs.

◆ _frame

Frame Leap.Unity.Tests.FrameValidator._frame
protected

Definition at line 31 of file FrameValidator.cs.

◆ TOLERANCE

const float Leap.Unity.Tests.FrameValidator.TOLERANCE = 0.0001f
staticprotected

Definition at line 15 of file FrameValidator.cs.


The documentation for this class was generated from the following file: