Class SolverHandler
This class handles the solver components that are attached to this GameObject
Inheritance
SolverHandler
Assembly: cs.temp.dll.dll
public class SolverHandler : MonoBehaviour
Fields
Declaration
protected Handedness currentTrackedHandedness
Field Value
Declaration
protected Handedness preferredTrackedHandedness
Field Value
Declaration
protected readonly List<Solver> solvers
Field Value
Properties
Add an additional offset of the tracked object to base the solver on. Useful for tracking something like a halo position above your head or off the side of a controller.
Declaration
public Vector3 AdditionalOffset { get; set; }
Property Value
Add an additional rotation on top of the tracked object. Useful for tracking what is essentially the up or right/left vectors.
Declaration
public Vector3 AdditionalRotation { get; set; }
Property Value
Declaration
public Vector3Smoothed AltScale { get; set; }
Property Value
Currently tracked hand or motion controller if applicable
Declaration
public Handedness CurrentTrackedHandedness { get; }
Property Value
The timestamp the solvers will use to calculate with.
Declaration
public float DeltaTime { get; set; }
Property Value
The position the solver is trying to move to.
Declaration
public Vector3 GoalPosition { get; set; }
Property Value
The rotation the solver is trying to rotate to.
Declaration
public Quaternion GoalRotation { get; set; }
Property Value
Type |
Description |
Quaternion |
|
The scale the solver is trying to scale to.
Declaration
public Vector3 GoalScale { get; set; }
Property Value
Controller side to favor and pick first if TrackedHandedness is set to both
Declaration
public Handedness PreferredTrackedHandedness { get; set; }
Property Value
List of solvers that this handler will manage and update
Declaration
public IReadOnlyCollection<Solver> Solvers { get; set; }
Property Value
Type |
Description |
IReadOnlyCollection<Solver> |
|
When TrackedTargetType is set to hands, use this specific joint to calculate position and orientation
Declaration
public TrackedHandJoint TrackedHandJoint { get; set; }
Property Value
If tracking hands or motion controllers, determines which hand(s) are valid attachments.
Declaration
public Handedness TrackedHandness { get; set; }
Property Value
Tracked object to calculate position and orientation from. If you want to manually override and use a scene object, use the TransformTarget field.
Declaration
public TrackedObjectType TrackedObjectToReference { get; set; }
Property Value
Tracked object to calculate position and orientation from. If you want to manually override and use a scene object, use the TransformTarget field.
Declaration
public TrackedObjectType TrackedTargetType { get; set; }
Property Value
Manual override for when TrackedTargetType is set to CustomOverride
Declaration
public Transform TransformOverride { set; }
Property Value
Type |
Description |
Transform |
|
The target transform that the solvers will act upon.
Declaration
public Transform TransformTarget { get; }
Property Value
Type |
Description |
Transform |
|
Whether or not this SolverHandler calls SolverUpdate() every frame. Only one SolverHandler should manage SolverUpdate(). This setting does not affect whether the Target Transform of this SolverHandler gets updated or not.
Declaration
public bool UpdateSolvers { get; set; }
Property Value
Methods
Declaration
protected virtual void AttachToNewTrackedObject()
Declaration
protected virtual void DetachFromCurrentTrackedObject()
Declaration
public static bool IsValidHandedness(Handedness hand)
Parameters
Returns
Declaration
public static bool IsValidTrackedObjectType(TrackedObjectType type)
Parameters
Returns
Declaration
protected void OnDestroy()
Declaration
public void RefreshTrackedObject()
Adds solver
to the list of Solvers guaranteeing inspector ordering.
Declaration
public void RegisterSolver(Solver solver)
Parameters
Type |
Name |
Description |
Solver |
solver |
|
Declaration
protected virtual void Start()
Removes solver
from the list of Solvers.
Declaration
public void UnregisterSolver(Solver solver)
Parameters
Type |
Name |
Description |
Solver |
solver |
|
Declaration
protected virtual void Update()