Commit 29de0c28 authored by BlackAngle233's avatar BlackAngle233
Browse files

10.19 learned

parent 912976bb
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using System.Collections;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
[Serializable]
public struct MixedRealityPose : IEqualityComparer
{
/// <summary>
/// Constructor.
/// </summary>
public MixedRealityPose(Vector3 position, Quaternion rotation)
{
this.position = position;
this.rotation = rotation;
}
/// <summary>
/// Constructor.
/// </summary>
public MixedRealityPose(Vector3 position)
{
this.position = position;
rotation = Quaternion.identity;
}
/// <summary>
/// Constructor.
/// </summary>
public MixedRealityPose(Quaternion rotation)
{
position = Vector3.zero;
this.rotation = rotation;
}
/// <summary>
/// The default value for a Six Dof Transform.
/// </summary>
/// <returns>
/// <see href="https://docs.unity3d.com/ScriptReference/Vector3-zero.html">Vector3.zero</see> and <see href="https://docs.unity3d.com/ScriptReference/Quaternion-identity.html">Quaternion.identity</see>.
/// </returns>
public static MixedRealityPose ZeroIdentity { get; } = new MixedRealityPose(Vector3.zero, Quaternion.identity);
[SerializeField]
[Tooltip("The position of the pose")]
private Vector3 position;
/// <summary>
/// The position of the pose.
/// </summary>
public Vector3 Position { get { return position; } set { position = value; } }
[SerializeField]
[Tooltip("The rotation of the pose.")]
private Quaternion rotation;
/// <summary>
/// The rotation of the pose.
/// </summary>
public Quaternion Rotation { get { return rotation; } set { rotation = value; } }
public static MixedRealityPose operator +(MixedRealityPose left, MixedRealityPose right)
{
return new MixedRealityPose(left.Position + right.Position, left.Rotation * right.Rotation);
}
public static bool operator ==(MixedRealityPose left, MixedRealityPose right)
{
return left.Equals(right);
}
public static bool operator !=(MixedRealityPose left, MixedRealityPose right)
{
return !left.Equals(right);
}
public override string ToString()
{
return $"{position} | {rotation}";
}
/// <summary>
/// The Z axis of the pose in world space.
/// </summary>
public Vector3 Forward => rotation * Vector3.forward;
/// <summary>
/// The Y axis of the pose in world space.
/// </summary>
public Vector3 Up => rotation * Vector3.up;
/// <summary>
/// The X axis of the pose in world space.
/// </summary>
public Vector3 Right => rotation * Vector3.right;
#region IEqualityComparer Implementation
bool IEqualityComparer.Equals(object left, object right)
{
if (ReferenceEquals(null, left) || ReferenceEquals(null, right)) { return false; }
if (!(left is MixedRealityPose) || !(right is MixedRealityPose)) { return false; }
return ((MixedRealityPose)left).Equals((MixedRealityPose)right);
}
public bool Equals(MixedRealityPose other)
{
return Position == other.Position &&
Rotation.Equals(other.Rotation);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) { return false; }
return obj is MixedRealityPose && Equals((MixedRealityPose)obj);
}
int IEqualityComparer.GetHashCode(object obj)
{
return obj is MixedRealityPose ? ((MixedRealityPose)obj).GetHashCode() : 0;
}
/// <inheritdoc />
public override int GetHashCode()
{
return base.GetHashCode();
}
#endregion IEqualityComparer Implementation
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using System.Collections;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
[Serializable]
public struct MixedRealityTransform : IEqualityComparer
{
/// <summary>
/// Constructor.
/// </summary>
public MixedRealityTransform(Transform transform)
{
this.pose = new MixedRealityPose(transform.position, transform.rotation);
this.scale = transform.localScale;
}
/// <summary>
/// Constructor.
/// </summary>
public MixedRealityTransform(Vector3 position, Quaternion rotation, Vector3 scale)
{
this.pose = new MixedRealityPose(position, rotation);
this.scale = scale;
}
/// <summary>
/// Create a transform with only given position
/// </summary>
public static MixedRealityTransform NewTranslate(Vector3 position)
{
return new MixedRealityTransform(position, Quaternion.identity, Vector3.one);
}
/// <summary>
/// Create a transform with only given rotation
/// </summary>
public static MixedRealityTransform NewRotate(Quaternion rotation)
{
return new MixedRealityTransform(Vector3.zero, rotation, Vector3.one);
}
/// <summary>
/// Create a transform with only given scale
/// </summary>
public static MixedRealityTransform NewScale(Vector3 scale)
{
return new MixedRealityTransform(Vector3.zero, Quaternion.identity, scale);
}
/// <summary>
/// The default value for a Six Dof Transform.
/// </summary>
public static MixedRealityTransform Identity { get; } = new MixedRealityTransform(Vector3.zero, Quaternion.identity, Vector3.one);
[SerializeField]
[Tooltip("The pose (position and rotation) of the transform")]
private MixedRealityPose pose;
/// <summary>
/// The position of the transform.
/// </summary>
public Vector3 Position { get { return pose.Position; } set { pose.Position = value; } }
/// <summary>
/// The rotation of the transform.
/// </summary>
public Quaternion Rotation { get { return pose.Rotation; } set { pose.Rotation = value; } }
[SerializeField]
[Tooltip("The scale of the transform.")]
private Vector3 scale;
/// <summary>
/// The scale of the transform.
/// </summary>
public Vector3 Scale { get { return scale; } set { scale = value; } }
public static MixedRealityTransform operator +(MixedRealityTransform left, MixedRealityTransform right)
{
return new MixedRealityTransform(left.Position + right.Position, left.Rotation * right.Rotation, Vector3.Scale(left.Scale, right.Scale));
}
public static bool operator ==(MixedRealityTransform left, MixedRealityTransform right)
{
return left.Equals(right);
}
public static bool operator !=(MixedRealityTransform left, MixedRealityTransform right)
{
return !left.Equals(right);
}
public override string ToString()
{
return $"{pose.Position} | {pose.Rotation}";
}
/// <summary>
/// The Z axis of the pose in world space.
/// </summary>
public Vector3 Forward => (pose.Rotation * Vector3.Scale(scale, Vector3.forward)).normalized;
/// <summary>
/// The Y axis of the pose in world space.
/// </summary>
public Vector3 Up => (pose.Rotation * Vector3.Scale(scale, Vector3.up)).normalized;
/// <summary>
/// The X axis of the pose in world space.
/// </summary>
public Vector3 Right => (pose.Rotation * Vector3.Scale(scale, Vector3.right)).normalized;
#region IEqualityComparer Implementation
bool IEqualityComparer.Equals(object left, object right)
{
if (ReferenceEquals(null, left) || ReferenceEquals(null, right)) { return false; }
if (!(left is MixedRealityTransform) || !(right is MixedRealityTransform)) { return false; }
return ((MixedRealityTransform)left).Equals((MixedRealityTransform)right);
}
public bool Equals(MixedRealityTransform other)
{
return Position == other.Position &&
Rotation.Equals(other.Rotation);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) { return false; }
return obj is MixedRealityTransform && Equals((MixedRealityTransform)obj);
}
int IEqualityComparer.GetHashCode(object obj)
{
return obj is MixedRealityTransform ? ((MixedRealityTransform)obj).GetHashCode() : 0;
}
/// <inheritdoc />
public override int GetHashCode()
{
return base.GetHashCode();
}
#endregion IEqualityComparer Implementation
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
public enum MovementConstraintType
{
None,
FixDistanceFromHead
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Orientation type enum
/// </summary>
public enum OrientationType
{
/// <summary>
/// Don't rotate at all
/// </summary>
None = 0,
/// <summary>
/// Rotate towards the origin
/// </summary>
FaceOrigin,
/// <summary>
/// Rotate towards the origin + 180 degrees
/// </summary>
FaceOriginReversed,
/// <summary>
/// Zero rotation
/// </summary>
FaceParentFoward,
/// <summary>
/// Zero rotation + 180 degrees
/// </summary>
FaceParentForwardReversed,
/// <summary>
/// Parent Relative Up
/// </summary>
FaceParentUp,
/// <summary>
/// Parent Relative Down
/// </summary>
FaceParentDown,
/// <summary>
/// Lay flat on the surface, facing in
/// </summary>
FaceCenterAxis,
/// <summary>
/// Lay flat on the surface, facing out
/// </summary>
FaceCenterAxisReversed
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Rotational Pivot axis for orientating an object
/// </summary>
public enum PivotAxis
{
// Most common options, preserving current functionality with the same enum order.
XY,
Y,
// Rotate about an individual axis.
X,
Z,
// Rotate about a pair of axes.
XZ,
YZ,
// Rotate about all axes.
Free
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Result from a completed asynchronous process.
/// </summary>
public struct ProcessResult
{
/// <summary>
/// Exit code from completed process.
/// </summary>
public int ExitCode { get; }
/// <summary>
/// Errors from completed process.
/// </summary>
public string[] Errors { get; }
/// <summary>
/// Output from completed process.
/// </summary>
public string[] Output { get; }
/// <summary>
/// Constructor for Process Result.
/// </summary>
/// <param name="exitCode">Exit code from completed process.</param>
/// <param name="errors">Errors from completed process.</param>
/// <param name="output">Output from completed process.</param>
public ProcessResult(int exitCode, string[] errors, string[] output) : this()
{
ExitCode = exitCode;
Errors = errors;
Output = output;
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Defines the display order of the Assets > Create > Mixed Reality Toolkit > Profiles menu items.
/// </summary>
public enum CreateProfileMenuItemIndices
{
Configuration = 0,
Camera,
Input,
Pointer,
ControllerMapping,
InputActions,
InputActionRules,
Speech,
BoundaryVisualization,
ControllerVisualization,
SpatialAwareness, // todo: remove
SpatialAwarenessMeshObserver,
SpatialAwarenessSurfaceObserver,
Gestures,
Diagnostics,
RegisteredServiceProviders,
InputSimulation,
HandTracking,
EyeTracking,
MouseInput,
SceneSystem,
Assembly = 99,
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Which direction to orient the radial view object.
/// </summary>
public enum RadialViewReferenceDirection
{
/// <summary>
/// Orient towards the target including roll, pitch and yaw
/// </summary>
ObjectOriented,
/// <summary>
/// Orient toward the target but ignore roll
/// </summary>
FacingWorldUp,
/// <summary>
/// Orient towards the target but remain vertical or gravity aligned
/// </summary>
GravityAligned
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Indicates the confidence level of a recognized event.
/// </summary>
public enum RecognitionConfidenceLevel
{
High = 0,
Medium,
Low,
Unknown
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
public enum RotationConstraintType
{
None,
XAxisOnly,
YAxisOnly,
ZAxisOnly
}
/// <summary>
/// Helper class used to convert from RotationConstraintType to AxisFlags
/// </summary>
public class RotationConstraintHelper
{
/// <summary>
/// Returns corresponding AxisFlags for given RotationConstraintType
/// </summary>
public static AxisFlags ConvertToAxisFlags(RotationConstraintType type)
{
switch (type)
{
case RotationConstraintType.XAxisOnly:
return AxisFlags.YAxis | AxisFlags.ZAxis;
case RotationConstraintType.YAxisOnly:
return AxisFlags.XAxis | AxisFlags.ZAxis;
case RotationConstraintType.ZAxisOnly:
return AxisFlags.XAxis | AxisFlags.YAxis;
default:
return 0;
}
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
public enum ScaleState
{
Static = 0,
Shrinking,
Growing
}
}
\ No newline at end of file
using System;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Attribute for using a SceneAssetReference property drawer.
/// </summary>
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public class SceneAssetReferenceAttribute : PropertyAttribute { }
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
public enum SolverOrientationType
{
/// <summary>
/// Use the tracked object's pitch, yaw, and roll
/// </summary>
FollowTrackedObject = 0,
/// <summary>
/// Face toward the tracked object
/// </summary>
FaceTrackedObject,
/// <summary>
/// Orient towards SolverHandler's tracked object or TargetTransform
/// </summary>
YawOnly,
/// <summary>
/// Leave the object's rotation alone
/// </summary>
Unmodified,
/// <summary>
/// Orient toward the main camera instead of SolverHandler's properties.
/// </summary>
CameraFacing,
/// <summary>
/// Align parallel to the direction the camera is facing
/// </summary>
CameraAligned
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// The supported Application modes for specific features.
/// </summary>
/// <remarks>
/// This enum can be used to configure specific features to have differing behaviors when run in editor.
/// </remarks>
[Flags]
public enum SupportedApplicationModes
{
/// <summary>
/// This indicates that the feature is relevant in editor scenarios.
/// </summary>
Editor = 1 << 0,
/// <summary>
/// This indicates that the feature is relevant in player scenarios.
/// </summary>
Player = 1 << 1,
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// The supported platforms for Mixed Reality Toolkit Components and Features.
/// </summary>
[Flags]
public enum SupportedPlatforms
{
WindowsStandalone = 1 << 0,
MacStandalone = 1 << 1,
LinuxStandalone = 1 << 2,
WindowsUniversal = 1 << 3,
WindowsEditor = 1 << 4,
Android = 1 << 5,
MacEditor = 1 << 6,
LinuxEditor = 1 << 7,
IOS = 1 << 8,
Web = 1 << 9,
Lumin = 1 << 10
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#if WINDOWS_UWP && !ENABLE_IL2CPP
using Microsoft.MixedReality.Toolkit;
#endif // WINDOWS_UWP && !ENABLE_IL2CPP
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Reference to a class <see cref="System.Type"/> with support for Unity serialization.
/// </summary>
[Serializable]
public sealed class SystemType : ISerializationCallbackReceiver
{
[SerializeField]
private string reference = string.Empty;
private Type type;
public static string GetReference(Type type)
{
if (type == null || string.IsNullOrEmpty(type.AssemblyQualifiedName))
{
return string.Empty;
}
string[] qualifiedNameComponents = type.AssemblyQualifiedName.Split(',');
Debug.Assert(qualifiedNameComponents.Length >= 2);
return $"{qualifiedNameComponents[0]}, {qualifiedNameComponents[1].Trim()}";
}
/// <summary>
/// Initializes a new instance of the <see cref="SystemType"/> class.
/// </summary>
/// <param name="assemblyQualifiedClassName">Assembly qualified class name.</param>
public SystemType(string assemblyQualifiedClassName)
{
if (!string.IsNullOrEmpty(assemblyQualifiedClassName))
{
Type = Type.GetType(assemblyQualifiedClassName);
#if WINDOWS_UWP && !ENABLE_IL2CPP
if (Type != null && Type.IsAbstract())
#else
if (Type != null && Type.IsAbstract)
#endif // WINDOWS_UWP && !ENABLE_IL2CPP
{
Type = null;
}
}
else
{
Type = null;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="SystemType"/> class.
/// </summary>
/// <param name="type">Class type.</param>
/// <exception cref="System.ArgumentException">
/// If <paramref name="type"/> is not a class type.
/// </exception>
public SystemType(Type type)
{
Type = type;
}
#region ISerializationCallbackReceiver Members
void ISerializationCallbackReceiver.OnAfterDeserialize()
{
// Class references may move between asmdef or be renamed throughout MRTK development
// Check to see if we need to update our reference value
reference = TryMigrateReference(reference);
type = !string.IsNullOrEmpty(reference) ? Type.GetType(reference) : null;
}
void ISerializationCallbackReceiver.OnBeforeSerialize() { }
#endregion ISerializationCallbackReceiver Members
/// <summary>
/// Gets or sets type of class reference.
/// </summary>
/// <exception cref="System.ArgumentException">
/// If <paramref name="value"/> is not a class type.
/// </exception>
public Type Type
{
get => type;
set
{
if (value != null)
{
#if WINDOWS_UWP && !ENABLE_IL2CPP
bool isValid = value.IsValueType() && !value.IsEnum() && !value.IsAbstract() || value.IsClass();
#else
bool isValid = value.IsValueType && !value.IsEnum && !value.IsAbstract || value.IsClass;
#endif // WINDOWS_UWP && !ENABLE_IL2CPP
if (!isValid)
{
Debug.LogError($"'{value.FullName}' is not a valid class or struct type.");
}
}
type = value;
reference = GetReference(value);
}
}
public static implicit operator string(SystemType type)
{
return type.reference;
}
public static implicit operator Type(SystemType type)
{
return type.Type;
}
public static implicit operator SystemType(Type type)
{
return new SystemType(type);
}
public override string ToString()
{
return Type?.FullName ?? "(None)";
}
// Key == original reference string entry, value == new migrated placement
// String values are broken into {namespace.classname, asmdef}
private static Dictionary<string, string> ReferenceMappings = new Dictionary<string, string>()
{
{ "Microsoft.MixedReality.Toolkit.Input.InputSimulationService, Microsoft.MixedReality.Toolkit.Services.InputSimulation.Editor",
"Microsoft.MixedReality.Toolkit.Input.InputSimulationService, Microsoft.MixedReality.Toolkit.Services.InputSimulation" },
{ "Microsoft.MixedReality.Toolkit.Input.InputPlaybackService, Microsoft.MixedReality.Toolkit.Services.InputSimulation.Editor",
"Microsoft.MixedReality.Toolkit.Input.InputPlaybackService, Microsoft.MixedReality.Toolkit.Services.InputSimulation" },
};
/// <summary>
/// This function checks if there are any known migrations for old class names, namespaces, and/or asmdef files
/// If so, the new reference string is returned and utilized for editor runtime and will be serialized to disk
/// </summary>
private static string TryMigrateReference(string reference)
{
if (ReferenceMappings.ContainsKey(reference))
{
return ReferenceMappings[reference];
}
return reference;
}
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// The supported tracked hand joints.
/// </summary>
/// <remarks>See https://en.wikipedia.org/wiki/Interphalangeal_joints_of_the_hand#/media/File:Scheme_human_hand_bones-en.svg for joint name definitions.</remarks>
public enum TrackedHandJoint
{
None = 0,
/// <summary>
/// The wrist.
/// </summary>
Wrist,
/// <summary>
/// The palm.
/// </summary>
Palm,
/// <summary>
/// The lowest joint in the thumb (down in your palm).
/// </summary>
ThumbMetacarpalJoint,
/// <summary>
/// The thumb's second (middle-ish) joint.
/// </summary>
ThumbProximalJoint,
/// <summary>
/// The thumb's first (furthest) joint.
/// </summary>
ThumbDistalJoint,
/// <summary>
/// The tip of the thumb.
/// </summary>
ThumbTip,
/// <summary>
/// The lowest joint of the index finger.
/// </summary>
IndexMetacarpal,
/// <summary>
/// The knuckle joint of the index finger.
/// </summary>
IndexKnuckle,
/// <summary>
/// The middle joint of the index finger.
/// </summary>
IndexMiddleJoint,
/// <summary>
/// The joint nearest the tip of the index finger.
/// </summary>
IndexDistalJoint,
/// <summary>
/// The tip of the index finger.
/// </summary>
IndexTip,
/// <summary>
/// The lowest joint of the middle finger.
/// </summary>
MiddleMetacarpal,
/// <summary>
/// The knuckle joint of the middle finger.
/// </summary>
MiddleKnuckle,
/// <summary>
/// The middle joint of the middle finger.
/// </summary>
MiddleMiddleJoint,
/// <summary>
/// The joint nearest the tip of the finger.
/// </summary>
MiddleDistalJoint,
/// <summary>
/// The tip of the middle finger.
/// </summary>
MiddleTip,
/// <summary>
/// The lowest joint of the ring finger.
/// </summary>
RingMetacarpal,
/// <summary>
/// The knuckle of the ring finger.
/// </summary>
RingKnuckle,
/// <summary>
/// The middle joint of the ring finger.
/// </summary>
RingMiddleJoint,
/// <summary>
/// The joint nearest the tip of the ring finger.
/// </summary>
RingDistalJoint,
/// <summary>
/// The tip of the ring finger.
/// </summary>
RingTip,
/// <summary>
/// The lowest joint of the pinky finger.
/// </summary>
PinkyMetacarpal,
/// <summary>
/// The knuckle joint of the pinky finger.
/// </summary>
PinkyKnuckle,
/// <summary>
/// The middle joint of the pinky finger.
/// </summary>
PinkyMiddleJoint,
/// <summary>
/// The joint nearest the tip of the pink finger.
/// </summary>
PinkyDistalJoint,
/// <summary>
/// The tip of the pinky.
/// </summary>
PinkyTip
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
public enum TrackedObjectType
{
/// <summary>
/// Calculates position and orientation from the main camera.
/// </summary>
Head = 0,
/// <summary>
/// (Obsolete) Calculates position and orientation from the left motion-tracked controller.
/// </summary>
[Obsolete("Use TrackedObjectType.ControllerRay and TrackedHandedness instead")]
MotionControllerLeft = 1,
/// <summary>
/// (Obsolete) Calculates position and orientation from the right motion-tracked controller.
/// </summary>
[Obsolete("Use TrackedObjectType.ControllerRay and TrackedHandedness instead")]
MotionControllerRight = 2,
/// <summary>
/// (Obsolete) Calculates position and orientation from a tracked hand joint on the left hand.
/// </summary>
[Obsolete("Use TrackedObjectType.HandJoint and TrackedHandedness instead")]
HandJointLeft = 3,
/// <summary>
/// (Obsolete) Calculates position and orientation from a tracked hand joint on the right hand.
/// </summary>
[Obsolete("Use TrackedObjectType.HandJoint and TrackedHandedness instead")]
HandJointRight = 4,
/// <summary>
/// Calculates position and orientation from the system-calculated ray of available controller (i.e motion controllers, hands, etc.)
/// </summary>
ControllerRay = 5,
/// <summary>
/// Calculates position and orientation from a tracked hand joint
/// </summary>
HandJoint = 6,
/// <summary>
/// Calculates position and orientation from a tracked hand joint
/// </summary>
CustomOverride = 7,
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Flags used to represent a combination of different types of transformation
/// </summary>
[System.Flags]
public enum TransformFlags
{
Move = 1 << 0,
Rotate = 1 << 1,
Scale = 1 << 2
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// Indicates how selectable classes should be collated in drop-down menu.
/// </summary>
public enum TypeGrouping
{
/// <summary>
/// No grouping, just show type names in a list; for instance, "Some.Nested.Namespace.SpecialClass".
/// </summary>
None,
/// <summary>
/// Group classes by namespace and show foldout menus for nested namespaces; for
/// instance, "Some > Nested > Namespace > SpecialClass".
/// </summary>
ByNamespace,
/// <summary>
/// Group classes by namespace; for instance, "Some.Nested.Namespace > SpecialClass".
/// </summary>
ByNamespaceFlat,
/// <summary>
/// Group classes in the same way as Unity does for its component menu. This
/// grouping method must only be used for <see href="https://docs.unity3d.com/ScriptReference/MonoBehaviour.html">MonoBehaviour</see> types.
/// </summary>
ByAddComponentMenu,
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment