BoundsControl Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public ref class BoundsControl : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::IMixedRealityFocusChangedHandler, Microsoft::MixedReality::Toolkit::Input::IMixedRealityFocusHandler, Microsoft::MixedReality::Toolkit::Input::IMixedRealitySourceStateHandler, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/BoundsControl")]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/bounds-control")]
[UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.UI.ConstraintManager))]
public class BoundsControl : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Input.IMixedRealityFocusChangedHandler, Microsoft.MixedReality.Toolkit.Input.IMixedRealityFocusHandler, Microsoft.MixedReality.Toolkit.Input.IMixedRealitySourceStateHandler, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/BoundsControl")>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/bounds-control")>]
[<UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.UI.ConstraintManager))>]
type BoundsControl = class
inherit MonoBehaviour
interface IMixedRealitySourceStateHandler
interface IEventSystemHandler
interface IMixedRealityFocusChangedHandler
interface IMixedRealityFocusHandler
Public Class BoundsControl
Inherits MonoBehaviour
Implements IEventSystemHandler, IMixedRealityFocusChangedHandler, IMixedRealityFocusHandler, IMixedRealitySourceStateHandler
- Inheritance
-
UnityEngine.MonoBehaviourBoundsControl
- Attributes
-
UnityEngine.AddComponentMenuAttribute UnityEngine.HelpURLAttribute UnityEngine.RequireComponentAttribute
- Implements
-
IMixedRealityFocusChangedHandler IMixedRealityFocusHandler IMixedRealitySourceStateHandler Unity
Engine. Event Systems. IEvent System Handler
Active |
Whether the bounds control is currently active and will respond to input. |
Bounds |
Type of activation method for showing/hiding bounds control handles and controls |
Bounds |
Obsolete.
This property is unused and will be removed in a future release. It has not, and does not, return any information. |
Bounds |
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. |
Box |
Bounds control box display configuration section. |
Box |
Extra padding added to the actual Target bounds |
Calculation |
Defines the volume type and the priority for the bounds calculation |
Constraints |
Constraint manager slot to enable constraints when manipulating the object. |
Debug |
Component used to display debug messages. |
Elastics |
Elastics Manager slot to enable elastics simulation when manipulating the object. |
Enable |
Enable or disable constraint support of this component. When enabled, transform changes will be post processed by the linked constraint manager. |
Flatten |
Flatten bounds in the specified axis or flatten the smallest one if 'auto' is selected |
Handle |
Configuration for Proximity Effect to scale handles or change materials on proximity. |
Hide |
Determines whether to hide GameObjects (i.e handles, links etc) created and managed by this component in the editor |
Links |
This section defines the links / lines that are drawn between the corners of the control. |
Rotate |
Enter amount representing amount of smoothing to apply to the rotation. Smoothing of 0 means no smoothing. Max value means no change to value. |
Rotate |
Event that gets fired when interaction with a rotation handle starts. |
Rotate |
Event that gets fired when interaction with a rotation handle stops. |
Rotation |
Configuration of the rotation handles. |
Scale |
Configuration of the scale handles. |
Scale |
Enter amount representing amount of smoothing to apply to the scale. Smoothing of 0 means no smoothing. Max value means no change to value. |
Scale |
Event that gets fired when interaction with a scale handle starts. |
Scale |
Event that gets fired when interaction with a scale handle stops. |
Smoothing |
Check to enable frame-rate independent smoothing. |
Target |
The object that the bounds control rig will be modifying. |
Target |
The collider reference tracking the bounds utilized by this component during runtime |
Translate |
Enter amount representing amount of smoothing to apply to the translation. Smoothing of 0 means no smoothing. Max value means no change to value. |
Translate |
Event that gets fired when interaction with a translation handle starts. |
Translate |
Event that gets fired when interaction with a translation handle stops. |
Translation |
Configuration of the translation handles. |
Uniform |
Whether scale the flattened axis when uniform scale is used. |
Wireframe |
Whether we should be displaying just the wireframe (if enabled) or the handles too |
Create |
Destroys and re-creates the rig around the bounds control |
Highlight |
Allows the manual enabling of the wireframe display of the bounds control. This is useful if connected to the Manipulation events of a ObjectManipulator when used in conjunction with this MonoBehavior. |
On |
Raised when a source is detected. |
On |
Raised when a source is lost. |
Unhighlight |
Allows the manual disabling of the wireframe display. |
Update |
Update the bounds. Call this function after modifying the transform of the target externally to make sure the bounds are also updated accordingly. |
IMixed |
Focus event that is raised before the focus is actually changed. |
IMixed |
Focus event that is raised when the focused object is changed. |
IMixed |
The Focus Enter event is raised on this GameObject whenever a IMixedRealityPointer's focus enters this GameObject's Collider. |
IMixed |
The Focus Exit event is raised on this GameObject whenever a IMixedRealityPointer's focus leaves this GameObject's Collider. |