Class SpatialMappingSurface
The SpatialMappingObserver class encapsulates the SurfaceObserver into an easy to use object that handles managing the observed surfaces and the rendering of surface geometry.
Implements
Inherited Members
Namespace: Evergine.Framework.XR.SpatialMapping
Assembly: Evergine.Framework.dll
Syntax
public abstract class SpatialMappingSurface : IDisposable
  Constructors
SpatialMappingSurface(Guid, SpatialMappingObserver)
Initializes a new instance of the SpatialMappingSurface class.
Declaration
public SpatialMappingSurface(Guid id, SpatialMappingObserver spatialMappingObserver)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | id | The mesh id.  | 
      
| SpatialMappingObserver | spatialMappingObserver | The spatial mapping observer.  | 
      
Fields
Id
Gets the mesh Id.
Declaration
public readonly Guid Id
  Field Value
| Type | Description | 
|---|---|
| Guid | 
bounds
Bounding bound attribute.
Declaration
protected BoundingBox bounds
  Field Value
| Type | Description | 
|---|---|
| BoundingBox | 
mesh
Mesh attribute.
Declaration
protected Mesh mesh
  Field Value
| Type | Description | 
|---|---|
| Mesh | 
needSwap
Need swap attribute.
Declaration
protected bool needSwap
  Field Value
| Type | Description | 
|---|---|
| bool | 
orientation
Orientation quaternion attribute.
Declaration
protected Quaternion orientation
  Field Value
| Type | Description | 
|---|---|
| Quaternion | 
position
Position attribute.
Declaration
protected Vector3 position
  Field Value
| Type | Description | 
|---|---|
| Vector3 | 
scale
Scale attribute.
Declaration
protected Vector3 scale
  Field Value
| Type | Description | 
|---|---|
| Vector3 | 
swapLock
Lock object attribute.
Declaration
protected object swapLock
  Field Value
| Type | Description | 
|---|---|
| object | 
updateTime
Update time attribute.
Declaration
protected DateTimeOffset updateTime
  Field Value
| Type | Description | 
|---|---|
| DateTimeOffset | 
updatedMesh
Update mesh attribute.
Declaration
protected Mesh updatedMesh
  Field Value
| Type | Description | 
|---|---|
| Mesh | 
Properties
Bounds
Gets the Bounds of the model.
Declaration
public BoundingBox Bounds { get; }
  Property Value
| Type | Description | 
|---|---|
| BoundingBox | 
Mesh
Gets the surface mesh.
Declaration
public Mesh Mesh { get; }
  Property Value
| Type | Description | 
|---|---|
| Mesh | 
Orientation
Gets the surface mesh orientation.
Declaration
public Quaternion Orientation { get; }
  Property Value
| Type | Description | 
|---|---|
| Quaternion | 
Position
Gets the surface mesh position.
Declaration
public Vector3 Position { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector3 | 
Scale
Gets the surface mesh scale.
Declaration
public Vector3 Scale { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector3 | 
UpdateTime
Gets the updated time.
Declaration
public DateTimeOffset UpdateTime { get; }
  Property Value
| Type | Description | 
|---|---|
| DateTimeOffset | 
Methods
Destroy()
Destroy all resources of this instance.
Declaration
protected virtual void Destroy()
  DestroyMesh(Mesh)
Reset the VertexBuffer and IndexBuffer of the mesh.
Declaration
protected void DestroyMesh(Mesh mesh)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Mesh | mesh | The mesh to destroy.  | 
      
Dispose()
Public implementation of Dispose pattern callable by consumers.
Declaration
public void Dispose()
  Dispose(bool)
Protected implementation of Dispose pattern.
Declaration
protected virtual void Dispose(bool disposing)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | disposing | Dispose native elements.  | 
      
~SpatialMappingSurface()
Finalizes an instance of the SpatialMappingSurface class.
Declaration
protected ~SpatialMappingSurface()
  SwapMesh()
Swap the surface mesh.
Declaration
public virtual void SwapMesh()
  UpdateSurface()
Update this surface. Normally we need to triangulate an create the mesh.
Declaration
public abstract bool UpdateSurface()
  Returns
| Type | Description | 
|---|---|
| bool | Indicates if the surface has been updated suscessfully.  |