日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class BaseController

    Base Controller class to inherit from for all controllers.

    Inheritance
    Object
    BaseController
    BaseHand
    SimulatedMotionController
    GenericJoystickController
    MouseController
    UnityTouchController
    Implements
    IMixedRealityController
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Input
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class BaseController : IMixedRealityController

    Constructors

    BaseController(TrackingState, Handedness, IMixedRealityInputSource, MixedRealityInteractionMapping[])

    Constructor.

    Declaration
    protected BaseController(TrackingState trackingState, Handedness controllerHandedness, IMixedRealityInputSource inputSource = null, MixedRealityInteractionMapping[] interactions = null)
    Parameters
    Type Name Description
    TrackingState trackingState
    Handedness controllerHandedness
    IMixedRealityInputSource inputSource
    MixedRealityInteractionMapping[] interactions

    Properties

    AngularVelocity

    Declaration
    public Vector3 AngularVelocity { get; protected set; }
    Property Value
    Type Description
    Vector3

    ControllerHandedness

    The designated hand that the Input Source is managing, as defined by the SDK / Unity.

    Declaration
    public Handedness ControllerHandedness { get; }
    Property Value
    Type Description
    Handedness

    DefaultInteractions

    The default interactions for this controller.

    Declaration
    public virtual MixedRealityInteractionMapping[] DefaultInteractions { get; }
    Property Value
    Type Description
    MixedRealityInteractionMapping[]

    DefaultLeftHandedInteractions

    The Default Left Handed interactions for this controller.

    Declaration
    public virtual MixedRealityInteractionMapping[] DefaultLeftHandedInteractions { get; }
    Property Value
    Type Description
    MixedRealityInteractionMapping[]

    DefaultRightHandedInteractions

    The Default Right Handed interactions for this controller.

    Declaration
    public virtual MixedRealityInteractionMapping[] DefaultRightHandedInteractions { get; }
    Property Value
    Type Description
    MixedRealityInteractionMapping[]

    Enabled

    Is the controller enabled?

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    Boolean

    InputSource

    The registered Input Source for this controller

    Declaration
    public IMixedRealityInputSource InputSource { get; }
    Property Value
    Type Description
    IMixedRealityInputSource

    Interactions

    Mapping definition for this controller, linking the Physical inputs to logical Input System Actions

    Declaration
    public MixedRealityInteractionMapping[] Interactions { get; }
    Property Value
    Type Description
    MixedRealityInteractionMapping[]

    IsInPointingPose

    Some controllers such as articulated should only be able to invoke pointing/distant interactions in certain poses.

    Declaration
    public virtual bool IsInPointingPose { get; }
    Property Value
    Type Description
    Boolean

    IsPositionApproximate

    Indicates the accuracy of the position data being reported.

    Declaration
    public bool IsPositionApproximate { get; protected set; }
    Property Value
    Type Description
    Boolean

    IsPositionAvailable

    Indicates that this controller is currently providing position data.

    Declaration
    public bool IsPositionAvailable { get; protected set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This value may change during usage for some controllers. As a best practice, be sure to check this value before using position data.

    IsRotationAvailable

    Indicates that this controller is currently providing rotation data.

    Declaration
    public bool IsRotationAvailable { get; protected set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This value may change during usage for some controllers. As a best practice, be sure to check this value before using rotation data.

    TrackingState

    Outputs the current state of the Input Source, whether it is tracked or not. As defined by the SDK / Unity.

    Declaration
    public TrackingState TrackingState { get; protected set; }
    Property Value
    Type Description
    TrackingState

    Velocity

    Declaration
    public Vector3 Velocity { get; protected set; }
    Property Value
    Type Description
    Vector3

    Visualizer

    Declaration
    public IMixedRealityControllerVisualizer Visualizer { get; protected set; }
    Property Value
    Type Description
    IMixedRealityControllerVisualizer

    Methods

    AssignControllerMappings(MixedRealityInteractionMapping[])

    Load the Interaction mappings for this controller from the configured Controller Mapping profile

    Declaration
    public void AssignControllerMappings(MixedRealityInteractionMapping[] mappings)
    Parameters
    Type Name Description
    MixedRealityInteractionMapping[] mappings

    Configured mappings from a controller mapping profile

    GetControllerMappings()

    Declaration
    protected static MixedRealityControllerMapping[] GetControllerMappings()
    Returns
    Type Description
    MixedRealityControllerMapping[]

    GetControllerVisualizationProfile()

    Declaration
    protected static MixedRealityControllerVisualizationProfile GetControllerVisualizationProfile()
    Returns
    Type Description
    MixedRealityControllerVisualizationProfile

    IsControllerMappingEnabled()

    Declaration
    protected static bool IsControllerMappingEnabled()
    Returns
    Type Description
    Boolean

    SetupConfiguration(Type)

    Sets up the configuration based on the Mixed Reality Controller Mapping Profile.

    Declaration
    [Obsolete("This method is no longer used. Configuration now happens in the constructor. You can check this controller's Enabled property for configuration state.")]
    public bool SetupConfiguration(Type controllerType)
    Parameters
    Type Name Description
    Type controllerType

    The type this controller represents.

    Returns
    Type Description
    Boolean

    SetupConfiguration(Type, InputSourceType)

    Sets up the configuration based on the Mixed Reality Controller Mapping Profile.

    Declaration
    [Obsolete("This method is no longer used. Configuration now happens in the constructor. You can check this controller's Enabled property for configuration state.")]
    public bool SetupConfiguration(Type controllerType, InputSourceType inputSourceType = InputSourceType.Controller)
    Parameters
    Type Name Description
    Type controllerType
    InputSourceType inputSourceType
    Returns
    Type Description
    Boolean

    SetupDefaultInteractions()

    Assign the default interactions based on this controller's handedness, if necessary.

    Declaration
    public virtual void SetupDefaultInteractions()

    SetupDefaultInteractions(Handedness)

    Assign the default interactions based on controller handedness, if necessary.

    Declaration
    [Obsolete("The handedness parameter is no longer used. This method now reads from the controller's handedness.")]
    public virtual void SetupDefaultInteractions(Handedness controllerHandedness)
    Parameters
    Type Name Description
    Handedness controllerHandedness

    TryAddControllerModelToSceneHierarchy(GameObject)

    Declaration
    protected bool TryAddControllerModelToSceneHierarchy(GameObject controllerObject)
    Parameters
    Type Name Description
    GameObject controllerObject
    Returns
    Type Description
    Boolean

    TryRenderControllerModel(Type, InputSourceType)

    Try to render a controller model for this controller from the visualization profile.

    Declaration
    protected virtual bool TryRenderControllerModel(Type controllerType, InputSourceType inputSourceType)
    Parameters
    Type Name Description
    Type controllerType

    The type of controller to load the model for.

    InputSourceType inputSourceType

    Whether the model represents a hand or a controller.

    Returns
    Type Description
    Boolean

    True if a model was successfully loaded or model rendering is disabled. False if a model tried to load but failed.

    Implements

    IMixedRealityController
    Back to top Generated by DocFX