public class LeapMotion extends Service implements LeapDataListener, LeapDataPublisher, PointPublisher
Modifier and Type | Field and Description |
---|---|
LeapData |
lastLeapData |
static org.slf4j.Logger |
log |
cfgDir, dnaPool, MESSAGE_RECORDING_FORMAT_BINARY, MESSAGE_RECORDING_FORMAT_XML
Constructor and Description |
---|
LeapMotion(java.lang.String n) |
Modifier and Type | Method and Description |
---|---|
void |
activateDefaultMode() |
void |
activateVRMode() |
void |
addFrameListener(Service service) |
void |
addLeapDataListener(Service service) |
void |
addPointsListener(Service s) |
void |
checkPolicy() |
double |
getJointAngle(java.lang.String hand,
java.lang.Integer tip)
Return the angle of the finger for the hand specified This computes the
angle based on the dot product of the palmNormal and the fingerDirection
Theta = arccos( (V1.V2) / ( |V1| * |V2| )
|
float |
getLeftStrength() |
static ServiceType |
getMetaData()
This static method returns all the details of the class without it having
to be constructed.
|
float |
getRightStrength() |
static void |
main(java.lang.String[] args) |
LeapData |
onLeapData(LeapData data) |
com.leapmotion.leap.Controller |
publishConnect(com.leapmotion.leap.Controller controller) |
com.leapmotion.leap.Controller |
publishDisconnect(com.leapmotion.leap.Controller controller) |
com.leapmotion.leap.Controller |
publishExit(com.leapmotion.leap.Controller controller) |
com.leapmotion.leap.Frame |
publishFrame(com.leapmotion.leap.Frame frame) |
com.leapmotion.leap.Controller |
publishInit(com.leapmotion.leap.Controller controller) |
LeapData |
publishLeapData(LeapData data) |
java.util.List<Point> |
publishPoints(java.util.List<Point> points) |
void |
startService() |
void |
startTracking() |
void |
stopTracking() |
addListener, addListener, addTask, addTask, addTask, addTaskOneShot, allowDisplay, allowDisplay, attach, attach, broadcastState, buildDna, buildDna, buildDnaKeys, buildDnaNames, clearLastError, close, containsTask, copyShallowFrom, createPeer, createPeer, createRootReserved, detach, detach, detach, echoHeartbeat, error, error, error, getAttached, getCfgDir, getComm, getDeclaredMethodNames, getDeclaredMethods, getDescription, getDna, getDnaString, getHostName, getInbox, getInstanceId, getIntanceName, getInterfaceSet, getLastError, getMessageSet, getMetaData, getMethodMap, getMethodNames, getMethods, getMethodToolTip, getMsg, getName, getNotifyList, getNotifyListKeySet, getOutbox, getPeerKey, getPeerName, getServiceResourceFile, getSimpleName, getTasks, getThisThread, getType, hasError, hasPeers, help, help, in, info, info, invoke, invoke, invoke, invokeOn, isAttached, isAttached, isLocal, isReady, isRunning, isRuntime, isVirtual, load, load, logTimeEnable, mergeDna, mergeDna, mergePeerDna, movePeerDna, out, out, preProcessHook, preRoutingHook, publishError, publishQueueStats, publishState, publishStats, publishStatus, purgeTask, purgeTasks, releasePeers, releaseService, removeAllListeners, removeListener, requiresSecurity, reserve, reserve, reserveRoot, reserveRoot, reserveRootAs, run, save, save, save, send, send, send, send, sendBlocking, sendBlocking, sendBlocking, sendBlocking, sendPeer, setInstanceId, setName, setPeer, setSecurityProvider, setState, setThisThread, setVirtual, sleep, stackToString, startHeartbeat, startPeer, startPeer, startRecording, stopHeartbeat, stopMsgRecording, stopService, subscribe, subscribe, subscribe, toString, unsubscribe, unsubscribe, unsubscribe, updateStats, warn, warn
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
getName
getName
public static final org.slf4j.Logger log
public LeapData lastLeapData
public void activateDefaultMode()
public void activateVRMode()
public void addFrameListener(Service service)
public void addLeapDataListener(Service service)
public void checkPolicy()
public double getJointAngle(java.lang.String hand, java.lang.Integer tip)
hand
- - "left" or "right"tip
- - 0 (thumb) / 1 (index) .. etc..public float getLeftStrength()
public float getRightStrength()
public LeapData onLeapData(LeapData data)
onLeapData
in interface LeapDataListener
public com.leapmotion.leap.Controller publishConnect(com.leapmotion.leap.Controller controller)
public com.leapmotion.leap.Controller publishDisconnect(com.leapmotion.leap.Controller controller)
public com.leapmotion.leap.Controller publishExit(com.leapmotion.leap.Controller controller)
public com.leapmotion.leap.Frame publishFrame(com.leapmotion.leap.Frame frame)
public com.leapmotion.leap.Controller publishInit(com.leapmotion.leap.Controller controller)
public LeapData publishLeapData(LeapData data)
publishLeapData
in interface LeapDataPublisher
public void startService()
startService
in interface ServiceInterface
startService
in class Service
public void startTracking()
public void stopTracking()
public static void main(java.lang.String[] args)
public java.util.List<Point> publishPoints(java.util.List<Point> points)
publishPoints
in interface PointPublisher
public void addPointsListener(Service s)
public static ServiceType getMetaData()