Class SteamVR_Action_Pose_Source
Inheritance
System.Object
SteamVR_Action_Pose_Source
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Assembly-CSharp.dll
Syntax
public class SteamVR_Action_Pose_Source : SteamVR_Action_In_Source, ISteamVR_Action_Pose, ISteamVR_Action_In_Source, ISteamVR_Action_Source
Fields
changeTolerance
The distance the pose needs to move/rotate before a change is detected
Declaration
public float changeTolerance
Field Value
Type |
Description |
System.Single |
|
lastPoseActionData
Declaration
protected InputPoseActionData_t lastPoseActionData
Field Value
poseAction
Declaration
protected SteamVR_Action_Pose poseAction
Field Value
poseActionData
Declaration
protected InputPoseActionData_t poseActionData
Field Value
poseActionData_size
Declaration
protected static uint poseActionData_size
Field Value
Type |
Description |
System.UInt32 |
|
predictedSecondsFromNow
The amount of time in the future (or past!) the input system will predict poses for. Default is one frame forward (at 90hz) to account for render time.
Declaration
public float predictedSecondsFromNow
Field Value
Type |
Description |
System.Single |
|
tempPoseActionData
Declaration
protected InputPoseActionData_t tempPoseActionData
Field Value
universeOrigin
Declaration
public ETrackingUniverseOrigin universeOrigin
Field Value
Properties
active
True if this action is bound and the ActionSet is active
Declaration
public override bool active { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
activeBinding
True if the action is bound
Declaration
public override bool activeBinding { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
activeOrigin
The handle to the origin of the component that was used to update this pose
Declaration
public override ulong activeOrigin { get; }
Property Value
Type |
Description |
System.UInt64 |
|
Overrides
angularVelocity
The local angular velocity of this pose relative to the universe origin
Declaration
public Vector3 angularVelocity { get; protected set; }
Property Value
Type |
Description |
UnityEngine.Vector3 |
|
changed
True when the orientation of the pose has changhed more than changeTolerance in the last update. Note: Will only return true if the action is also active.
Declaration
public override bool changed { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
deviceIsConnected
True if the device bound to this action and input source is connected
Declaration
public bool deviceIsConnected { get; }
Property Value
Type |
Description |
System.Boolean |
|
lastActive
If the action was active (ActionSet active and binding active) during the last update
Declaration
public override bool lastActive { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
lastActiveBinding
If the action's binding was active during the previous update
Declaration
public override bool lastActiveBinding { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
lastActiveOrigin
The handle to the origin of the component that was used to update the value for this action (for the previous update)
Declaration
public override ulong lastActiveOrigin { get; }
Property Value
Type |
Description |
System.UInt64 |
|
Overrides
lastAngularVelocity
The angular velocity for this pose during the previous update
Declaration
public Vector3 lastAngularVelocity { get; protected set; }
Property Value
Type |
Description |
UnityEngine.Vector3 |
|
lastChanged
The value of the action's 'changed' during the previous update
Declaration
public override bool lastChanged { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
lastDeviceIsConnected
True if the device bound to this action was connected during the previous update
Declaration
public bool lastDeviceIsConnected { get; }
Property Value
Type |
Description |
System.Boolean |
|
lastLocalPosition
The local position for this pose during the previous update
Declaration
public Vector3 lastLocalPosition { get; protected set; }
Property Value
Type |
Description |
UnityEngine.Vector3 |
|
lastLocalRotation
The local rotation for this pose during the previous update
Declaration
public Quaternion lastLocalRotation { get; protected set; }
Property Value
Type |
Description |
UnityEngine.Quaternion |
|
lastPoseIsValid
True if the pose was valid during the previous update
Declaration
public bool lastPoseIsValid { get; }
Property Value
Type |
Description |
System.Boolean |
|
lastTrackingState
The tracking state for this pose during the previous update
Declaration
public ETrackingResult lastTrackingState { get; }
Property Value
lastVelocity
The velocity for this pose during the previous update
Declaration
public Vector3 lastVelocity { get; protected set; }
Property Value
Type |
Description |
UnityEngine.Vector3 |
|
localPosition
The local position of this action relative to the universe origin
Declaration
public Vector3 localPosition { get; protected set; }
Property Value
Type |
Description |
UnityEngine.Vector3 |
|
localRotation
The local rotation of this action relative to the universe origin
Declaration
public Quaternion localRotation { get; protected set; }
Property Value
Type |
Description |
UnityEngine.Quaternion |
|
poseIsValid
True if the pose retrieved for this action and input source is valid (good data from the tracking source)
Declaration
public bool poseIsValid { get; }
Property Value
Type |
Description |
System.Boolean |
|
trackingState
The state of the tracking system that is used to create pose data (position, rotation, etc)
Declaration
public ETrackingResult trackingState { get; }
Property Value
velocity
The local velocity of this pose relative to the universe origin
Declaration
public Vector3 velocity { get; protected set; }
Property Value
Type |
Description |
UnityEngine.Vector3 |
|
Methods
CheckAndSendEvents()
Declaration
protected virtual void CheckAndSendEvents()
GetChanged()
Declaration
protected bool GetChanged()
Returns
Type |
Description |
System.Boolean |
|
GetPoseAtTimeOffset(Single, out Vector3, out Quaternion, out Vector3, out Vector3)
SteamVR keeps a log of past poses so you can retrieve old poses or estimated poses in the future by passing in a secondsFromNow value that is negative or positive.
Declaration
public bool GetPoseAtTimeOffset(float secondsFromNow, out Vector3 positionAtTime, out Quaternion rotationAtTime, out Vector3 velocityAtTime, out Vector3 angularVelocityAtTime)
Parameters
Type |
Name |
Description |
System.Single |
secondsFromNow |
The time offset in the future (estimated) or in the past (previously recorded) you want to get data from
|
UnityEngine.Vector3 |
positionAtTime |
|
UnityEngine.Quaternion |
rotationAtTime |
|
UnityEngine.Vector3 |
velocityAtTime |
|
UnityEngine.Vector3 |
angularVelocityAtTime |
|
Returns
Type |
Description |
System.Boolean |
true if we successfully returned a pose
|
GetUnityCoordinateAngularVelocity(Single, Single, Single)
Declaration
protected Vector3 GetUnityCoordinateAngularVelocity(float x, float y, float z)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Single |
y |
|
System.Single |
z |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
GetUnityCoordinateAngularVelocity(HmdVector3_t)
Declaration
protected Vector3 GetUnityCoordinateAngularVelocity(HmdVector3_t vector)
Parameters
Returns
Type |
Description |
UnityEngine.Vector3 |
|
GetUnityCoordinateVelocity(Single, Single, Single)
Declaration
protected Vector3 GetUnityCoordinateVelocity(float x, float y, float z)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Single |
y |
|
System.Single |
z |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
GetUnityCoordinateVelocity(HmdVector3_t)
Declaration
protected Vector3 GetUnityCoordinateVelocity(HmdVector3_t vector)
Parameters
Returns
Type |
Description |
UnityEngine.Vector3 |
|
GetVelocitiesAtTimeOffset(Single, out Vector3, out Vector3)
SteamVR keeps a log of past poses so you can retrieve old poses or estimated poses in the future by passing in a secondsFromNow value that is negative or positive.
Declaration
public bool GetVelocitiesAtTimeOffset(float secondsFromNow, out Vector3 velocityAtTime, out Vector3 angularVelocityAtTime)
Parameters
Type |
Name |
Description |
System.Single |
secondsFromNow |
The time offset in the future (estimated) or in the past (previously recorded) you want to get data from
|
UnityEngine.Vector3 |
velocityAtTime |
|
UnityEngine.Vector3 |
angularVelocityAtTime |
|
Returns
Type |
Description |
System.Boolean |
true if we successfully returned a pose
|
Initialize()
[Should not be called by user code]
Initializes the handle for the inputSource, the pose action data size, and any other related SteamVR data.
Declaration
public override void Initialize()
Overrides
[Should not be called by user code] Sets up the internals of the action source before SteamVR has been initialized.
Declaration
public override void Preinitialize(SteamVR_Action wrappingAction, SteamVR_Input_Sources forInputSource)
Parameters
Overrides
SetCacheVariables()
Declaration
protected void SetCacheVariables()
Update a transform's local position and local roation to match the pose.
Declaration
public void UpdateTransform(Transform transformToUpdate)
Parameters
Type |
Name |
Description |
UnityEngine.Transform |
transformToUpdate |
The transform of the object to be updated
|
UpdateValue()
[Should not be called by user code]
Updates the data for this action and this input source. Sends related events.
Declaration
public override void UpdateValue()
Overrides
UpdateValue(Boolean)
[Should not be called by user code]
Updates the data for this action and this input source. Sends related events.
Declaration
public virtual void UpdateValue(bool skipStateAndEventUpdates)
Parameters
Type |
Name |
Description |
System.Boolean |
skipStateAndEventUpdates |
|
Events
onActiveBindingChange
Event fires when the active state of the binding changes
Declaration
public event SteamVR_Action_Pose.ActiveChangeHandler onActiveBindingChange
Event Type
onActiveChange
Event fires when the active state (ActionSet active and binding active) changes
Declaration
public event SteamVR_Action_Pose.ActiveChangeHandler onActiveChange
Event Type
onChange
Event fires when the orientation of the pose changes more than the changeTolerance
Declaration
public event SteamVR_Action_Pose.ChangeHandler onChange
Event Type
onDeviceConnectedChanged
Event fires when the device bound to this action is connected or disconnected
Declaration
public event SteamVR_Action_Pose.DeviceConnectedChangeHandler onDeviceConnectedChanged
Event Type
onTrackingChanged
Event fires when the state of the tracking system that is used to create pose data (position, rotation, etc) changes
Declaration
public event SteamVR_Action_Pose.TrackingChangeHandler onTrackingChanged
Event Type
onUpdate
Event fires when the action is updated
Declaration
public event SteamVR_Action_Pose.UpdateHandler onUpdate
Event Type
onValidPoseChanged
Event fires when the state of the pose data retrieved for this action changes validity (good/bad data from the tracking source)
Declaration
public event SteamVR_Action_Pose.ValidPoseChangeHandler onValidPoseChanged
Event Type
Implements