Class SurfaceMeshesToPlanes
SurfaceMeshesToPlanes will find and create planes based on the meshes by a spatial awareness mesh observer.
Namespace: Microsoft.MixedReality.Toolkit.Experimental.SpatialAwareness
Assembly: cs.temp.dll.dll
Syntax
public class SurfaceMeshesToPlanes : MonoBehaviour
Properties
CanCreatePlanes
Indicates whether or not the project contains the required components for SurfaceMeshesToPlanes to enable plane creation.
Declaration
public static bool CanCreatePlanes { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
For SurfaceMeshesToPlanes to create planes, the Mixed Reality Toolkit Plane Finding package must be imported.
CeilingBuffer
Buffer to use when determining if a horizontal plane near the ceiling should be considered part of the ceiling.
Declaration
public float CeilingBuffer { get; set; }
Property Value
Type | Description |
---|---|
Single |
DefaultMaterial
Material used to render planes
Declaration
public Material DefaultMaterial { get; set; }
Property Value
Type | Description |
---|---|
Material |
DestroyPlanesMask
Determines which plane types should be discarded. Use this when the spatial mapping mesh is a better fit for the surface (ex: round tables).
Declaration
public SpatialAwarenessSurfaceTypes DestroyPlanesMask { get; set; }
Property Value
Type | Description |
---|---|
SpatialAwarenessSurfaceTypes |
DrawPlanesMask
Determines which plane types should be rendered
Declaration
public SpatialAwarenessSurfaceTypes DrawPlanesMask { get; set; }
Property Value
Type | Description |
---|---|
SpatialAwarenessSurfaceTypes |
FloorBuffer
Buffer to use when determining if a horizontal plane near the floor should be considered part of the floor.
Declaration
public float FloorBuffer { get; set; }
Property Value
Type | Description |
---|---|
Single |
MinArea
Minimum area required for a plane to be created.
Declaration
public float MinArea { get; set; }
Property Value
Type | Description |
---|---|
Single |
PhysicsLayer
The physics layer for planes to be set to
Declaration
public int PhysicsLayer { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
PlanesParent
Empty game object used to contain all planes created by the SurfaceToPlanes class
Declaration
public GameObject PlanesParent { get; set; }
Property Value
Type | Description |
---|---|
GameObject |
PlaneThickness
Thickness of rendered plane objects
Declaration
public float PlaneThickness { get; set; }
Property Value
Type | Description |
---|---|
Single |
UpNormalThreshold
Threshold for acceptable normals (the closer to 1, the stricter the standard). Used when determining plane type.
Declaration
public float UpNormalThreshold { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
GetActivePlanes(SpatialAwarenessSurfaceTypes)
Gets all active planes of the specified type(s).
Declaration
public List<GameObject> GetActivePlanes(SpatialAwarenessSurfaceTypes planeTypes)
Parameters
Type | Name | Description |
---|---|---|
SpatialAwarenessSurfaceTypes | planeTypes | A flag which includes all plane type(s) that should be returned. |
Returns
Type | Description |
---|---|
List<GameObject> | A collection of planes that match the expected type(s). |
MakePlanes()
Runs background task to create new planes based on data from mesh observers
Declaration
public void MakePlanes()