AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
HoloToolkit.Unity.Solver Class Referenceabstract

SolverBase is the base abstract class for all Solvers to derive from. It provides state tracking, smoothing parameters and implementation, automatic solver system integration, and update order. Solvers may be used without a link, as long as UpdateLinkedTransform is false. More...

Inheritance diagram for HoloToolkit.Unity.Solver:
HoloToolkit.Unity.SolverBodyLock HoloToolkit.Unity.SolverConstantViewSize HoloToolkit.Unity.SolverInBetween HoloToolkit.Unity.SolverMomentumizer HoloToolkit.Unity.SolverOrbital HoloToolkit.Unity.SolverRadialView HoloToolkit.Unity.SolverSurfaceMagnetism

Public Member Functions

abstract void SolverUpdate ()
 
void SolverUpdateEntry ()
 Tracks lifetime of the solver, disabling it when expired, and finally runs the orientation update logic More...
 
virtual void SnapTo (Vector3 position, Quaternion rotation)
 SnapTo may be used to bypass smoothing to a certain position if the object is teleported or spawned More...
 
virtual void SnapGoalTo (Vector3 position, Quaternion rotation)
 SnapGoalTo only sets the goal orientation. Not really useful. More...
 
virtual void AddOffset (Vector3 offset)
 
void UpdateWorkingToGoal ()
 Updates the Working orientation (which may be the object, or the shared orientation) to the goal, with smoothing accounted for More...
 
void UpdateWorkingPosToGoal ()
 Updates only the working position to goal with smoothing More...
 
void UpdateWorkingRotToGoal ()
 Updates only the working rotation to goal with smoothing More...
 
void UpdateWorkingScaleToGoal ()
 Updates only the working scale to goal with smoothing More...
 

Static Public Member Functions

static Vector3 SmoothTo (Vector3 source, Vector3 goal, float deltaTime, float lerpTime)
 Lerps Vector3 source to goal, handles lerpTime of 0 More...
 
static Quaternion SmoothTo (Quaternion source, Quaternion goal, float deltaTime, float lerpTime)
 Slerps Quaternion source to goal, handles lerpTime of 0 More...
 

Public Attributes

bool UpdateLinkedTransform = false
 
float MoveLerpTime = 0.1f
 
float RotateLerpTime = 0.1f
 
float ScaleLerpTime = 0
 
bool MaintainScale = true
 
Vector3 GoalPosition
 
Quaternion GoalRotation
 
Vector3 GoalScale
 
bool Smoothing = true
 
float Lifetime = 0
 

Protected Member Functions

virtual void Awake ()
 
virtual void OnEnable ()
 Typically when a solver becomes enabled, it should update its internal state to the system, in case it was disabled far away More...
 
void UpdateTransformToGoal ()
 Updates all object orientations to the goal orientation for this solver, with smoothing accounted for (smoothing may be off) More...
 

Protected Attributes

SolverHandler solverHandler
 

Properties

Vector3 WorkingPos [get, set]
 WorkingPos automatically uses the shared position if the solver is set to use the 'linked transform'. UpdateLinkedTransform may be set to false, and a solver will automatically update the object directly, and not inherit work done by other solvers to the shared position More...
 
Quaternion WorkingRot [get, set]
 Rotation version of WorkingPos More...
 
Vector3 WorkingScale [get, set]
 Scale version of WorkingPos More...
 

Detailed Description

SolverBase is the base abstract class for all Solvers to derive from. It provides state tracking, smoothing parameters and implementation, automatic solver system integration, and update order. Solvers may be used without a link, as long as UpdateLinkedTransform is false.

Definition at line 15 of file Solver.cs.

Member Function Documentation

§ AddOffset()

virtual void HoloToolkit.Unity.Solver.AddOffset ( Vector3  offset)
virtual

Definition at line 125 of file Solver.cs.

§ Awake()

virtual void HoloToolkit.Unity.Solver.Awake ( )
protectedvirtual

Definition at line 53 of file Solver.cs.

§ OnEnable()

virtual void HoloToolkit.Unity.Solver.OnEnable ( )
protectedvirtual

Typically when a solver becomes enabled, it should update its internal state to the system, in case it was disabled far away

Reimplemented in HoloToolkit.Unity.SolverMomentumizer.

Definition at line 69 of file Solver.cs.

§ SmoothTo() [1/2]

static Vector3 HoloToolkit.Unity.Solver.SmoothTo ( Vector3  source,
Vector3  goal,
float  deltaTime,
float  lerpTime 
)
static

Lerps Vector3 source to goal, handles lerpTime of 0

Parameters
source
goal
deltaTime
lerpTime
Returns

Definition at line 230 of file Solver.cs.

§ SmoothTo() [2/2]

