Class Manus::Interaction::TurnableObject
ClassList > Manus > Interaction > TurnableObject
This is a turnable object implementation, the valves, wheels, dials are grabbable and rotatable.
Inherits the following classes: MonoBehaviour, Manus::Interaction::IGrabbable, Manus::Interaction::IValue
Classes
| Type | Name |
|---|---|
| class | ExtraGrabInfo |
Public Attributes
| Type | Name |
|---|---|
| bool | limitRotation = true |
| Action< TurnableObject > | onValueChanged This event is triggered when the value changes. |
| Vector2 | rotationLimits = new Vector3(0.0f, 90.0f)The rotational limits in degrees. This value CAN be larger than 360 degrees! |
| float | rotationSteps = -1.0f |
| bool | snapToStep = false |
| float | startValue = 0.0f |
| Vector3 | turnAxis = Vector3.forward |
| Vector3 | upAxis = Vector3.up |
Public Properties
| Type | Name |
|---|---|
| property float | normalizedValue The normalized value, if there is no limit then 1.0f is a full 360 degree rotation. |
| property float | value The dial's rotation value, this value is between the rotationLimits. |
Public Properties inherited from Manus::Interaction::IValue
See Manus::Interaction::IValue
| Type | Name |
|---|---|
| property float | normalizedValue |
| property float | value |
Public Functions
| Type | Name |
|---|---|
| void | OnAddedInteractingInfo (GrabbedObject p_Object, GrabbedObject.Info p_Info) Called when a new grabber starts grabbing this. |
| void | OnGrabbedEnd (GrabbedObject p_Object) Called when this stops being grabbed. |
| void | OnGrabbedFixedUpdate (GrabbedObject p_Object) Called every FixedUpdate when this is grabbed. This is where the rotation of the dial is calculated and changed. |
| void | OnGrabbedHandPose (InteractionHand p_Object, GrabbedObject.Info p_Info) Poses the visual hand. (If needed) |
| void | OnGrabbedStart (GrabbedObject p_Object) Called when this starts getting grabbed. |
| void | OnRemovedInteractingInfo (GrabbedObject p_Object, GrabbedObject.Info p_Info) Called when a grabber stops grabbing this. |
Public Functions inherited from Manus::Interaction::IGrabbable
See Manus::Interaction::IGrabbable
| Type | Name |
|---|---|
| void | OnAddedInteractingInfo (GrabbedObject p_Object, GrabbedObject.Info p_Info) Called when a new grabber starts grabbing this. |
| void | OnGrabbedEnd (GrabbedObject p_Object) Called when this stops being grabbed. |
| void | OnGrabbedFixedUpdate (GrabbedObject p_Object) Called every FixedUpdate when this is grabbed. |
| void | OnGrabbedHandPose (InteractionHand p_Object, GrabbedObject.Info p_Info) Poses the visual hand. (If needed) |
| void | OnGrabbedStart (GrabbedObject p_Object) Called when this starts getting grabbed. |
| void | OnRemovedInteractingInfo (GrabbedObject p_Object, GrabbedObject.Info p_Info) Called when a grabber stops grabbing this. |
Public Attributes Documentation
variable limitRotation
variable onValueChanged
This event is triggered when the value changes.
variable rotationLimits
The rotational limits in degrees. This value CAN be larger than 360 degrees!
variable rotationSteps
variable snapToStep
variable startValue
variable turnAxis
variable upAxis
Public Properties Documentation
property normalizedValue
The normalized value, if there is no limit then 1.0f is a full 360 degree rotation.
Implements Manus::Interaction::IValue::normalizedValue
property value
The dial's rotation value, this value is between the rotationLimits.
Implements Manus::Interaction::IValue::value
Public Functions Documentation
function OnAddedInteractingInfo
Called when a new grabber starts grabbing this.
inline void Manus::Interaction::TurnableObject::OnAddedInteractingInfo (
GrabbedObject p_Object,
GrabbedObject.Info p_Info
)
Parameters:
p_ObjectContains information about the grabp_InfoContains information about the added grabber
Implements Manus::Interaction::IGrabbable::OnAddedInteractingInfo
function OnGrabbedEnd
Called when this stops being grabbed.
Parameters:
p_ObjectContains information about the grab
Implements Manus::Interaction::IGrabbable::OnGrabbedEnd
function OnGrabbedFixedUpdate
Called every FixedUpdate when this is grabbed. This is where the rotation of the dial is calculated and changed.
Parameters:
p_ObjectContains information about the grab
Implements Manus::Interaction::IGrabbable::OnGrabbedFixedUpdate
function OnGrabbedHandPose
Poses the visual hand. (If needed)
inline void Manus::Interaction::TurnableObject::OnGrabbedHandPose (
InteractionHand p_Object,
GrabbedObject.Info p_Info
)
Parameters:
p_Object
Implements Manus::Interaction::IGrabbable::OnGrabbedHandPose
function OnGrabbedStart
Called when this starts getting grabbed.
Parameters:
p_ObjectContains information about the grab
Implements Manus::Interaction::IGrabbable::OnGrabbedStart
function OnRemovedInteractingInfo
Called when a grabber stops grabbing this.
inline void Manus::Interaction::TurnableObject::OnRemovedInteractingInfo (
GrabbedObject p_Object,
GrabbedObject.Info p_Info
)
Parameters:
p_ObjectContains information about the grabp_InfoContains information about the removed grabber
Implements Manus::Interaction::IGrabbable::OnRemovedInteractingInfo
The documentation for this class was generated from the following file api/unity-plugin/Scripts/Interaction/TurnableObject.cs