Class BaseSpatialMapping
The SpatialMappingObserver class encapsulates the SurfaceObserver into an easy-to-use object that handles managing the observed surfaces and the rendering of surface geometry.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Components.XR
Assembly: Evergine.Components.dll
Syntax
[DataContract(Namespace = "Evergine.MixedReality.SpatialMapping")]
public abstract class BaseSpatialMapping : Behavior, IDependencyObject
Constructors
BaseSpatialMapping()
Initializes a new instance of the BaseSpatialMapping class.
Declaration
public BaseSpatialMapping()
Fields
MaxSurfaceUpdatesPerFrame
Maximum surface updates per frame.
Declaration
public uint MaxSurfaceUpdatesPerFrame
Field Value
Type | Description |
---|---|
uint |
spatialMappingObserver
Spatial Mapping Observer.
Declaration
protected SpatialMappingObserver spatialMappingObserver
Field Value
Type | Description |
---|---|
SpatialMappingObserver |
timerFactory
Timer factory.
Declaration
[BindService(true)]
protected TimerFactory timerFactory
Field Value
Type | Description |
---|---|
TimerFactory |
xrPlatform
The spatial mapping service.
Declaration
[BindService(true)]
protected XRPlatform xrPlatform
Field Value
Type | Description |
---|---|
XRPlatform |
Properties
Extents
Gets or sets the extent of the observation volume.
Declaration
public Vector3 Extents { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
ObtainNormals
Gets or sets a value indicating whether the normal information should be captured.
Declaration
public bool ObtainNormals { get; set; }
Property Value
Type | Description |
---|---|
bool |
TrianglesPerCubicMeter
Gets or sets the number of triangles to calculate per cubic meter.
Declaration
public float TrianglesPerCubicMeter { get; set; }
Property Value
Type | Description |
---|---|
float |
UpdateInterval
Gets or sets the spatial mapping update interval.
Declaration
public TimeSpan UpdateInterval { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
OnActivated()
Invoked when the object is activated once it is attached.
Declaration
protected override void OnActivated()
Overrides
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if everything is OK. |
Overrides
OnDeactivated()
Invoked when the object is deactivated.
Declaration
protected override void OnDeactivated()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
OnSurfaceChanged(Guid, SpatialMappingSurface, SurfaceChange)
Handles the SurfaceObserver's OnSurfaceChanged event.
Declaration
protected abstract void OnSurfaceChanged(Guid id, SpatialMappingSurface surface, SurfaceChange changeType)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | The identifier assigned to the surface that has changed. |
SpatialMappingSurface | surface | The surface. |
SurfaceChange | changeType | The type of change that occurred on the surface. |
Start()
Invoked to start the object.
Declaration
protected override void Start()
Overrides
Update(TimeSpan)
Allows this instance to execute custom logic during its Update
.
Declaration
protected override void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | The game time. |
Overrides
Remarks
UpdateSurfaces()
Updates surfaces.
Declaration
public void UpdateSurfaces()