mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class BoundsControl

    Bounds Control allows to transform objects (rotate and scale) and draws a cube around the object to visualize the possibility of user triggered transform manipulation. Bounds Control provides scale and rotation handles that can be used for far and near interaction manipulation of the object. It further provides a proximity effect for scale and rotation handles that alters scaling and material. Todo: replace doc link - point to BoundsControl docs

    Inheritance
    Object
    BoundsControl
    Implements
    IMixedRealitySourceStateHandler
    IMixedRealityFocusChangedHandler
    IMixedRealityFocusHandler
    IBoundsTargetProvider
    Namespace: Microsoft.MixedReality.Toolkit.Experimental.UI.BoundsControl
    Assembly: cs.temp.dll.dll
    Syntax
    public class BoundsControl : MonoBehaviour, IMixedRealitySourceStateHandler, IMixedRealityFocusChangedHandler, IMixedRealityFocusHandler, IBoundsTargetProvider

    Properties

    Active

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

    BoundsControlActivation

    Type of activation method for showing/hiding bounds control handles and controls

    Declaration
    public BoundsControlActivationType BoundsControlActivation { get; set; }
    Property Value
    Type Description
    BoundsControlActivationType

    BoundsCorners

    Declaration
    public Vector3[] BoundsCorners { get; }
    Property Value
    Type Description
    Vector3[]

    BoundsOverride

    For complex objects, automatic bounds calculation may not behave as expected. Use an existing Box Collider (even on a child object) to manually determine bounds of bounds control.

    Declaration
    public BoxCollider BoundsOverride { get; set; }
    Property Value
    Type Description
    BoxCollider

    BoxDisplayConfig

    Bounds control box display configuration section.

    Declaration
    public BoxDisplayConfiguration BoxDisplayConfig { get; set; }
    Property Value
    Type Description
    BoxDisplayConfiguration

    BoxPadding

    Extra padding added to the actual Target bounds

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

    CalculationMethod

    Defines the volume type and the priority for the bounds calculation

    Declaration
    public BoundsCalculationMethod CalculationMethod { get; set; }
    Property Value
    Type Description
    BoundsCalculationMethod

    DebugText

    Component used to display debug messages.

    Declaration
    public TextMesh DebugText { get; set; }
    Property Value
    Type Description
    TextMesh

    FlattenAxis

    Flatten bounds in the specified axis or flatten the smallest one if 'auto' is selected

    Declaration
    public FlattenModeType FlattenAxis { get; set; }
    Property Value
    Type Description
    FlattenModeType

    HandleProximityEffectConfig

    Configuration for Proximity Effect to scale handles or change materials on proximity.

    Declaration
    public ProximityEffectConfiguration HandleProximityEffectConfig { get; set; }
    Property Value
    Type Description
    ProximityEffectConfiguration

    HideElementsInInspector

    Determines whether to hide GameObjects (i.e handles, links etc) created and managed by this component in the editor

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

    LinksConfig

    This section defines the links / lines that are drawn between the corners of the control.

    Declaration
    public LinksConfiguration LinksConfig { get; set; }
    Property Value
    Type Description
    LinksConfiguration

    RotateStarted

    Event that gets fired when interaction with a rotation handle starts.

    Declaration
    public UnityEvent RotateStarted { get; set; }
    Property Value
    Type Description
    UnityEvent

    RotateStopped

    Event that gets fired when interaction with a rotation handle stops.

    Declaration
    public UnityEvent RotateStopped { get; set; }
    Property Value
    Type Description
    UnityEvent

    RotationHandlesConfig

    Configuration of the rotation handles.

    Declaration
    public RotationHandlesConfiguration RotationHandlesConfig { get; set; }
    Property Value
    Type Description
    RotationHandlesConfiguration

    ScaleHandlesConfig

    Configuration of the scale handles.

    Declaration
    public ScaleHandlesConfiguration ScaleHandlesConfig { get; set; }
    Property Value
    Type Description
    ScaleHandlesConfiguration

    ScaleStarted

    Event that gets fired when interaction with a scale handle starts.

    Declaration
    public UnityEvent ScaleStarted { get; set; }
    Property Value
    Type Description
    UnityEvent

    ScaleStopped

    Event that gets fired when interaction with a scale handle stops.

    Declaration
    public UnityEvent ScaleStopped { get; set; }
    Property Value
    Type Description
    UnityEvent

    Target

    The object that the bounds control rig will be modifying.

    Declaration
    public GameObject Target { get; set; }
    Property Value
    Type Description
    GameObject

    TargetBounds

    The collider reference tracking the bounds utilized by this component during runtime

    Declaration
    public BoxCollider TargetBounds { get; }
    Property Value
    Type Description
    BoxCollider

    WireframeOnly

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

    Methods

    CreateRig()

    Destroys and re-creates the rig around the bounds control

    Declaration
    public void CreateRig()

    HighlightWires()

    Allows to manually enable wire (edge) highlighting (edges) of the bounds control. This is useful if connected to the Manipulation events of a ObjectManipulator when used in conjunction with this MonoBehavior.

    Declaration
    public void HighlightWires()

    OnSourceDetected(SourceStateEventData)

    Declaration
    public void OnSourceDetected(SourceStateEventData eventData)
    Parameters
    Type Name Description
    SourceStateEventData eventData

    OnSourceLost(SourceStateEventData)

    Declaration
    public void OnSourceLost(SourceStateEventData eventData)
    Parameters
    Type Name Description
    SourceStateEventData eventData

    RegisterTransformScaleHandler(MinMaxScaleConstraint)

    Register a transform scale handler to bounding box to limit the scaling range This is useful for adding/switching your scale handler during runtime

    Declaration
    public void RegisterTransformScaleHandler(MinMaxScaleConstraint transformScaleHandler)
    Parameters
    Type Name Description
    MinMaxScaleConstraint transformScaleHandler

    scale handler you want to switch to - can be null if scaling shouldn't be constrained

    UnhighlightWires()

    Declaration
    public void UnhighlightWires()

    Implements

    IMixedRealitySourceStateHandler
    IMixedRealityFocusChangedHandler
    IMixedRealityFocusHandler
    IBoundsTargetProvider
    In This Article
    • Properties
      • Active
      • BoundsControlActivation
      • BoundsCorners
      • BoundsOverride
      • BoxDisplayConfig
      • BoxPadding
      • CalculationMethod
      • DebugText
      • FlattenAxis
      • HandleProximityEffectConfig
      • HideElementsInInspector
      • LinksConfig
      • RotateStarted
      • RotateStopped
      • RotationHandlesConfig
      • ScaleHandlesConfig
      • ScaleStarted
      • ScaleStopped
      • Target
      • TargetBounds
      • WireframeOnly
    • Methods
      • CreateRig()
      • HighlightWires()
      • OnSourceDetected(SourceStateEventData)
      • OnSourceLost(SourceStateEventData)
      • RegisterTransformScaleHandler(MinMaxScaleConstraint)
      • UnhighlightWires()
    • Implements
    Back to top Generated by DocFX