![]() |
Leap Motion C# API Reference
0.8.0
|
The ScreenList class represents a list of Screen objects. More...
Inherits Leap.Interface, and IEnumerable< Screen >.
Public Member Functions | |
Screen | ClosestScreen (Vector position) |
Gets the Screen closest to the specified position. | |
Screen | ClosestScreenHit (Pointable pointable) |
Gets the closest Screen intercepting a ray projecting from the specified Pointable object. | |
Screen | ClosestScreenHit (Vector position, Vector direction) |
Gets the closest Screen intercepting a ray projecting from the specified position in the specified direction. | |
ScreenList () | |
Constructs an empty list of screens. | |
Properties | |
int | Count [get] |
Returns the number of screens in this list. | |
bool | Empty [get] |
Deprecated. | |
bool | IsEmpty [get] |
Reports whether the list is empty. | |
The ScreenList class represents a list of Screen objects.
The list always contains at least one entry representing the default screen. If the user has not registered the location of this default screen, then the coordinates, directions, and other values reported by the functions in its Screen object will not be accurate. Other monitor screens only appear in the list if their positions have been registered using the Leap Motion Screen Locator.
Get a ScreenList object by calling Controller::locatedScreens().
|
inline |
Constructs an empty list of screens.
Gets the Screen closest to the specified position.
The specified position is projected along each screen's normal vector onto the screen's plane. The screen whose projected point is closest to the specified position is returned. Call Screen::project(position) on the returned Screen object to find the projected point.
position | The position from which to check for screen projection. |
Gets the closest Screen intercepting a ray projecting from the specified Pointable object.
The projected ray emanates from the Pointable tipPosition along the Pointable's direction vector. If the projected ray does not intersect any screen surface directly, then the Leap Motion software checks for intersection with the planes extending from the surfaces of the known screens and returns the Screen with the closest intersection.
If no intersections are found (i.e. the ray is directed parallel to or away from all known screens), then an invalid Screen object is returned.
Note: Be sure to test whether the Screen object returned by this method is valid. Attempting to use an invalid Screen object will lead to incorrect results.
pointable | The Pointable object to check for screen intersection. |
Gets the closest Screen intercepting a ray projecting from the specified position in the specified direction.
The projected ray emanates from the position along the direction vector. If the projected ray does not intersect any screen surface directly, then the Leap Motion software checks for intersection with the planes extending from the surfaces of the known screens and returns the Screen with the closest intersection.
If no intersections are found (i.e. the ray is directed parallel to or away from all known screens), then an invalid Screen object is returned.
Note: Be sure to test whether the Screen object returned by this method is valid. Attempting to use an invalid Screen object will lead to incorrect results.
position | The position from which to check for screen intersection. |
direction | The direction in which to check for screen intersection. |
|
get |
Returns the number of screens in this list.
|
get |
Deprecated.
Use ScreenList::isEmpty() instead.
|
get |
Reports whether the list is empty.