new Pointable()
Constructs a Pointable object.
An uninitialized pointable is considered invalid. Get valid Pointable objects from a Frame or a Hand object.
- Source:
- pointable.js, line 3
Members
-
<static> Invalid :Leap.Pointable
-
An invalid Pointable object.
You can use this Pointable instance in comparisons testing whether a given Pointable instance is valid or invalid. (You can also use the Pointable.valid property.)
Type:
- Source:
- pointable.js, line 136
-
direction :Leap.Vector
-
The direction in which this finger or tool is pointing.
The direction is expressed as a unit vector pointing in the same direction as the tip.
Type:
- Source:
- pointable.js, line 90
-
id :String
-
A unique ID assigned to this Pointable object, whose value remains the same across consecutive frames while the tracked finger or tool remains visible. If tracking is lost (for example, when a finger is occluded by another finger or when it is withdrawn from the Leap field of view), the Leap may assign a new ID when it detects the entity in a future frame.
Use the ID value with the pointable() functions defined for the Frame and Frame.Hand classes to find this Pointable object in future frames.
Type:
- String
- Source:
- pointable.js, line 37
-
length :Number
-
The estimated length of the finger or tool in millimeters.
The reported length is the visible length of the finger or tool from the hand to tip. If the length isn't known, then a value of 0 is returned.
Type:
- Number
- Source:
- pointable.js, line 54
-
tipPosition :Leap.Vector
-
The tip position in millimeters from the Leap origin.
Type:
- Source:
- pointable.js, line 102
-
tipVelocity :Leap.Vector
-
The rate of change of the tip position in millimeters/second.
Type:
- Source:
- pointable.js, line 110
-
tool :Boolean
-
Whether or not the Pointable is believed to be a tool. Tools are generally longer, thinner, and straighter than fingers.
If tool is false, then this Pointable must be a finger.
Type:
- Boolean
- Source:
- pointable.js, line 65
-
valid :Boolean
-
Indicates whether this is a valid Pointable object.
Type:
- Boolean
- Source:
- pointable.js, line 29
-
width :Number
-
The estimated width of the tool in millimeters.
The reported width is the average width of the visible portion of the tool from the hand to the tip. If the width isn't known, then a value of 0 is returned.
Pointable objects representing fingers do not have a width property.
Type:
- Number
- Source:
- pointable.js, line 76
Methods
-
toString() → {String}
-
A string containing a brief, human readable description of the Pointable object.
- Source:
- pointable.js, line 120
Returns:
A description of the Pointable object as a string.
- Type
- String