The LeapInteractionBox class represents a box-shaped region completely within the field of view of the Leap Motion controller. More...
Inherits NSObject.
Instance Methods | |
(LeapVector *) | - denormalizePoint: |
Converts a position defined by normalized LeapInteractionBox coordinates into device coordinates in millimeters. More... | |
(BOOL) | - equals: |
Reports whether this is a valid LeapInteractionBox object. More... | |
(LeapVector *) | - normalizePoint:clamp: |
Normalizes the coordinates of a point using the interaction box. More... | |
Class Methods | |
(LeapInteractionBox *) | + invalid |
Returns an invalid LeapInteractionBox object. More... | |
Properties | |
LeapVector * | center |
The center of the LeapInteractionBox in device coordinates (millimeters). More... | |
float | depth |
The depth of the LeapInteractionBox in millimeters, measured along the z-axis. More... | |
float | height |
The height of the LeapInteractionBox in millimeters, measured along the y-axis. More... | |
BOOL | isValid |
Reports whether this is a valid LeapInteractionBox object. More... | |
float | width |
The width of the LeapInteractionBox in millimeters, measured along the x-axis. More... | |
The LeapInteractionBox class represents a box-shaped region completely within the field of view of the Leap Motion controller.
The interaction box is an axis-aligned rectangular prism and provides normalized coordinates for hands, fingers, and tools within this box. The InteractionBox class can make it easier to map positions in the Leap Motion coordinate system to 2D or 3D coordinate systems used for application drawing.
The LeapInteractionBox region is defined by a center and dimensions along the x, y, and z axes.
- (LeapVector *) denormalizePoint: | (const LeapVector *) | position |
Converts a position defined by normalized LeapInteractionBox coordinates into device coordinates in millimeters.
This function performs the inverse of [LeapInteractionBox normalizePoint:].
position | A normalized position in LeapInteractionBox coordinates. |
- (BOOL) equals: | (const LeapInteractionBox *) | other |
Reports whether this is a valid LeapInteractionBox object.
+ (LeapInteractionBox *) invalid |
- (LeapVector *) normalizePoint: | (const LeapVector *) | position | |
clamp: | (BOOL) | clamp | |
Normalizes the coordinates of a point using the interaction box.
Coordinates from the Leap frame of reference (millimeters) are converted to a range of [0..1] such that the minimum value of the LeapInteractionBox maps to 0 and the maximum value of the LeapInteractionBox maps to 1.
position | The input position in device coordinates. |
clamp | Whether or not to limit the output value to the range [0,1] when the input position is outside the LeapInteractionBox. Defaults to true. |
|
readnonatomicassign |
The center of the LeapInteractionBox in device coordinates (millimeters).
This point is equidistant from all sides of the box.
|
readnonatomicassign |
The depth of the LeapInteractionBox in millimeters, measured along the z-axis.
|
readnonatomicassign |
The height of the LeapInteractionBox in millimeters, measured along the y-axis.
|
readnonatomicassign |
Reports whether this is a valid LeapInteractionBox object.
|
readnonatomicassign |
The width of the LeapInteractionBox in millimeters, measured along the x-axis.