Class ConstraintManager
Manages constraints for a given object and ensures that Scale/Rotation/Translation
constraints are executed separately.
Inheritance
ConstraintManager
Assembly: cs.temp.dll.dll
public class ConstraintManager : MonoBehaviour
Properties
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
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
Methods
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.
|
Declaration
public void ApplyRotationConstraints(ref MixedRealityTransform transform, bool isOneHanded, bool isNear)
Parameters
Type |
Name |
Description |
MixedRealityTransform |
transform |
|
Boolean |
isOneHanded |
|
Boolean |
isNear |
|
Declaration
public void ApplyScaleConstraints(ref MixedRealityTransform transform, bool isOneHanded, bool isNear)
Parameters
Type |
Name |
Description |
MixedRealityTransform |
transform |
|
Boolean |
isOneHanded |
|
Boolean |
isNear |
|
Declaration
public void ApplyTranslationConstraints(ref MixedRealityTransform transform, bool isOneHanded, bool isNear)
Parameters
Type |
Name |
Description |
MixedRealityTransform |
transform |
|
Boolean |
isOneHanded |
|
Boolean |
isNear |
|
Declaration
Declaration
public void Initialize(MixedRealityTransform worldPose)
Parameters
Type |
Name |
Description |
MixedRealityTransform |
worldPose |
|
Removes the given component from the manually selected constraint list.
Declaration
public void RemoveConstraintFromManualSelection(TransformConstraint constraint)
Parameters