Humanoid Control for Unity v4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Passer.Tracking.ViveTrackerComponent Class Reference

Description

A representation of a real-world Vive Tracker.

Inheritance diagram for Passer.Tracking.ViveTrackerComponent:
Passer.Tracking.SensorComponent

Public Member Functions

override void UpdateComponent ()
 Update the component manually.
 
virtual void Show (bool showModel)
 Show or hide the rendered model of the sensor.
 
virtual void StartComponent (Transform trackerTransform)
 Start the manual updating of the sensor.
 

Static Public Member Functions

static ViveTrackerComponent Get (Transform realWorld, Vector3 position, Quaternion rotation, string resourceName="HTC Vive Tracker")
 

Public Attributes

HTCViveTrackerProfile.InputDeviceTrackerCharacteristics trackerRole
 The tracker role as set in the SteamVR settings.
 
Tracker.Status status
 The tracking status of the sensor.
 
float rotationConfidence
 The confidence (0..1) of the tracked rotation.
 
float positionConfidence
 The confidence (0..1) of the tracked position.
 
bool autoUpdate = true
 Is used to set whether the sensor updates itself.
 
GameObject model
 

Protected Member Functions

override void Awake ()
 Initializes the sensor.
 
virtual void OnDeviceConnected (InputDevice device)
 Controller has connected.
 
virtual void OnDeviceDisconnected (InputDevice device)
 Controller has disconnected.
 
virtual void ShowModel (string resourceName)
 Try to add a rendered model to the sensor.
 
virtual void CreateModel (string resourceName)
 Add a rendered model to the sensor.
 
virtual void Start ()
 Starts the sensor.
 

Protected Attributes

InputDevice device
 
Transform trackerTransform
 The transform which is used as the root of the tracking space.
 
bool _show
 

Properties

virtual bool show [get, set]
 The render status of the sensor.
 
bool renderController [set]
 Enable or disable the renderers for this sensor.
 

Member Function Documentation

◆ Awake()

override void Passer.Tracking.ViveTrackerComponent.Awake ( )
protectedvirtual

Initializes the sensor.

When trackerTransform is null, it will be set automatically to the parent of this transform.

Reimplemented from Passer.Tracking.SensorComponent.

◆ OnDeviceConnected()

virtual void Passer.Tracking.ViveTrackerComponent.OnDeviceConnected ( InputDevice  device)
protectedvirtual

Controller has connected.

Parameters
deviceThe InputDevice of the controller

◆ OnDeviceDisconnected()

virtual void Passer.Tracking.ViveTrackerComponent.OnDeviceDisconnected ( InputDevice  device)
protectedvirtual

Controller has disconnected.

This also happens when the device is no longer tracked.

Parameters
deviceThe InputDevice of the controller

◆ UpdateComponent()

override void Passer.Tracking.ViveTrackerComponent.UpdateComponent ( )
virtual

Update the component manually.

This function is meant to be overridden

Reimplemented from Passer.Tracking.SensorComponent.

◆ ShowModel()

virtual void Passer.Tracking.SensorComponent.ShowModel ( string  resourceName)
protectedvirtualinherited

Try to add a rendered model to the sensor.

Parameters
resourceNameThe name of the resource to use for the model

No new model is added when it already has a model

◆ CreateModel()

virtual void Passer.Tracking.SensorComponent.CreateModel ( string  resourceName)
protectedvirtualinherited

Add a rendered model to the sensor.

Parameters
resourceNameThe name of the resource to use for the model

Any existing model will be destroyed and replaced.

◆ Show()

virtual void Passer.Tracking.SensorComponent.Show ( bool  showModel)
virtualinherited

Show or hide the rendered model of the sensor.

Parameters
showModelTrue will show the mode, False will hide it

◆ Start()

virtual void Passer.Tracking.SensorComponent.Start ( )
protectedvirtualinherited

Starts the sensor.

Does nothing at this moment.

Reimplemented in Passer.Tracking.HydraController, and Passer.Tracking.UnityXRHandSkeleton.

◆ StartComponent()

virtual void Passer.Tracking.SensorComponent.StartComponent ( Transform  trackerTransform)
virtualinherited

Start the manual updating of the sensor.

Parameters
trackerTransform

When this function has been called, autoUpdate will be disabled and the sensor will no longer update from Unity Updates. Instead, UpdateComponent needs to be called to update the sensor data

Member Data Documentation

◆ trackerRole

HTCViveTrackerProfile.InputDeviceTrackerCharacteristics Passer.Tracking.ViveTrackerComponent.trackerRole

The tracker role as set in the SteamVR settings.

See the Manage trackers option in the Controllers section of the SteamVR settings panel. See also HTC Vive Tracker

◆ autoUpdate

bool Passer.Tracking.SensorComponent.autoUpdate = true
inherited

Is used to set whether the sensor updates itself.

When enabled, the sensor will update itself. When disabled, StartComponent and UpdateComponent need to be called to update the tracking status.

Property Documentation

◆ show

virtual bool Passer.Tracking.SensorComponent.show
getsetinherited

The render status of the sensor.

When enabled, sensors with renderers attached will be rendered. When disabled, sensors will not be rendered.


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