Class IUsesDeviceSimulationSettingsMethods
Namespace: Unity.MARS
Syntax
public static class IUsesDeviceSimulationSettingsMethods
Methods
GetDeviceStartingPose(IUsesDeviceSimulationSettings)
Gets the world pose of the device at the start of simulation
Declaration
public static Pose GetDeviceStartingPose(this IUsesDeviceSimulationSettings obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesDeviceSimulationSettings | obj |
Returns
Type | Description |
---|---|
Pose | The world pose of the device at the start of simulation |
GetEnvironmentBounds(IUsesDeviceSimulationSettings)
Gets the bounds encapsulating the current environment, used to restrict device movement
Declaration
public static Bounds GetEnvironmentBounds(this IUsesDeviceSimulationSettings obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesDeviceSimulationSettings | obj |
Returns
Type | Description |
---|---|
Bounds | The bounds encapsulating the current environment, used to restrict device movement |
GetIsMovementEnabled(IUsesDeviceSimulationSettings)
Gets whether simulated device movement is enabled
Declaration
public static bool GetIsMovementEnabled(this IUsesDeviceSimulationSettings obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesDeviceSimulationSettings | obj |
Returns
Type | Description |
---|---|
Boolean | Whether simulated device movement is enabled |
GetVoxelSizeFromEnvironment(IUsesDeviceSimulationSettings)
Gets the plane discovery voxel size from any PlaneExtractionSettings component on the current environment.
Declaration
public static float? GetVoxelSizeFromEnvironment(this IUsesDeviceSimulationSettings obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesDeviceSimulationSettings | obj |
Returns
Type | Description |
---|---|
Nullable<Single> | The voxel size on the environment or null if there is none |
SubscribeEnvironmentChanged(IUsesDeviceSimulationSettings, Action)
Subscribe to the EnvironmentChanged event, which is called when the simulation environment changes
Declaration
public static void SubscribeEnvironmentChanged(this IUsesDeviceSimulationSettings obj, Action environmentChanged)
Parameters
Type | Name | Description |
---|---|---|
IUsesDeviceSimulationSettings | obj | |
Action | environmentChanged | The delegate to subscribe |
UnsubscribeEnvironmentChanged(IUsesDeviceSimulationSettings, Action)
Unsubscribe from the EnvironmentChanged event, which is called when the simulation environment changes
Declaration
public static void UnsubscribeEnvironmentChanged(this IUsesDeviceSimulationSettings obj, Action environmentChanged)
Parameters
Type | Name | Description |
---|---|---|
IUsesDeviceSimulationSettings | obj | |
Action | environmentChanged | The delegate to unsubscribe |