Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Feature - Hand Controllers + Simulation - CORE #216

Merged
merged 453 commits into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
453 commits
Select commit Hold shift + click to select a range
26ee5d8
Update profile platform utility
FejZa Dec 3, 2019
0f720c5
Add and implement TryGetBounds(...) for hand controllers
FejZa Dec 3, 2019
787b004
Merge branch 'development' into feature/hand-tracking
StephenHodgson Dec 3, 2019
faf2df0
Update submodule
FejZa Dec 3, 2019
faf0d6a
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Dec 3, 2019
8ab2cb0
Move hand visualizers to SDK
FejZa Dec 4, 2019
de95c6a
Remove mesh and joint visualizer setting
FejZa Dec 4, 2019
2409a9d
Update SDK submodule
FejZa Dec 4, 2019
fabd70f
Merge remote-tracking branch 'origin/development' into feature/hand-t…
FejZa Dec 14, 2019
d0d5fad
Merge branch 'development' into feature/hand-tracking
StephenHodgson Dec 15, 2019
48b659e
Merge branch 'development' into feature/hand-tracking
FejZa Dec 19, 2019
39ebcea
Resolve merge issue
FejZa Dec 19, 2019
841d4f7
Update inspector namespace
FejZa Dec 19, 2019
767104a
Merge branch 'development' into feature/hand-tracking
FejZa Dec 23, 2019
27ef171
Fix simulation created asset path and name
FejZa Dec 23, 2019
bacf043
Fix UpdateController() not in basecontroleller interface
FejZa Dec 26, 2019
77923cd
Base hand data provider cleanup
FejZa Dec 26, 2019
8849e57
Remove all occurences of default hand controller
FejZa Dec 27, 2019
06800ad
Merge branch 'development' into feature/hand-tracking
StephenHodgson Dec 27, 2019
d0b6e14
Moving state update to hand controller
FejZa Dec 27, 2019
4b89d8f
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Dec 27, 2019
b0c2289
Pipe hand data update though input system
FejZa Dec 27, 2019
cd5bf58
Merge branch 'development' into feature/hand-tracking
StephenHodgson Dec 28, 2019
9d59e33
Fix namespaces and assign asset icons
FejZa Dec 29, 2019
cf52e20
Merge branch 'development' into feature/hand-tracking
StephenHodgson Dec 30, 2019
321826e
Merge branch 'development' into feature/hand-tracking
FejZa Jan 1, 2020
1044723
Merge branch 'development' into feature/hand-tracking
StephenHodgson Jan 2, 2020
0398b67
Merge branch 'development' into feature/hand-tracking
SimonDarksideJ Jan 2, 2020
38c7a2b
Remove obsolete hand specific visualization profile
FejZa Jan 2, 2020
8075111
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Jan 2, 2020
fa6961d
Update submodules
FejZa Jan 3, 2020
0b8cde1
Remove IMixedRealityHandControllerDataProvider since obsolete
FejZa Jan 5, 2020
794b8e9
Separate simulation and hands
FejZa Jan 5, 2020
a78c3cd
Remove SimulationInput (using MixedRealityPose instead)
FejZa Jan 5, 2020
e00f1c4
Add simulated controller type setting
FejZa Jan 5, 2020
0894dfe
Update SDK checkout
FejZa Jan 5, 2020
b9bb7ae
Cleanup simulated dp
FejZa Jan 5, 2020
9961ab4
Undo newline file changes
FejZa Jan 5, 2020
d536c04
Update submoduules
FejZa Jan 7, 2020
3c657b0
Merge branch 'development' into feature/hand-tracking
FejZa Jan 7, 2020
2cd8c26
Remove profile property from data provider and expose settings as pro…
FejZa Jan 7, 2020
c76d725
Merge SimulatedHandControllerState into SimulatedHandController
FejZa Jan 7, 2020
b13a3d3
Move constructors to top
FejZa Jan 7, 2020
e3880dd
Rename HandUtils to HandUtilities
FejZa Jan 7, 2020
77a8451
Remove HandRay class (returning in separate PR)
FejZa Jan 7, 2020
c2a8444
Cleanup utils and make extensions
FejZa Jan 7, 2020
0dba511
Some more extnsion conversions
FejZa Jan 7, 2020
c55d613
Remove not needed setter
FejZa Jan 7, 2020
0597018
Remove dead event definition
FejZa Jan 7, 2020
5245b4d
Remove setters in hand data snapshot
FejZa Jan 7, 2020
0696ea7
Add setter to hand data mesh property
FejZa Jan 7, 2020
af1aea0
Remove cached camera rerefence
FejZa Jan 7, 2020
aa1ac93
Update SDK
FejZa Jan 7, 2020
8bfab24
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 7, 2020
6fa47b5
Add hand mesh data constructors
FejZa Jan 7, 2020
b5cf6d7
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 7, 2020
68be101
Update Oculus submodule
FejZa Jan 7, 2020
09922b3
Revert some meta files not related to hands changes
FejZa Jan 8, 2020
ed73155
Revert not related change
FejZa Jan 9, 2020
35d4ba8
Remove simulated controller controls from profile
FejZa Jan 9, 2020
042ae6b
Update interactions in base
FejZa Jan 9, 2020
9c27d28
Use interaction mapping for movement
FejZa Jan 9, 2020
52643ae
Reset editor window options
FejZa Jan 9, 2020
4a2ea89
remove hand joitn pose dictionary
FejZa Jan 9, 2020
7f3e1d4
Update SDK checkout
FejZa Jan 9, 2020
1f07f9c
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 9, 2020
cdd724d
Merge branch 'development' into feature/hand-tracking
StephenHodgson Jan 9, 2020
3421c05
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 10, 2020
e653b8a
Merge branch 'development' into feature/hand-tracking
FejZa Jan 12, 2020
3543b92
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 12, 2020
35bf713
Pull update controller
FejZa Jan 12, 2020
eb65497
Update submodules
FejZa Jan 12, 2020
d066cb0
Remove redundant joint count definition
FejZa Jan 12, 2020
6bb7c00
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 12, 2020
9d351ca
Fix broken JointCount references
FejZa Jan 12, 2020
4ef0690
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 12, 2020
4e2982f
Minor BaseHandController cleanup
FejZa Jan 12, 2020
d609597
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 12, 2020
2ca8e99
Fix copy paste error in windows api checker
FejZa Jan 15, 2020
cdee03e
Merge branch 'fix/windows-api-checker' into feature/hand-tracking-addons
FejZa Jan 15, 2020
e835dd9
Update submodules
FejZa Jan 15, 2020
c7116dd
Merge branch 'development' into feature/hand-tracking
StephenHodgson Jan 16, 2020
a7b6345
Fix missing UpdateController definition issue
FejZa Jan 21, 2020
9cf1be4
Fix controller list management
FejZa Jan 21, 2020
3722c0e
Merge branch 'development' into feature/hand-tracking
FejZa Jan 21, 2020
b7e7ab9
Merge branch 'development' into feature/hand-tracking
StephenHodgson Jan 22, 2020
7dc365d
Update submodules
FejZa Jan 22, 2020
ee28ea2
Update SDK checkout
FejZa Jan 22, 2020
847b9ff
Update SDK checkout
FejZa Jan 22, 2020
0b2165f
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 23, 2020
d9e2dc4
Merge branch 'development' into feature/hand-tracking-addons
FejZa Jan 23, 2020
1432ade
Merge branch 'development' into feature/hand-tracking
FejZa Jan 23, 2020
95e8f5c
Merge branch 'feature/hand-tracking' into feature/hand-tracking-addons
FejZa Jan 23, 2020
4b982da
Update SDK
FejZa Jan 23, 2020
3af819e
Define agnostic hand controller update
FejZa Jan 23, 2020
6b52e3c
Fix namespaces and create mr hand controller mapping profile
FejZa Jan 23, 2020
c41c822
Fix texture path for hand mapping profile
FejZa Jan 23, 2020
754377a
Update SDK checkout
FejZa Jan 23, 2020
1c5781e
Update WMR checkout
FejZa Jan 23, 2020
237099c
Update submodules
FejZa Jan 24, 2020
77035cc
Update submodules
FejZa Jan 24, 2020
37ad107
Update submodules
FejZa Jan 24, 2020
996c781
Upate simulated hand controller implementation to new interface
FejZa Jan 25, 2020
34b0f0d
Make joint poses private
FejZa Jan 26, 2020
4e03faa
Add comment for simulation specifc update
FejZa Jan 26, 2020
0441860
Update submodules
FejZa Jan 26, 2020
f3feb86
Update sdk checkout
FejZa Jan 26, 2020
d4c27cf
Update submodules
FejZa Jan 26, 2020
15bf881
Move interaction updates to base hand
FejZa Jan 26, 2020
82abcc2
Remove default interactions defintions
FejZa Jan 26, 2020
98dcdea
Cleanup using
FejZa Jan 27, 2020
0bbdf35
Merge branch 'development' into feature/hand-tracking
StephenHodgson Jan 28, 2020
fa7cde7
Merge branch 'development' into feature/hand-tracking
StephenHodgson Jan 29, 2020
6499811
Merge branch 'development' into feature/hand-tracking
FejZa Jan 30, 2020
78ea06b
Update SDK checkout
FejZa Feb 3, 2020
e6678e6
Remove hand triangles shader
FejZa Feb 3, 2020
a9a2e5a
Update submodules
FejZa Feb 3, 2020
380dffa
Update SDK checkout
FejZa Feb 3, 2020
1ec2ea6
Merge branch 'development' into feature/hand-tracking
StephenHodgson Feb 8, 2020
82b4637
Implement Gizmo utlity to draw wire capsule
FejZa Feb 11, 2020
a1b44a8
Update SDK
FejZa Feb 11, 2020
89cbae0
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Feb 11, 2020
d6e619d
Merge branch 'development' of https://github.com/XRTK/XRTK-Core into …
FejZa Feb 11, 2020
39556f1
Implement GetOrAddComponent extension
FejZa Feb 11, 2020
e36252e
Implement bounds calculation for each TrackedHandBounds type
FejZa Feb 12, 2020
0790f95
Update SDK checkout
FejZa Feb 12, 2020
4d36284
Update SDK
FejZa Feb 14, 2020
f8f426e
Merge branch 'development' of https://github.com/XRTK/XRTK-Core into …
FejZa Feb 14, 2020
a77b44b
Introduce shared hand profile configuraiton
FejZa Feb 15, 2020
51b06b5
Introduce base hand controller data provide to consume shared profile
FejZa Feb 15, 2020
cd720c9
Update simulation to make use of new shared hand data provider settings
FejZa Feb 15, 2020
f06af83
Add label to Simulation specific in inspector
FejZa Feb 15, 2020
a883f76
Update submodules
FejZa Feb 15, 2020
18b300e
Update Oculus checkout
FejZa Feb 15, 2020
8f09d29
Introduce HandMeshingEnabled profile setting
FejZa Feb 15, 2020
f1a67c4
Raise input source events in base hand controller
FejZa Feb 15, 2020
683ad35
Update SDK
FejZa Feb 15, 2020
dafcca4
Merge branch 'development' into feature/hand-tracking
StephenHodgson Feb 18, 2020
27903d9
Merge branch 'development' into feature/hand-tracking
FejZa Feb 18, 2020
642db5c
Delete now redundant GizmoUtility
FejZa Feb 18, 2020
dd307c8
Introduce "Hand Tracking System Profile"
FejZa Feb 18, 2020
1bca455
Implement hand ray configuration
FejZa Feb 25, 2020
199d4c5
Update SDK
FejZa Feb 25, 2020
b2e57ec
Update SDK
FejZa Feb 25, 2020
e14f519
Update SDK
FejZa Feb 26, 2020
620f4c8
Merge branch 'development' into feature/hand-tracking
StephenHodgson Mar 14, 2020
baf5c54
Merge branch 'development' of https://github.com/XRTK/XRTK-Core into …
FejZa Mar 17, 2020
e70a5d6
Update SDK and Oculus checkouts
FejZa Mar 17, 2020
978bc71
Update Lumin / Oculus checkout
FejZa Mar 17, 2020
4b46e9e
Merge branch 'development' into feature/hand-tracking
StephenHodgson Mar 20, 2020
c37fa4c
Update SDK
FejZa Mar 21, 2020
c7daeea
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Mar 21, 2020
56be152
Remove SimulatedHandController button mappings from BaseHandController
FejZa Mar 24, 2020
a273486
Update simulation input actions in shc
FejZa Mar 27, 2020
480c843
Merge branch 'development' into feature/hand-tracking
StephenHodgson Mar 30, 2020
42f03be
Hand Tracking change requests (#476)
StephenHodgson Mar 30, 2020
40bd43a
Update submodule checkouts
FejZa Mar 30, 2020
f39205e
Merge branch 'development' into feature/hand-tracking
StephenHodgson Mar 30, 2020
f69591a
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Mar 30, 2020
5472a03
Refactor simulation data provider relationship
FejZa Mar 30, 2020
3e516f6
Update SDK checkout
FejZa Mar 30, 2020
43e6681
updated simulated hand data profile with required fields for IMixedRe…
StephenHodgson Mar 30, 2020
a4a84bd
removed ignored meta file
StephenHodgson Mar 31, 2020
b16c68f
Merge branch 'development' into feature/hand-tracking
StephenHodgson Mar 31, 2020
6abbec8
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 1, 2020
7e55d4a
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 1, 2020
5ea0fd4
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 1, 2020
b25f5d3
Fixed merge issues
StephenHodgson Apr 1, 2020
4df9e02
Update copyright headers
FejZa Apr 2, 2020
96f4666
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Apr 2, 2020
4ce1374
Update checkouts
FejZa Apr 2, 2020
1ea3625
Return of the global hand tracking profile
FejZa Apr 2, 2020
f4ccfd2
Update SDK
FejZa Apr 2, 2020
92dc29e
Fix hands not showing up issue
FejZa Apr 2, 2020
70c1c4b
Simplify ISimulatedHandControllerDataProvider retrieval
FejZa Apr 2, 2020
7556683
Remove BaseMixedRealityHandDataProviderProfile
FejZa Apr 2, 2020
f99982c
Remove BaseHandControllerDataProvider
FejZa Apr 2, 2020
227dace
Add hand settings overrides to simulation profile
FejZa Apr 2, 2020
ab8275a
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 3, 2020
30b4694
bumped minor version
StephenHodgson Apr 4, 2020
d7eb185
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 4, 2020
657ad48
cleaned up base hand controller (#496)
StephenHodgson Apr 4, 2020
52b0322
Add docs to explaoin what OnInspectorAdditionalGUI does in simulation
FejZa Apr 4, 2020
97f503b
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Apr 4, 2020
c26722f
Update submodules
FejZa Apr 4, 2020
1a4d94c
updated oculus
StephenHodgson Apr 4, 2020
d467f0a
Update submodule
FejZa Apr 4, 2020
7e61a74
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Apr 4, 2020
0cd4f5f
Remove hand ray type setting
FejZa Apr 4, 2020
663f423
Change requests/cleanup definitions (#497)
StephenHodgson Apr 4, 2020
55b7e8b
updated submodules
StephenHodgson Apr 4, 2020
e1c65ad
Added BaseHandDatProvider and BaseHandDataProviderProfile
StephenHodgson Apr 4, 2020
d2c1b41
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 5, 2020
ecace32
Add controller pose field to base hand
FejZa Apr 5, 2020
4e7c431
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Apr 5, 2020
0043394
Fix simulation
FejZa Apr 5, 2020
e6c6154
Fix naming
FejZa Apr 5, 2020
3a09982
Fix UWP running in editor when not configured to
FejZa Apr 5, 2020
2e27f54
Update submodules
FejZa Apr 5, 2020
763850d
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 5, 2020
dcfd05d
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 5, 2020
85f82fe
moved constructor and changed access modifier for the constructor
StephenHodgson Apr 5, 2020
49b669c
updated sdk checkout
StephenHodgson Apr 5, 2020
73628d6
moved numerics extension and updated wmr checkout
StephenHodgson Apr 5, 2020
8fff5ba
updated wmr checkout
StephenHodgson Apr 5, 2020
16e6655
updated wmr checkout
StephenHodgson Apr 5, 2020
df78701
updated Lumin checkout
StephenHodgson Apr 5, 2020
1b11260
updated Lumin checkout
StephenHodgson Apr 5, 2020
8253b5f
fixed hand data provider inspectors
StephenHodgson Apr 5, 2020
da108ab
Update Lumin,SDK
FejZa Apr 5, 2020
db91739
Update Lumin
FejZa Apr 5, 2020
2198689
updated sdk checkout
StephenHodgson Apr 5, 2020
78be712
Fix platform checks for iOS, Android and WebGL
FejZa Apr 5, 2020
8258d05
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Apr 5, 2020
9c46c99
apply global override if different from platform setting
StephenHodgson Apr 5, 2020
60a2d68
updated lumin SDK
StephenHodgson Apr 5, 2020
d1f56c4
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 5, 2020
27ce4ce
updated lumin checkout
StephenHodgson Apr 5, 2020
d9bd76f
updated oculus checkout
StephenHodgson Apr 5, 2020
af93b2a
Update submodules
FejZa Apr 5, 2020
228e5d5
updated lumin checkout
StephenHodgson Apr 5, 2020
4c44f0e
change-request/hand-tracking (#501)
StephenHodgson Apr 6, 2020
2af09d3
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 6, 2020
b93491c
Fix simulated hand controller instantiation
FejZa Apr 6, 2020
54012bc
Fix UseSourcePose fallback
FejZa Apr 6, 2020
c17a142
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Apr 6, 2020
4eedf5b
Update checkouts
FejZa Apr 6, 2020
fb7985a
Update SDK checkout
FejZa Apr 6, 2020
62712c4
Fix missing data provider parameter for Unity Joystick controller
FejZa Apr 6, 2020
700a739
Rename OpenVR Oculus Touch profile and inspector to avoid confusion
FejZa Apr 6, 2020
9540d8e
Update checkouts
FejZa Apr 6, 2020
67a04c9
Update WMR checkout
FejZa Apr 6, 2020
dd00c0e
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 6, 2020
c1652be
reverting Oculus Touch rename
StephenHodgson Apr 6, 2020
6e1b2ae
Revert visualizer.UseSourcePoseData change
FejZa Apr 6, 2020
b5ec0d1
updated sdk checkout
StephenHodgson Apr 6, 2020
3d04be3
Update SDK
FejZa Apr 6, 2020
8af0555
Merge branch 'feature/hand-tracking' of https://github.com/XRTK/XRTK-…
FejZa Apr 6, 2020
d0e4d88
misc formatting
StephenHodgson Apr 6, 2020
5c6cb62
fixed constructor arg exception
StephenHodgson Apr 6, 2020
95e321a
updated sdk checkout
StephenHodgson Apr 7, 2020
631f44a
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 7, 2020
b134b34
fixed merge conflict
StephenHodgson Apr 7, 2020
d1b68d7
fixed documentation
StephenHodgson Apr 7, 2020
a8dff96
updated simulated hand controller to use data provider reference
StephenHodgson Apr 7, 2020
366913c
Merge branch 'development' into feature/hand-tracking
StephenHodgson Apr 7, 2020
66cc469
Fix pose change raised twice per update
FejZa Apr 7, 2020
e4033c4
Fix some docs in visualization profile
FejZa Apr 7, 2020
0465e39
Update SDK submodule
FejZa Apr 7, 2020
62005be
updated submodules
StephenHodgson Apr 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Submodules/Lumin
Submodule Lumin updated from 1f6552 to 241477
2 changes: 1 addition & 1 deletion Submodules/Oculus
2 changes: 1 addition & 1 deletion Submodules/SDK
Submodule SDK updated from fbf1e7 to d4d125
2 changes: 1 addition & 1 deletion Submodules/WindowsMixedReality

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Copyright (c) XRTK. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine;

namespace XRTK.Definitions.Controllers.Hands
{
/// <summary>
/// Provides additional configuration options for hand data providers.
/// </summary>
public abstract class BaseHandControllerDataProviderProfile : BaseMixedRealityControllerDataProviderProfile
{
[Header("General Settings")]

[SerializeField]
[Tooltip("If set, hand mesh data will be read and available for visualization. Disable for optimized performance.")]
private bool handMeshingEnabled = false;

/// <summary>
/// If set, hand mesh data will be read and available for visualization. Disable for optimized performance.
/// </summary>
public bool HandMeshingEnabled => handMeshingEnabled;

[Header("Hand Physics")]

[SerializeField]
[Tooltip("If set, hands will be setup with colliders and a rigidbody to work with Unity's physics system.")]
private bool handPhysicsEnabled = false;

/// <summary>
/// If set, hands will be setup with colliders and a rigidbody to work with Unity's physics system.
/// </summary>
public bool HandPhysicsEnabled => handPhysicsEnabled;

[SerializeField]
[Tooltip("If set, hand colliders will be setup as triggers.")]
private bool useTriggers = false;

/// <summary>
/// If set, hand colliders will be setup as triggers.
/// </summary>
public bool UseTriggers => useTriggers;

[SerializeField]
[Tooltip("Set the bounds mode to use for calculating hand bounds.")]
private HandBoundsMode boundsMode = HandBoundsMode.Hand;

/// <summary>
/// Set the bounds mode to use for calculating hand bounds.
/// </summary>
public HandBoundsMode BoundsMode => boundsMode;
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) XRTK. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

namespace XRTK.Definitions.Controllers.Hands
{
/// <summary>
/// Available hand bounds modes.
/// </summary>
public enum HandBoundsMode
{
/// <summary>
/// Hand bounds mode will only calculate a single bounding
/// box encapsulating the whole hand.
/// </summary>
Hand,
/// <summary>
/// Fingers bounds mode will create precise bounds for each finger
/// and the palm to allow for more precise interactions.
/// </summary>
Fingers
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) XRTK. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using XRTK.Definitions.Utilities;

namespace XRTK.Definitions.Controllers.Hands
{
/// <summary>
/// Snapshot of hand data.
/// </summary>
[Serializable]
public class HandData
{
/// <summary>
/// Gets the total count of joints the hand data supports.
/// </summary>
public static readonly int JointCount = Enum.GetNames(typeof(TrackedHandJoint)).Length;

/// <summary>
/// Timestamp of hand data, as FileTime, e.g. <see cref="DateTime.UtcNow"/>
/// </summary>
public long TimeStamp { get; set; } = 0;

/// <summary>
/// Is the hand currently being tracked by the system?
/// </summary>
public bool IsTracked { get; set; } = false;

/// <summary>
/// Pose information for each hand joint.
/// </summary>
public MixedRealityPose[] Joints { get; } = new MixedRealityPose[JointCount];

/// <summary>
/// Mesh information of the hand.
/// </summary>
public HandMeshData Mesh { get; set; } = new HandMeshData();
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Copyright (c) XRTK. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine;

namespace XRTK.Definitions.Controllers.Hands
{
/// <summary>
/// Snapshot of hand mesh information.
/// </summary>
public struct HandMeshData
{
/// <summary>
/// Constructs a new hand mesh data snapshot.
/// </summary>
/// <param name="vertices"></param>
/// <param name="triangles"></param>
/// <param name="normals"></param>
/// <param name="uvs"></param>
/// <param name="position"></param>
/// <param name="rotation"></param>
public HandMeshData(Vector3[] vertices, int[] triangles, Vector3[] normals, Vector2[] uvs, Vector3 position, Quaternion rotation)
{
Vertices = vertices;
Triangles = triangles;
Normals = normals;
Uvs = uvs;
Position = position;
Rotation = rotation;
}

/// <summary>
/// The vertices of the hand mesh in the initial coordinate system.
/// </summary>
public Vector3[] Vertices { get; }

/// <summary>
/// Mesh triangle indices.
/// </summary>
public int[] Triangles { get; }

/// <summary>
/// Hand mesh normals, in initial coordinate system.
/// </summary>
public Vector3[] Normals { get; }

/// <summary>
/// UV mapping of the hand.
/// </summary>
public Vector2[] Uvs { get; }

/// <summary>
/// Translation to apply to mesh to go from initial coordinates to world coordinates.
/// </summary>
public Vector3 Position { get; }

/// <summary>
/// Rotation to apply to mesh to go from initial coordinates to world coordinates.
/// </summary>
public Quaternion Rotation { get; }

/// <summary>
/// Returns true, if the mesh data is empty.
/// </summary>
public bool Empty => Vertices == null || Vertices.Length == 0;
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) XRTK. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine;
using XRTK.Definitions.Devices;
using XRTK.Definitions.Utilities;
using XRTK.Providers.Controllers;
using XRTK.Providers.Controllers.Hands;

namespace XRTK.Definitions.Controllers.Hands
{
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Input System/Controller Mappings/Hand Controller Mapping Profile", fileName = "HandControllerMappingProfile")]
public class MixedRealityHandControllerMappingProfile : BaseMixedRealityControllerMappingProfile
{
/// <inheritdoc />
public override SupportedControllerType ControllerType => SupportedControllerType.Hand;

/// <inheritdoc />
public override string TexturePath => $"{base.TexturePath}Hand";

/// <inheritdoc />
protected override void Awake()
{
if (!HasSetupDefaults)
{
ControllerMappings = new[]
{
new MixedRealityControllerMapping("Hand Controller Left", typeof(MixedRealityHandController), Handedness.Left),
new MixedRealityControllerMapping("Hand Controller Right", typeof(MixedRealityHandController), Handedness.Right)
};
}

base.Awake();
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Copyright (c) XRTK. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using UnityEngine;
using XRTK.Definitions.Utilities;

namespace XRTK.Definitions.Controllers.Hands
{
/// <summary>
/// Unity's <see cref="JsonUtility"/> "currently" (stated in 2011) does not support top-level arrays.
/// But hey, it's on their "future" road-map. That's why we need a wrapper definition around or items.
/// </summary>
/// <remarks>The <see cref="JsonUtility"/> also does not support properties, so we gotta use fields. Oh and it also
/// does not support auto mapping of JSON naming "items" to C# naming "Items".</remarks>
[Serializable]
public class RecordedHandJoints
{
/// <summary>
/// Gets the joints recorded in this data set.
/// </summary>
public RecordedHandJoint[] items;
}

/// <summary>
/// A single recorded hand joint's information that may be used to restore the joint pose for simulation.
/// </summary>
[Serializable]
public struct RecordedHandJoint
{
/// <summary>
/// Constructs a new joint record.
/// </summary>
/// <param name="joint"></param>
/// <param name="pose"></param>
public RecordedHandJoint(TrackedHandJoint joint, MixedRealityPose pose)
{
this.joint = JointNames[(int)joint];
this.pose = pose;
}

private static readonly string[] JointNames = Enum.GetNames(typeof(TrackedHandJoint));

/// <summary>
/// Name of the joint recorded. Rather use <see cref="JointIndex"/> below for convenience.
/// </summary>
public string joint;

/// <summary>
/// The recorded pose.
/// </summary>
public MixedRealityPose pose;

/// <summary>
/// Gets the <see cref="TrackedHandJoint"/> this record represents.
/// </summary>
public TrackedHandJoint JointIndex
{
get
{
int nameIndex = Array.FindIndex(JointNames, IsJointName);

if (nameIndex < 0)
{
Debug.LogError($"Joint name {joint} not in {nameof(TrackedHandJoint)} enum");
return TrackedHandJoint.None;
}

return (TrackedHandJoint)nameIndex;
}
set => joint = JointNames[(int)value];
}

private bool IsJointName(string s)
{
return string.Equals(s, joint);
}
}
}
Loading