static Quaternion HoloToolkit.Unity.Solver.SmoothTo ( Quaternion  source,
Quaternion  goal,
float  deltaTime,
float  lerpTime 
)
static

Slerps Quaternion source to goal, handles lerpTime of 0

Parameters
source
goal
deltaTime
lerpTime
Returns

Definition at line 243 of file Solver.cs.

§ SnapGoalTo()

virtual void HoloToolkit.Unity.Solver.SnapGoalTo ( Vector3  position,
Quaternion  rotation 
)
virtual

SnapGoalTo only sets the goal orientation. Not really useful.

Parameters
position
rotation

Definition at line 119 of file Solver.cs.

§ SnapTo()

virtual void HoloToolkit.Unity.Solver.SnapTo ( Vector3  position,
Quaternion  rotation 
)
virtual

SnapTo may be used to bypass smoothing to a certain position if the object is teleported or spawned

Parameters
position
rotation

Reimplemented in HoloToolkit.Unity.SolverMomentumizer.

Definition at line 106 of file Solver.cs.

§ SolverUpdate()

§ SolverUpdateEntry()

void HoloToolkit.Unity.Solver.SolverUpdateEntry ( )

Tracks lifetime of the solver, disabling it when expired, and finally runs the orientation update logic

Definition at line 89 of file Solver.cs.

§ UpdateTransformToGoal()

void HoloToolkit.Unity.Solver.UpdateTransformToGoal ( )
protected

Updates all object orientations to the goal orientation for this solver, with smoothing accounted for (smoothing may be off)

Definition at line 251 of file Solver.cs.

§ UpdateWorkingPosToGoal()

void HoloToolkit.Unity.Solver.UpdateWorkingPosToGoal ( )

Updates only the working position to goal with smoothing

Definition at line 299 of file Solver.cs.

§ UpdateWorkingRotToGoal()

void HoloToolkit.Unity.Solver.UpdateWorkingRotToGoal ( )

Updates only the working rotation to goal with smoothing

Definition at line 314 of file Solver.cs.

§ UpdateWorkingScaleToGoal()

void HoloToolkit.Unity.Solver.UpdateWorkingScaleToGoal ( )

Updates only the working scale to goal with smoothing

Definition at line 329 of file Solver.cs.

§ UpdateWorkingToGoal()

void HoloToolkit.Unity.Solver.UpdateWorkingToGoal ( )

Updates the Working orientation (which may be the object, or the shared orientation) to the goal, with smoothing accounted for

Definition at line 279 of file Solver.cs.

Member Data Documentation

§ GoalPosition

Vector3 HoloToolkit.Unity.Solver.GoalPosition

Definition at line 33 of file Solver.cs.

§ GoalRotation

Quaternion HoloToolkit.Unity.Solver.GoalRotation

Definition at line 36 of file Solver.cs.

§ GoalScale

Vector3 HoloToolkit.Unity.Solver.GoalScale

Definition at line 39 of file Solver.cs.

§ Lifetime

float HoloToolkit.Unity.Solver.Lifetime = 0

Definition at line 45 of file Solver.cs.

§ MaintainScale

bool HoloToolkit.Unity.Solver.MaintainScale = true

Definition at line 29 of file Solver.cs.

§ MoveLerpTime

float HoloToolkit.Unity.Solver.MoveLerpTime = 0.1f

Definition at line 22 of file Solver.cs.

§ RotateLerpTime

float HoloToolkit.Unity.Solver.RotateLerpTime = 0.1f

Definition at line 24 of file Solver.cs.

§ ScaleLerpTime

float HoloToolkit.Unity.Solver.ScaleLerpTime = 0

Definition at line 26 of file Solver.cs.

§ Smoothing

bool HoloToolkit.Unity.Solver.Smoothing = true

Definition at line 42 of file Solver.cs.

§ solverHandler

SolverHandler HoloToolkit.Unity.Solver.solverHandler
protected

Definition at line 49 of file Solver.cs.

§ UpdateLinkedTransform

bool HoloToolkit.Unity.Solver.UpdateLinkedTransform = false

Definition at line 19 of file Solver.cs.

Property Documentation

§ WorkingPos

Vector3 HoloToolkit.Unity.Solver.WorkingPos
getset

WorkingPos automatically uses the shared position if the solver is set to use the 'linked transform'. UpdateLinkedTransform may be set to false, and a solver will automatically update the object directly, and not inherit work done by other solvers to the shared position

Definition at line 136 of file Solver.cs.

§ WorkingRot

Quaternion HoloToolkit.Unity.Solver.WorkingRot
getset

Rotation version of WorkingPos

Definition at line 166 of file Solver.cs.

§ WorkingScale

Vector3 HoloToolkit.Unity.Solver.WorkingScale
getset

Scale version of WorkingPos

Definition at line 196 of file Solver.cs.


The documentation for this class was generated from the following file: