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.
Inheritance
BoundsControl
Implements
IMixedRealitySourceStateHandler
IMixedRealityFocusChangedHandler
IMixedRealityFocusHandler
Assembly: cs.temp.dll.dll
public class BoundsControl : MonoBehaviour, IMixedRealitySourceStateHandler, IMixedRealityFocusChangedHandler, IMixedRealityFocusHandler, IBoundsTargetProvider
Properties
Declaration
public bool Active { get; set; }
Property Value
Type of activation method for showing/hiding bounds control handles and controls
Declaration
public BoundsControlActivationType BoundsControlActivation { get; set; }
Property Value
Type |
Description |
BoundsControlActivationType |
|
Declaration
public Vector3[] BoundsCorners { get; }
Property Value
Type |
Description |
Vector3[] |
|
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 |
|
Bounds control box display configuration section.
Declaration
public BoxDisplayConfiguration BoxDisplayConfig { get; set; }
Property Value
Extra padding added to the actual Target bounds
Declaration
public Vector3 BoxPadding { get; set; }
Property Value
Defines the volume type and the priority for the bounds calculation
Declaration
public BoundsCalculationMethod CalculationMethod { get; set; }
Property Value
Type |
Description |
BoundsCalculationMethod |
|
Constraint manager slot to enable constraints when manipulating the object.
Declaration
public ConstraintManager ConstraintsManager { get; set; }
Property Value
DebugText
Component used to display debug messages.
Declaration
public TextMesh DebugText { get; set; }
Property Value
Type |
Description |
TextMesh |
|
Elastics Manager slot to enable elastics simulation when manipulating the object.
Declaration
public ElasticsManager ElasticsManager { get; set; }
Property Value
Type |
Description |
ElasticsManager |
|
nable or disable constraint support of this component. When enabled, transform
changes will be post processed by the linked constraint manager.
Declaration
public bool EnableConstraints { get; set; }
Property Value
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 |
|
Configuration for Proximity Effect to scale handles or change materials on proximity.
Declaration
public ProximityEffectConfiguration HandleProximityEffectConfig { get; set; }
Property Value
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
This section defines the links / lines that are drawn between the corners of the control.
Declaration
public LinksConfiguration LinksConfig { get; set; }
Property Value
Enter amount representing amount of smoothing to apply to the rotation. Smoothing of 0 means no smoothing. Max value means no change to value.
Declaration
public float RotateLerpTime { get; set; }
Property Value
Event that gets fired when interaction with a rotation handle starts.
Declaration
public UnityEvent RotateStarted { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Event that gets fired when interaction with a rotation handle stops.
Declaration
public UnityEvent RotateStopped { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Configuration of the rotation handles.
Declaration
public RotationHandlesConfiguration RotationHandlesConfig { get; set; }
Property Value
Configuration of the scale handles.
Declaration
public ScaleHandlesConfiguration ScaleHandlesConfig { get; set; }
Property Value
Enter amount representing amount of smoothing to apply to the scale. Smoothing of 0 means no smoothing. Max value means no change to value.
Declaration
public float ScaleLerpTime { get; set; }
Property Value
Event that gets fired when interaction with a scale handle starts.
Declaration
public UnityEvent ScaleStarted { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Event that gets fired when interaction with a scale handle stops.
Declaration
public UnityEvent ScaleStopped { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Check to enable frame-rate independent smoothing.
Declaration
public bool SmoothingActive { get; set; }
Property Value
The object that the bounds control rig will be modifying.
Declaration
public GameObject Target { get; set; }
Property Value
Type |
Description |
GameObject |
|
The collider reference tracking the bounds utilized by this component during runtime
Declaration
public BoxCollider TargetBounds { get; }
Property Value
Type |
Description |
BoxCollider |
|
Enter amount representing amount of smoothing to apply to the translation. Smoothing of 0
means no smoothing. Max value means no change to value.
Declaration
public float TranslateLerpTime { get; set; }
Property Value
Event that gets fired when interaction with a translation handle starts.
Declaration
public UnityEvent TranslateStarted { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Event that gets fired when interaction with a translation handle stops.
Declaration
public UnityEvent TranslateStopped { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Configuration of the translation handles.
Declaration
public TranslationHandlesConfiguration TranslationHandlesConfig { get; set; }
Property Value
Declaration
public bool WireframeOnly { get; }
Property Value
Methods
Destroys and re-creates the rig around the bounds control
Declaration
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()
Declaration
public void OnSourceDetected(SourceStateEventData eventData)
Parameters
Type |
Name |
Description |
SourceStateEventData |
eventData |
|
Declaration
public void OnSourceLost(SourceStateEventData eventData)
Parameters
Type |
Name |
Description |
SourceStateEventData |
eventData |
|
Declaration
public void UnhighlightWires()
Implements
IMixedRealitySourceStateHandler
IMixedRealityFocusChangedHandler
IMixedRealityFocusHandler