TextStudio3DInteractionContext
public readonly struct TextStudio3DInteractionContextImmutable pointer snapshot carrying interaction identity, phase, world pose, pressure, time, and optional feedback output.
Constructors
Section titled “Constructors”
TextStudio3DInteractionContext(int, TextStudio3DInteractionSource, TextStudio3DHandedness, TextStudio3DInteractionPhase, TextStudio3DPointerButton, Vector3, Vector3, Ray, float, bool, double, ITextStudio3DFeedbackOutput)
Section titled “TextStudio3DInteractionContext(int, TextStudio3DInteractionSource, TextStudio3DHandedness, TextStudio3DInteractionPhase, TextStudio3DPointerButton, Vector3, Vector3, Ray, float, bool, double, ITextStudio3DFeedbackOutput)”public TextStudio3DInteractionContext(int pointerId, TextStudio3DInteractionSource source, TextStudio3DHandedness handedness, TextStudio3DInteractionPhase phase, TextStudio3DPointerButton button, Vector3 worldPosition, Vector3 worldNormal, Ray worldRay, float pressure = 1, bool isCanceled = false, double timestamp = -1, ITextStudio3DFeedbackOutput feedbackOutput = null)Creates an immutable pointer snapshot, normalizing pressure and world normal and using unscaled time when no timestamp is supplied.
Parameters
| Name | Type |
|---|---|
pointerId |
System.Int32 |
source |
TextStudio.ThreeD.TextStudio3DInteractionSource |
handedness |
TextStudio.ThreeD.TextStudio3DHandedness |
phase |
TextStudio.ThreeD.TextStudio3DInteractionPhase |
button |
TextStudio.ThreeD.TextStudio3DPointerButton |
worldPosition |
UnityEngine.Vector3 |
worldNormal |
UnityEngine.Vector3 |
worldRay |
UnityEngine.Ray |
pressure |
System.Single |
isCanceled |
System.Boolean |
timestamp |
System.Double |
feedbackOutput |
TextStudio.ThreeD.ITextStudio3DFeedbackOutput |
Methods
Section titled “Methods”
WithPhase(TextStudio3DInteractionPhase, bool)
Section titled “WithPhase(TextStudio3DInteractionPhase, bool)”public TextStudio3DInteractionContext WithPhase(TextStudio3DInteractionPhase phase, bool isCanceled = false)Creates a copy with a new interaction phase and cancellation state while preserving the original pose and timestamp.
Parameters
| Name | Type |
|---|---|
phase |
TextStudio.ThreeD.TextStudio3DInteractionPhase |
isCanceled |
System.Boolean |
Returns
TextStudio.ThreeD.TextStudio3DInteractionContext
WithPose(TextStudio3DInteractionPhase, Vector3, Vector3, Ray, float)
Section titled “WithPose(TextStudio3DInteractionPhase, Vector3, Vector3, Ray, float)”public TextStudio3DInteractionContext WithPose(TextStudio3DInteractionPhase phase, Vector3 worldPosition, Vector3 worldNormal, Ray worldRay, float pressure)Creates a copy with an updated phase and pointer pose stamped with the current unscaled time.
Parameters
| Name | Type |
|---|---|
phase |
TextStudio.ThreeD.TextStudio3DInteractionPhase |
worldPosition |
UnityEngine.Vector3 |
worldNormal |
UnityEngine.Vector3 |
worldRay |
UnityEngine.Ray |
pressure |
System.Single |
Returns
TextStudio.ThreeD.TextStudio3DInteractionContext
CreateProgrammatic(TextStudio3DInteractionPhase)
Section titled “CreateProgrammatic(TextStudio3DInteractionPhase)”public static TextStudio3DInteractionContext CreateProgrammatic(TextStudio3DInteractionPhase phase = TextStudio3DInteractionPhase.Activated)Creates a synthetic pointer context for activation or other commands initiated by script.
Parameters
| Name | Type |
|---|---|
phase |
TextStudio.ThreeD.TextStudio3DInteractionPhase |
Returns
TextStudio.ThreeD.TextStudio3DInteractionContext
Properties
Section titled “Properties”
PointerId
Section titled “PointerId”public int PointerId { get; }Returns
System.Int32
Source
Section titled “Source”public TextStudio3DInteractionSource Source { get; }Returns
TextStudio.ThreeD.TextStudio3DInteractionSource
Handedness
Section titled “Handedness”public TextStudio3DHandedness Handedness { get; }Returns
TextStudio.ThreeD.TextStudio3DHandedness
public TextStudio3DInteractionPhase Phase { get; }Returns
TextStudio.ThreeD.TextStudio3DInteractionPhase
Button
Section titled “Button”public TextStudio3DPointerButton Button { get; }Returns
TextStudio.ThreeD.TextStudio3DPointerButton
WorldPosition
Section titled “WorldPosition”public Vector3 WorldPosition { get; }Returns
UnityEngine.Vector3
WorldNormal
Section titled “WorldNormal”public Vector3 WorldNormal { get; }Returns
UnityEngine.Vector3
WorldRay
Section titled “WorldRay”public Ray WorldRay { get; }Returns
UnityEngine.Ray
Pressure
Section titled “Pressure”public float Pressure { get; }Returns
System.Single
IsCanceled
Section titled “IsCanceled”public bool IsCanceled { get; }Returns
System.Boolean
Timestamp
Section titled “Timestamp”public double Timestamp { get; }Returns
System.Double
FeedbackOutput
Section titled “FeedbackOutput”public ITextStudio3DFeedbackOutput FeedbackOutput { get; }Returns
TextStudio.ThreeD.ITextStudio3DFeedbackOutput