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

Momentumizer solver applies acceleration/velocity/friction to simulate momentum for an object being moved by other solvers/components More...

Inheritance diagram for HoloToolkit.Unity.SolverMomentumizer:
HoloToolkit.Unity.Solver

Public Member Functions

override void SolverUpdate ()
 
override 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...
 
- Public Member Functions inherited from HoloToolkit.Unity.Solver
void SolverUpdateEntry ()
 Tracks lifetime of the solver, disabling it when expired, and finally runs the orientation update logic 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...
 

Public Attributes

float resistance = 0.99f
 
float resistanceVelPower = 1.5f
 
float accelRate = 10f
 
float springiness = 0
 
bool SnapZ = true
 
- Public Attributes inherited from HoloToolkit.Unity.Solver
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

override 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...
 
- Protected Member Functions inherited from HoloToolkit.Unity.Solver
virtual void Awake ()
 
void UpdateTransformToGoal ()
 Updates all object orientations to the goal orientation for this solver, with smoothing accounted for (smoothing may be off) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from HoloToolkit.Unity.Solver
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...
 
- Protected Attributes inherited from HoloToolkit.Unity.Solver
SolverHandler solverHandler
 
- Properties inherited from HoloToolkit.Unity.Solver
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

Momentumizer solver applies acceleration/velocity/friction to simulate momentum for an object being moved by other solvers/components

Definition at line 11 of file SolverMomentumizer.cs.

Member Function Documentation

§ OnEnable()

override void HoloToolkit.Unity.SolverMomentumizer.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 from HoloToolkit.Unity.Solver.

Definition at line 38 of file SolverMomentumizer.cs.

§ SnapTo()

override void HoloToolkit.Unity.SolverMomentumizer.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 from HoloToolkit.Unity.Solver.

Definition at line 32 of file SolverMomentumizer.cs.

§ SolverUpdate()

override void HoloToolkit.Unity.SolverMomentumizer.SolverUpdate ( )
virtual

Implements HoloToolkit.Unity.Solver.

Definition at line 27 of file SolverMomentumizer.cs.

Member Data Documentation

§ accelRate

float HoloToolkit.Unity.SolverMomentumizer.accelRate = 10f

Definition at line 18 of file SolverMomentumizer.cs.

§ resistance

float HoloToolkit.Unity.SolverMomentumizer.resistance = 0.99f

Definition at line 14 of file SolverMomentumizer.cs.

§ resistanceVelPower

float HoloToolkit.Unity.SolverMomentumizer.resistanceVelPower = 1.5f

Definition at line 16 of file SolverMomentumizer.cs.

§ SnapZ

bool HoloToolkit.Unity.SolverMomentumizer.SnapZ = true

Definition at line 23 of file SolverMomentumizer.cs.

§ springiness

float HoloToolkit.Unity.SolverMomentumizer.springiness = 0

Definition at line 20 of file SolverMomentumizer.cs.


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