Download this file

126 lines (118 with data), 3.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/******************************************************************************\
* Copyright (C) 2012-2016 Leap Motion, Inc. All rights reserved. *
* Leap Motion proprietary and confidential. Not for distribution. *
* Use subject to the terms of the Leap Motion SDK Agreement available at *
* https://developer.leapmotion.com/sdk_agreement, or another agreement *
* between Leap Motion and you, your company or other organization. *
\******************************************************************************/
namespace Leap
{
using System;
using System.Runtime.InteropServices;
/**
* The Arm class represents the forearm.
*
*/
[Serializable]
public class Arm : Bone
{
/**
* Constructs a default Arm object.
*
* Get valid Arm objects from a Hand object.
*
* \include Arm_get.txt
*
* @since 2.0.3
*/
public Arm() : base() { }
/**
* Constructs a new Arm object.
*
* @param elbow The position of the elbow.
* @param wrist The position of the wrist.
* @param center The position of the midpoint between the elbow and wrist.
* @param direction The unit direction vector from elbow to wrist.
* @param length The distance between elbow and wrist in millimeters.
* @param width The estimated average width of the arm.
* @param basis The basis matrix representing the orientation of the arm.
* @since 3.0
*/
public Arm(Vector elbow,
Vector wrist,
Vector center,
Vector direction,
float length,
float width,
LeapQuaternion rotation)
: base(elbow,
wrist,
center,
direction,
length,
width,
BoneType.TYPE_METACARPAL, //ignored for arms
rotation) { }
/**
* Compare Arm object equality.
*
* \include Arm_operator_equals.txt
*
* Two Arm objects are equal if and only if both Arm objects represent the
*
* exact same physical arm in the same frame and both Arm objects are valid.
* @since 2.0.3
*/
public bool Equals(Arm other)
{
return base.Equals(other as Bone);
}
/**
* A string containing a brief, human readable description of the Arm object.
*
* \include Arm_toString.txt
*
* @returns A description of the Arm object as a string.
* @since 2.0.3
*/
public override string ToString()
{
return "Arm";
}
/**
* The position of the elbow.
*
* \include Arm_elbowPosition.txt
*
* If not in view, the elbow position is estimated based on typical human
* anatomical proportions.
*
* @since 2.0.3
*/
public Vector ElbowPosition
{
get
{
return base.PrevJoint;
}
}
/**
* The position of the wrist.
*
* \include Arm_wristPosition.txt
*
* Note that the wrist position is not collocated with the end of any bone in
* the hand. There is a gap of a few centimeters since the carpal bones are
* not included in the skeleton model.
*
* @since 2.0.3
*/
public Vector WristPosition
{
get
{
return base.NextJoint;
}
}
}
}