Language
Edit

DirectionalIndicator Class

Definition

This solver determines the position and orientation of an object as a directional indicator. From the point of reference of the SolverHandler Tracked Target, this indicator will orient towards the DirectionalTarget supplied. If the Directional Target is deemed within view of our frame of reference, then all renderers under this Solver will be disabled. They will be enabled otherwise

[UnityEngine.AddComponentMenu("MRTK/Spatial Manipulation/Solvers/Directional Indicator")]
public class DirectionalIndicator : MixedReality.Toolkit.SpatialManipulation.Solver
[<UnityEngine.AddComponentMenu("MRTK/Spatial Manipulation/Solvers/Directional Indicator")>]
type DirectionalIndicator = class
    inherit Solver
Public Class DirectionalIndicator
Inherits Solver
Inheritance
UnityEngine.MonoBehaviour
DirectionalIndicator
Attributes
UnityEngine.AddComponentMenuAttribute

Constructors

Name Description
DirectionalIndicator()

Fields

Name Description
DirectionalTarget

The GameObject transform to point the indicator towards when this object is not in view. The frame of reference for viewing is defined by the Solver Handler Tracked Target Type

MaxIndicatorScale

The maximum scale for the indicator object

MinIndicatorScale

The minimum scale for the indicator object

SolverHandler

The handler reference for this solver that's attached to this GameObject

(Inherited from Solver)
ViewOffset

The offset from center to place the indicator. If frame of reference is the camera, then the object will be this distance from center of screen

VisibilityScaleFactor

Multiplier factor to increase or decrease FOV range for testing if object is visible and thus turn off indicator

Properties

Name Description
GoalPosition

The final position to be attained

(Inherited from Solver)
GoalRotation

The final rotation to be attained

(Inherited from Solver)
GoalScale

The final scale to be attained

(Inherited from Solver)
MoveLerpTime

If 0, the position will update immediately. Otherwise, the greater this attribute the slower the position updates

(Inherited from Solver)
RotateLerpTime

If 0, the rotation will update immediately. Otherwise, the greater this attribute the slower the rotation updates")]

(Inherited from Solver)
ScaleLerpTime

If 0, the scale will update immediately. Otherwise, the greater this attribute the slower the scale updates

(Inherited from Solver)
Smoothing

If true, updates are smoothed to the target. Otherwise, they are snapped to the target

(Inherited from Solver)
UpdateLinkedTransform

If true, the position and orientation will be calculated, but not applied, for other components to use

(Inherited from Solver)
WorkingPosition

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

(Inherited from Solver)
WorkingRotation

Rotation version of WorkingPosition

(Inherited from Solver)
WorkingScale

Scale version of WorkingPosition

(Inherited from Solver)

Methods

Name Description
AddOffset(Vector3)

Add an offset position to the target goal position.

(Inherited from Solver)
Awake()

A Unity event function that is called when an enabled script instance is being loaded.

(Inherited from Solver)
OnDisable()

A Unity event function that is called when the script component has been disabled.

(Inherited from Solver)
OnEnable()

A Unity event function that is called when the script component has been enabled.

(Inherited from Solver)
SnapGoalTo(Vector3, Quaternion, Vector3)

SnapGoalTo only sets the goal orientation. Not really useful.

(Inherited from Solver)
SnapTo(Vector3, Quaternion, Vector3)

Snaps the solver to the desired pose.

(Inherited from Solver)
SolverUpdate()

Should be implemented in derived classes, but Solver can be used to flush shared transform to real transform

SolverUpdateEntry()

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

(Inherited from Solver)
Start()

A Unity event function that is called on the frame when a script is enabled just before any of the update methods are called the first time.

UpdateTransformToGoal()

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

(Inherited from Solver)
UpdateWorkingPositionToGoal()

Updates only the working position to goal with smoothing, if enabled

(Inherited from Solver)
UpdateWorkingRotationToGoal()

Updates only the working rotation to goal with smoothing, if enabled

(Inherited from Solver)
UpdateWorkingScaleToGoal()

Updates only the working scale to goal with smoothing, if enabled

(Inherited from Solver)
UpdateWorkingToGoal()

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

(Inherited from Solver)

Applies to