C# Class HoloToolkit.Unity.SpatialMappingSource

Inheritance: UnityEngine.MonoBehaviour
显示文件 Open project: Microsoft/HoloToolkit-Unity Class Usage Examples

Protected Properties

Property Type Description
componentsRequiredForSurfaceMesh System.Type[]

Public Methods

Method Description
GetMeshFilters ( ) : List

Gets all mesh filters that have a valid mesh.

GetMeshRenderers ( ) : List

Gets all mesh renderers that have been created.

Protected Methods

Method Description
AddSurfaceObject ( Mesh mesh, string objectName, Transform parentObject, int meshID ) : GameObject

Creates a new surface game object.

Awake ( ) : void
Cleanup ( ) : void

Cleans up references to objects that we have created.

RemoveSurfaceObject ( GameObject surface, bool removeAndDestroy = true ) : void

Removes and optionally destroys the specified surfaceObject that we've created

UpdateSurfaceObject ( GameObject gameObject, int meshID ) : void

Updates an existing surface object.

Method Details

AddSurfaceObject() protected method

Creates a new surface game object.
protected AddSurfaceObject ( Mesh mesh, string objectName, Transform parentObject, int meshID ) : GameObject
mesh UnityEngine.Mesh The mesh to attach. Can be null.
objectName string What to name this object.
parentObject UnityEngine.Transform What to parent this object to.
meshID int Optional user specified ID for the mesh.
return UnityEngine.GameObject

Awake() protected method

protected Awake ( ) : void
return void

Cleanup() protected method

Cleans up references to objects that we have created.
protected Cleanup ( ) : void
return void

GetMeshFilters() public method

Gets all mesh filters that have a valid mesh.
public GetMeshFilters ( ) : List
return List

GetMeshRenderers() public method

Gets all mesh renderers that have been created.
public GetMeshRenderers ( ) : List
return List

RemoveSurfaceObject() protected method

Removes and optionally destroys the specified surfaceObject that we've created
protected RemoveSurfaceObject ( GameObject surface, bool removeAndDestroy = true ) : void
surface UnityEngine.GameObject The surface game object
removeAndDestroy bool If true, the surface will be removed and destroyed. If false, it will only be removed.
return void

UpdateSurfaceObject() protected method

Updates an existing surface object.
protected UpdateSurfaceObject ( GameObject gameObject, int meshID ) : void
gameObject UnityEngine.GameObject Game object reference to the surfaceObject.
meshID int User specified ID for the mesh.
return void

Property Details

componentsRequiredForSurfaceMesh protected_oe property

When a mesh is created we will need to create a game object with a minimum set of components to contain the mesh. These are the required component types.
protected Type[],System componentsRequiredForSurfaceMesh
return System.Type[]