Class SpatialMappingSurface
The SpatialMappingObserver class encapsulates the SurfaceObserver into an easy-to-use object that manages the observed surfaces and the rendering of surface geometry.
Namespace: Evergine.Framework.XR.SpatialMapping
Assembly: Evergine.Framework.dll
Syntax
public abstract class SpatialMappingSurface
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 box attribute.
Declaration
protected BoundingBox bounds
Field Value
Type | Description |
---|---|
BoundingBox |
mesh
Mesh attribute.
Declaration
protected Mesh mesh
Field Value
Type | Description |
---|---|
Mesh |
needSwap
Necessary to swap the 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
Scaling attribute.
Declaration
protected Vector3 scale
Field Value
Type | Description |
---|---|
Vector3 |
swapLock
Lock object attribute.
Declaration
protected object swapLock
Field Value
Type | Description |
---|---|
object |
updateTime
Updates the time attribute.
Declaration
protected DateTimeOffset updateTime
Field Value
Type | Description |
---|---|
DateTimeOffset |
updatedMesh
Updates 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 position of the surface mesh.
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 update time.
Declaration
public DateTimeOffset UpdateTime { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
Methods
Destroy()
Destroys all resources of this instance.
Declaration
protected virtual void Destroy()
DestroyMesh(Mesh)
Resets the VertexBuffer and IndexBuffer of the mesh.
Declaration
protected void DestroyMesh(Mesh mesh)
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The mesh to reset. |
Dispose()
Public implementation of the Dispose pattern callable by consumers.
Declaration
public void Dispose()
Dispose(bool)
Protected implementation of the Dispose pattern.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Disposes of native elements. |
~SpatialMappingSurface()
Finalizes an instance of the SpatialMappingSurface class.
Declaration
protected ~SpatialMappingSurface()
SwapMesh()
Swaps the surface mesh.
Declaration
public virtual void SwapMesh()
UpdateSurface()
Update this surface. Normally, we need to triangulate and create the mesh.
Declaration
public abstract bool UpdateSurface()
Returns
Type | Description |
---|---|
bool | Indicates if the surface has been updated successfully. |