Class BaseSpatialMeshObserver
Inheritance
BaseSpatialMeshObserver
Implements
IDisposable
IEqualityComparer
Assembly: cs.temp.dll.dll
public abstract class BaseSpatialMeshObserver : BaseSpatialObserver, IMixedRealitySpatialAwarenessMeshObserver, IMixedRealitySpatialAwarenessObserver, IMixedRealityDataProvider, IMixedRealityService, IDisposable, IMixedRealityEventSource, IEqualityComparer
Constructors
Declaration
protected BaseSpatialMeshObserver(IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem, string name = null, uint priority = default(uint), BaseMixedRealityProfile profile = null)
Parameters
Fields
The backing field for Meshes, to allow the mesh observer implementation to track its meshes.
Declaration
protected readonly Dictionary<int, SpatialAwarenessMeshObject> meshes
Field Value
Declaration
protected MixedRealitySpatialAwarenessEventData<SpatialAwarenessMeshObject> meshEventData
Field Value
Event sent whenever a mesh is added.
Declaration
protected static readonly ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>> OnMeshAdded
Field Value
Event sent whenever a mesh is discarded.
Declaration
protected static readonly ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>> OnMeshRemoved
Field Value
Event sent whenever a mesh is updated.
Declaration
protected static readonly ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>> OnMeshUpdated
Field Value
Properties
Declaration
public SpatialAwarenessMeshDisplayOptions DisplayOption { get; set; }
Property Value
Declaration
public SpatialAwarenessMeshLevelOfDetail LevelOfDetail { get; set; }
Property Value
Declaration
public IReadOnlyDictionary<int, SpatialAwarenessMeshObject> Meshes { get; }
Property Value
Declaration
public int MeshPhysicsLayer { get; set; }
Property Value
Declaration
public int MeshPhysicsLayerMask { get; }
Property Value
The parent GameObject for all observed meshes to be placed under.
Declaration
protected virtual GameObject ObservedObjectParent { get; }
Property Value
Type |
Description |
GameObject |
|
Declaration
public Material OcclusionMaterial { get; set; }
Property Value
Type |
Description |
Material |
|
Declaration
public bool RecalculateNormals { get; set; }
Property Value
Declaration
public int TrianglesPerCubicMeter { get; set; }
Property Value
Declaration
public Material VisibleMaterial { get; set; }
Property Value
Type |
Description |
Material |
|
Methods
Applies the mesh display option to existing meshes when modified at runtime.
Declaration
protected virtual void ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions option)
Parameters
Updates the mesh physics layer for current mesh observations.
Declaration
protected virtual void ApplyUpdatedPhysicsLayer()
Initializes event data and creates the observer.
Declaration
public override void Initialize()
Overrides
Declaration
protected virtual int LookupTriangleDensity(SpatialAwarenessMeshLevelOfDetail levelOfDetail)
Parameters
Returns
Type |
Description |
Int32 |
The number of triangles per cubic meter that will result in the desired level of density.
|
Declaration
protected virtual void ReadProfile()
Implements
IDisposable
IEqualityComparer