Commit Graph

87 Commits

Author SHA1 Message Date
bjorn 0e4c42c8b0 Add pinch axis; 2020-02-13 15:08:58 -08:00
bjorn 71e63ddac2 openvr: add curl/splay axes for finger devices; 2020-02-13 15:08:58 -08:00
bjorn d448bdc95c Finger devices/axes; OpenVR finger poses; 2020-02-13 15:08:58 -08:00
bjorn 7edb562732 Add lovr.headset.getTime;
Unlike lovr.timer.getTime, this is the predicted time at which the
current frame will be displayed.  It can be used in place of
lovr.timer.getTime for smoother animations.  It's unclear if this
could be used for a suitable replacement for dt though.
2020-02-09 11:26:23 -08:00
bjorn f89998b21f Add eye/left and eye/right devices;
Currently nobody returns data for them, though headset drivers could
start to provide poses estimated from the head pose and IPD info.

This also makes it easier to integrate eye tracking later.
2020-01-29 17:53:03 -08:00
bjorn 0aa724116e Headset views;
- lovr.headset.getViewCount
- lovr.headset.getViewPose
- lovr.headset.getViewAngles
2020-01-27 22:11:58 -08:00
bjorn 7ca23bc58a lovr.headset.getDisplayFrequency; 2020-01-24 23:06:30 -08:00
bjorn 4f7bb9e53e lovr.headset.wasPressed; lovr.headset.wasReleased; 2020-01-24 22:48:36 -08:00
bjorn 4c1917f6ce Fix some prototypes; 2020-01-23 10:55:46 -08:00
bjorn f82bcb703b Finalize skeletal input API; 2019-09-18 16:12:08 -07:00
bjorn 305596adf8 Fix windows build;
LOVR_EXPORT needs to be on the declaration, unfortunately.
2019-08-26 15:53:10 -07:00
bjorn 28344928c9 Simplify arr; 2019-08-21 23:16:58 -07:00
bjorn 8d4760167f luax is now api; 2019-08-21 15:27:26 -07:00
bjorn a1cc3fb838 rm lovr.headset.getDisplayTime;
It is not useful in its current state, but will be useful later.
2019-08-09 00:01:08 -07:00
bjorn 38671d4ca9 Fix warning; 2019-08-01 13:01:41 -07:00
bjorn 7690db28af Windows: Fix all the int warnings; 2019-07-31 17:51:49 -07:00
bjorn 78f2060405 rm lovr.headset.getAcceleration, getAngularAcceleration;
Because OpenXR did...
2019-07-30 20:22:08 -07:00
bjorn 9712f4765c lovr.headset.hands is CURSED; 2019-07-30 20:17:38 -07:00
bjorn 2b19c64aca rm primary DeviceButton and DeviceAxis;
It is confusing and doesn't really solve the intended problem very well.

For now we will all just suffer with our tedious device-specific Lua code.
2019-07-17 17:33:21 -07:00
bjorn c92c0ef3c5 lovr.headset.isTracked; 2019-07-17 17:09:45 -07:00
bjorn 416f28990a Tracking functions return 0 instead of nil; rm lovr.headset.getDirection; 2019-07-17 17:07:33 -07:00
bjorn e82ba030a6 lovr.headset.getDisplayTime;
Returns the predicted display time, which is the estimated time at which
the photons of the next frame will hit the eyeballs of a person in the HMD.

This should be used instead of lovr.timer.getTime when used for rendering
something that is time-dependent.  Updating simulations, logic, or access
to high frequency times should still use lovr.timer.getTime.
2019-06-29 17:36:36 -07:00
bjorn d87fc56b63 lovr.headset.getDisplayMask; 2019-06-28 00:13:45 -07:00
bjorn eb1e257209 Add new array implementation; Upgrade filesystem;
Filesystem:

- Uses streaming file IO.
- Uses less memory when requiring files.
- Simplifies its require path implementation.
2019-06-16 13:30:30 -07:00
bjorn 2f3c23ed7e Ensure getHands uses 4-element vec3; 2019-06-14 13:04:10 -07:00
bjorn 06c6b172de vec3 has 4 elements; 2019-06-03 07:20:03 -07:00
Bjorn Swenson 68c1b6a201
Merge pull request #122 from bjornbytes/hand-updates
Hand updates
2019-06-03 00:14:45 -07:00
bjorn 22fe333150 Update refcounting (again);
- Ref struct only stores refcount now and is more general.
- Proxy stores a hash of its type name instead of an enum.
- Variants store additional information instead of using a vtable.
- Remove the concept of superclasses from the API.
- Clean up some miscellaneous includes.
2019-06-02 01:02:26 -07:00
bjorn 84bd50379d Add primary button/axis;
It's called "primary".
2019-05-31 12:00:15 -07:00
bjorn 7ac3d6938b rm TRACKER devices for now;
This is not the correct way to expose them.  It doesn't seem like
there is consensus on how to expose them yet.  At the very least
LÖVR should instead use the hardcoded OpenVR tracker paths like
/camera, /keyboard, /foot/left, /foot/right, etc.

See these issues:

- https://github.com/ValveSoftware/openvr/issues/1030
- https://github.com/ValveSoftware/openvr/issues/962
2019-05-31 10:57:29 -07:00
bjorn 9674276ff7 Add lovr.headset.getHands;
The iterator is nice and concise, but a table is more conventional
and allows you to easily retrieve the number of tracked hands.  The
iterator version may be removed in favor of the table version, since
you can always iterate over a table yourself.
2019-05-31 10:52:31 -07:00
bjorn af0678f9e9 rm DEVICE_HAND;
If we expose both unhanded hands and handed hands, people need to
deal with handling (haha) both cases in their apps.  It's simpler
to always deal with left and right hands, even though it is a bit
less general.  Still, this is congruent with the current state of
OpenVR and OpenXR, and I think there are still open questions about
the more uncommon cases where there are more than two hands.
2019-05-31 10:41:40 -07:00
bjorn 9b6f7c35b4 Fix lovr.headset.isTouched; 2019-05-24 15:14:20 -07:00
bjorn 3dc4d06285 Fix eye enum; 2019-05-22 14:37:46 -07:00
bjorn 4cc154fdfa More number conversions; 2019-05-20 20:35:07 -07:00
bjorn 7645f4c014 Add core folder; 2019-05-20 02:47:33 -07:00
bjorn 4a47afca38 Organize api folder; 2019-05-19 00:31:42 -07:00
Renamed from src/api/headset.c (Browse further)