Class SimulatedBodyTrackingProvider
Inheritance
Implements
Inherited Members
Namespace: Unity.MARS.Providers.Synthetic
Assembly: Unity.MARS.dll
Syntax
[ProviderSelectionOptions(-1073741824, null, false)]
public class SimulatedBodyTrackingProvider : SimulatedDataTrackingProvider<SynthesizedBody, IMarsBody>, IUsesFunctionalityInjection, IFunctionalitySubscriber<IProvidesFunctionalityInjection>, IFunctionalitySubscriber, IProvidesMarsBodyTracking, IFunctionalityProvider, IProvidesTraits<Pose>, IProvidesTraits<bool>, IProvidesTraits, IUsesMARSTrackableData<IMarsBody>
Methods
AddTrackableData(SynthesizedBody, MARSTrackingState)
Add data from the synthesized trackable. This is called when the trackable has started tracking for the first time and has been added to m_DiscoveredTrackables.
Declaration
protected override void AddTrackableData(SynthesizedBody synthesizedTrackable, MARSTrackingState trackingState)
Parameters
Type | Name | Description |
---|---|---|
SynthesizedBody | synthesizedTrackable | Synthesized trackable whose data to add |
MARSTrackingState | trackingState | Initial tracking quality of the trackable |
Overrides
GetBodies(List<IMarsBody>)
Get the currently tracked bodies
Declaration
public void GetBodies(List<IMarsBody> bodies)
Parameters
Type | Name | Description |
---|---|---|
List<IMarsBody> | bodies | A list of IMarsBody objects to which the currently tracked bodies will be added |
GetProvidedTraits()
Declaration
public TraitDefinition[] GetProvidedTraits()
Returns
Type | Description |
---|---|
TraitDefinition[] |
GetTrackingState(SynthesizedBody, Camera)
Get the tracking quality of the synthesized trackable relative to the MARS camera. This is where to check whether the trackable is within the camera frustum and whether it is occluded by other objects in m_EnvironmentPhysicsScene.
Declaration
protected override MARSTrackingState GetTrackingState(SynthesizedBody synthesizedTrackable, Camera marsCamera)
Parameters
Type | Name | Description |
---|---|---|
SynthesizedBody | synthesizedTrackable | |
Camera | marsCamera |
Returns
Type | Description |
---|---|
MARSTrackingState |
Overrides
RemoveTrackableData(SynthesizedBody)
Remove data from the synthesized trackable
Declaration
protected override void RemoveTrackableData(SynthesizedBody synthesizedTrackable)
Parameters
Type | Name | Description |
---|---|---|
SynthesizedBody | synthesizedTrackable | Synthesized trackable whose data to remove |
Overrides
UpdateTrackableData(SynthesizedBody, MARSTrackingState)
Update data from a synthesized trackable that has been previously discovered. The tracking quality may be Unknown, but this does not necessarily mean the data must be removed from the database.
Declaration
protected override void UpdateTrackableData(SynthesizedBody synthesizedTrackable, MARSTrackingState trackingState)
Parameters
Type | Name | Description |
---|---|---|
SynthesizedBody | synthesizedTrackable | Synthesized trackable whose data to update |
MARSTrackingState | trackingState | Current tracking quality of the trackable, may be used to limit which traits get updated |
Overrides
Events
BodyAdded
Called when a body becomes tracked for the first time
Declaration
public event Action<IMarsBody> BodyAdded
Event Type
Type | Description |
---|---|
Action<IMarsBody> |
BodyRemoved
Called when a tracked body is removed (lost)
Declaration
public event Action<IMarsBody> BodyRemoved
Event Type
Type | Description |
---|---|
Action<IMarsBody> |
BodyUpdated
Called when a tracked body has updated data
Declaration
public event Action<IMarsBody> BodyUpdated
Event Type
Type | Description |
---|---|
Action<IMarsBody> |