Tanoda
|
The LeapXRServiceProvider expands on the standard LeapServiceProvider to account for the offset of the Leap device with respect to the attached HMD and warp tracked hand positions based on the motion of the headset to account for the differing latencies of the two tracking systems. More...
Public Types | |
enum | DeviceOffsetMode { Default , ManualHeadOffset , Transform } |
enum | TemporalWarpingMode { Auto , Manual , Images , Off } |
![]() | |
enum | InteractionVolumeVisualization { None , LeapMotionController , StereoIR170 , Automatic } |
enum | FrameOptimizationMode { None , ReuseUpdateForPhysics , ReusePhysicsForUpdate } |
enum | PhysicsExtrapolationMode { None , Auto , Manual } |
enum | TrackingOptimizationMode { Desktop , ScreenTop , HMD } |
Public Attributes | |
long | imageTimeStamp = 0 |
![]() | |
TestHandPose | editTimePose = TestHandPose.HeadMountedA |
Protected Member Functions | |
override void | Reset () |
virtual void | OnEnable () |
virtual void | OnDisable () |
override void | Start () |
override void | Update () |
virtual void | onPreCull (Camera preCullingCamera) |
override long | CalculateInterpolationTime (bool endOfFrame=false) |
override void | initializeFlags () |
Initializes the Leap Motion policy flags. The POLICY_OPTIMIZE_HMD flag improves tracking for head-mounted devices. More... | |
override void | transformFrame (Frame source, Frame dest) |
void | resetShaderTransforms () |
Resets shader globals for the Hand transforms. More... | |
virtual LeapTransform | GetWarpedMatrix (long timestamp, bool updateTemporalCompensation=true) |
void | transformHands (ref LeapTransform LeftHand, ref LeapTransform RightHand) |
void | OnPreCullHandTransforms (Camera camera) |
![]() | |
virtual void | Reset () |
virtual void | Awake () |
virtual void | Start () |
virtual void | Update () |
virtual void | FixedUpdate () |
virtual void | OnDestroy () |
virtual void | OnApplicationPause (bool isPaused) |
virtual void | OnApplicationQuit () |
virtual long | CalculateInterpolationTime (bool endOfFrame=false) |
virtual void | initializeFlags () |
Initializes Leap Motion policy flags. More... | |
void | createController () |
Creates an instance of a Controller, initializing its policy flags and subscribing to its connection event. More... | |
void | destroyController () |
Stops the connection for the existing instance of a Controller, clearing old policy flags and resetting the Controller to null. More... | |
bool | checkConnectionIntegrity () |
Checks whether this provider is connected to a service; If it is not, attempt to reconnect at regular intervals for MAX_RECONNECTION_ATTEMPTS More... | |
void | onHandControllerConnect (object sender, LeapEventArgs args) |
virtual void | transformFrame (Frame source, Frame dest) |
![]() | |
void | DispatchUpdateFrameEvent (Frame frame) |
void | DispatchFixedFrameEvent (Frame frame) |
Properties | |
DeviceOffsetMode | deviceOffsetMode [get, set] |
float | deviceOffsetYAxis [get, set] |
float | deviceOffsetZAxis [get, set] |
float | deviceTiltXAxis [get, set] |
Transform | deviceOrigin [get, set] |
Camera | preCullCamera [get, set] |
int | warpingAdjustment [get, set] |
bool | updateHandInPrecull [get, set] |
![]() | |
InteractionVolumeVisualization | SelectedInteractionVolumeVisualization [get] |
Action< Device > | OnDeviceSafe |
A utility event to get a callback whenever a new device is connected to the service. This callback will ALSO trigger a callback upon subscription if a device is already connected. More... | |
override Frame | CurrentFrame [get] |
override Frame | CurrentFixedFrame [get] |
![]() | |
abstract Frame | CurrentFrame [get] |
The current frame for this update cycle, in world space. More... | |
abstract Frame | CurrentFixedFrame [get] |
The current frame for this fixed update cycle, in world space. More... | |
Additional Inherited Members | |
![]() | |
float | CalculatePhysicsExtrapolation () |
Controller | GetLeapController () |
Returns the Leap Controller instance. More... | |
bool | IsConnected () |
Returns true if the Leap Motion hardware is plugged in and this application is connected to the Leap Motion service. More... | |
void | RetransformFrames () |
Retransforms hand data from Leap space to the space of the Unity transform. This is only necessary if you're moving the LeapServiceProvider around in a custom script and trying to access Hand data from it directly afterward. More... | |
void | CopySettingsToLeapXRServiceProvider (LeapXRServiceProvider leapXRServiceProvider) |
Copies property settings from this LeapServiceProvider to the target LeapXRServiceProvider where applicable. Does not modify any XR-specific settings that only exist on the LeapXRServiceProvider. More... | |
![]() | |
const double | NS_TO_S = 1e-6 |
Converts nanoseconds to seconds. More... | |
const double | S_TO_NS = 1e6 |
Converts seconds to nanoseconds. More... | |
const string | HAND_ARRAY_GLOBAL_NAME = "_LeapHandTransforms" |
The transform array used for late-latching. More... | |
const int | MAX_RECONNECTION_ATTEMPTS = 5 |
The maximum number of times the provider will attempt to reconnect to the service before giving up. More... | |
const int | RECONNECTION_INTERVAL = 180 |
The number of frames to wait between each reconnection attempt. More... | |
![]() | |
Action< Frame > | OnUpdateFrame |
Action< Frame > | OnFixedFrame |
Action< Frame > | OnPostUpdateFrame |
The LeapXRServiceProvider expands on the standard LeapServiceProvider to account for the offset of the Leap device with respect to the attached HMD and warp tracked hand positions based on the motion of the headset to account for the differing latencies of the two tracking systems.
Definition at line 25 of file LeapXRServiceProvider.cs.
Enumerator | |
---|---|
Default | |
ManualHeadOffset | |
Transform |
Definition at line 35 of file LeapXRServiceProvider.cs.
Enumerator | |
---|---|
Auto | |
Manual | |
Images | |
Off |
Definition at line 120 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.LeapServiceProvider.
Definition at line 390 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Definition at line 438 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Initializes the Leap Motion policy flags. The POLICY_OPTIMIZE_HMD flag improves tracking for head-mounted devices.
Reimplemented from Leap.Unity.LeapServiceProvider.
Definition at line 410 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Definition at line 257 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Definition at line 230 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Definition at line 345 of file LeapXRServiceProvider.cs.
|
protected |
Definition at line 526 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.LeapServiceProvider.
Definition at line 208 of file LeapXRServiceProvider.cs.
|
protected |
Resets shader globals for the Hand transforms.
Definition at line 432 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.LeapServiceProvider.
Definition at line 271 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.LeapServiceProvider.
Definition at line 420 of file LeapXRServiceProvider.cs.
|
protected |
Definition at line 518 of file LeapXRServiceProvider.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.LeapServiceProvider.
Definition at line 286 of file LeapXRServiceProvider.cs.
|
protected |
Definition at line 188 of file LeapXRServiceProvider.cs.
|
protected |
Definition at line 171 of file LeapXRServiceProvider.cs.
long Leap.Unity.LeapXRServiceProvider.imageTimeStamp = 0 |
Definition at line 202 of file LeapXRServiceProvider.cs.
|
protected |
Definition at line 185 of file LeapXRServiceProvider.cs.
|
protected |
Definition at line 184 of file LeapXRServiceProvider.cs.
|
protected |
Definition at line 186 of file LeapXRServiceProvider.cs.
|
protected |
Definition at line 187 of file LeapXRServiceProvider.cs.
|
getset |
Definition at line 47 of file LeapXRServiceProvider.cs.
|
getset |
Definition at line 65 of file LeapXRServiceProvider.cs.
|
getset |
Definition at line 76 of file LeapXRServiceProvider.cs.
|
getset |
Definition at line 95 of file LeapXRServiceProvider.cs.
|
getset |
Definition at line 86 of file LeapXRServiceProvider.cs.
|
getset |
Definition at line 105 of file LeapXRServiceProvider.cs.
|
getset |
Definition at line 172 of file LeapXRServiceProvider.cs.
|
getset |
Definition at line 147 of file LeapXRServiceProvider.cs.