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

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

    Show / Hide Table of Contents

    Class ConstraintManager

    Manages constraints for a given object and ensures that Scale/Rotation/Translation constraints are executed separately.

    Inheritance
    Object
    ConstraintManager
    Namespace: Microsoft.MixedReality.Toolkit.UI
    Assembly: cs.temp.dll.dll
    Syntax
    public class ConstraintManager : MonoBehaviour

    Properties

    AutoConstraintSelection

    Per default, constraint manager will apply all to this gameobject attached constraint components automatically. If this flag is enabled, only the selected constraint list will be applied.

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

    SelectedConstraints

    Manually selected list of transform constraints. Note that this list will only be processed by the manager if AutoConstraintSelection is disabled. Note that this is a read only property. To add new constraints to the list call RegisterConstraint.

    Declaration
    public List<TransformConstraint> SelectedConstraints { get; }
    Property Value
    Type Description
    List<TransformConstraint>

    Methods

    AddConstraintToManualSelection(TransformConstraint)

    Adds a constraint to the manual selection list. Note that only unique components will be added to the list.

    Declaration
    public bool AddConstraintToManualSelection(TransformConstraint constraint)
    Parameters
    Type Name Description
    TransformConstraint constraint

    Constraint to add to the managers manual constraint list.

    Returns
    Type Description
    Boolean

    Returns true if insertion was successful. If the comopnent was already in the list the insertion will fail.

    ApplyRotationConstraints(ref MixedRealityTransform, Boolean, Boolean)

    Declaration
    public void ApplyRotationConstraints(ref MixedRealityTransform transform, bool isOneHanded, bool isNear)
    Parameters
    Type Name Description
    MixedRealityTransform transform
    Boolean isOneHanded
    Boolean isNear

    ApplyScaleConstraints(ref MixedRealityTransform, Boolean, Boolean)

    Declaration
    public void ApplyScaleConstraints(ref MixedRealityTransform transform, bool isOneHanded, bool isNear)
    Parameters
    Type Name Description
    MixedRealityTransform transform
    Boolean isOneHanded
    Boolean isNear

    ApplyTranslationConstraints(ref MixedRealityTransform, Boolean, Boolean)

    Declaration
    public void ApplyTranslationConstraints(ref MixedRealityTransform transform, bool isOneHanded, bool isNear)
    Parameters
    Type Name Description
    MixedRealityTransform transform
    Boolean isOneHanded
    Boolean isNear

    Awake()

    Declaration
    protected void Awake()

    Initialize(MixedRealityTransform)

    Declaration
    public void Initialize(MixedRealityTransform worldPose)
    Parameters
    Type Name Description
    MixedRealityTransform worldPose

    RemoveConstraintFromManualSelection(TransformConstraint)

    Removes the given component from the manually selected constraint list.

    Declaration
    public void RemoveConstraintFromManualSelection(TransformConstraint constraint)
    Parameters
    Type Name Description
    TransformConstraint constraint

    Constraint to remove.

    Back to top Generated by DocFX