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
BoundsControl
Implements
IMixedRealitySourceStateHandler
IMixedRealityFocusChangedHandler
IMixedRealityFocusHandler
IBoundsTargetProvider
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 |
|
DebugText
Component used to display debug messages.
Declaration
public TextMesh DebugText { get; set; }
Property Value
Type |
Description |
TextMesh |
|
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
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
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 |
|
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 |
|
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 |
|
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
|
Declaration
public void UnhighlightWires()
Implements
IMixedRealitySourceStateHandler
IMixedRealityFocusChangedHandler
IMixedRealityFocusHandler
IBoundsTargetProvider