C# Class UnityEngine.VR.WSA.SurfaceObserver

SurfaceObserver is the main API portal for spatial mapping functionality in Unity.

Inheritance: IDisposable
Mostrar archivo Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Call Dispose when the SurfaceObserver is no longer needed. This will ensure that the object is cleaned up appropriately but will not affect any Meshes, components, or objects returned by RequestMeshAsync.

RequestMeshAsync ( SurfaceData dataRequest, SurfaceDataReadyDelegate onDataReady ) : bool
SetVolumeAsAxisAlignedBox ( Vector3 origin, Vector3 extents ) : void

This method sets the observation volume as an axis aligned box at the requested location. Successive calls can be used to reshape the observation volume and/or to move it in the scene as needed. Extents are the distance from the center of the box to its edges along each axis.

SetVolumeAsFrustum ( Plane planes ) : void

This method sets the observation volume as a frustum at the requested location. Successive calls can be used to reshape the observation volume and/or to move it in the scene as needed.

SetVolumeAsOrientedBox ( Vector3 origin, Vector3 extents, Quaternion orientation ) : void

This method sets the observation volume as an oriented box at the requested location. Successive calls can be used to reshape the observation volume and/or to move it in the scene as needed. Extents are the distance from the center of the box to its edges along each axis.

SetVolumeAsSphere ( Vector3 origin, float radiusMeters ) : void

This method sets the observation volume as a sphere at the requested location. Successive calls can be used to reshape the observation volume and/or to move it in the scene as needed.

SurfaceObserver ( ) : System

Basic constructor for SurfaceObserver.

Update ( SurfaceChangedDelegate onSurfaceChanged ) : void

Private Methods

Method Description
Destroy ( IntPtr observer ) : void
DestroyThreaded ( IntPtr observer ) : void
INTERNAL_CALL_Internal_Create ( SurfaceObserver self, IntPtr &value ) : void
INTERNAL_CALL_Internal_SetVolumeAsAxisAlignedBox ( SurfaceObserver self, IntPtr observer, Vector3 &origin, Vector3 &extents ) : void
INTERNAL_CALL_Internal_SetVolumeAsOrientedBox ( SurfaceObserver self, IntPtr observer, Vector3 &origin, Vector3 &extents, Quaternion &orientation ) : void
INTERNAL_CALL_Internal_SetVolumeAsSphere ( SurfaceObserver self, IntPtr observer, Vector3 &origin, float radiusMeters ) : void
Internal_AddToWorkQueue ( IntPtr observer, SurfaceDataReadyDelegate onDataReady, int surfaceId, MeshFilter filter, WorldAnchor wa, MeshCollider mc, float trisPerCubicMeter, bool createColliderData ) : bool
Internal_Create ( ) : IntPtr
Internal_SetVolumeAsAxisAlignedBox ( IntPtr observer, Vector3 origin, Vector3 extents ) : void
Internal_SetVolumeAsFrustum ( IntPtr observer, Plane planes ) : void
Internal_SetVolumeAsOrientedBox ( IntPtr observer, Vector3 origin, Vector3 extents, Quaternion orientation ) : void
Internal_SetVolumeAsSphere ( IntPtr observer, Vector3 origin, float radiusMeters ) : void
Internal_Update ( IntPtr observer, SurfaceChangedDelegate onSurfaceChanged ) : void
InvokeSurfaceChangedEvent ( SurfaceChangedDelegate onSurfaceChanged, int surfaceId, SurfaceChange changeType, Bounds bounds, long updateTime ) : void
InvokeSurfaceDataReadyEvent ( SurfaceDataReadyDelegate onDataReady, int surfaceId, MeshFilter outputMesh, WorldAnchor outputAnchor, MeshCollider outputCollider, float trisPerCubicMeter, bool bakeCollider, bool outputWritten, float elapsedBakeTimeSeconds ) : void

Method Details

Dispose() public method

Call Dispose when the SurfaceObserver is no longer needed. This will ensure that the object is cleaned up appropriately but will not affect any Meshes, components, or objects returned by RequestMeshAsync.

public Dispose ( ) : void
return void

RequestMeshAsync() public method

public RequestMeshAsync ( SurfaceData dataRequest, SurfaceDataReadyDelegate onDataReady ) : bool
dataRequest SurfaceData
onDataReady SurfaceDataReadyDelegate
return bool

SetVolumeAsAxisAlignedBox() public method

This method sets the observation volume as an axis aligned box at the requested location. Successive calls can be used to reshape the observation volume and/or to move it in the scene as needed. Extents are the distance from the center of the box to its edges along each axis.

public SetVolumeAsAxisAlignedBox ( Vector3 origin, Vector3 extents ) : void
origin Vector3 The origin of the requested observation volume.
extents Vector3 The extents in meters of the requested observation volume.
return void

SetVolumeAsFrustum() public method

This method sets the observation volume as a frustum at the requested location. Successive calls can be used to reshape the observation volume and/or to move it in the scene as needed.

public SetVolumeAsFrustum ( Plane planes ) : void
planes UnityEngine.Plane Planes defining the frustum as returned from GeometryUtility.CalculateFrustumPlanes.
return void

SetVolumeAsOrientedBox() public method

This method sets the observation volume as an oriented box at the requested location. Successive calls can be used to reshape the observation volume and/or to move it in the scene as needed. Extents are the distance from the center of the box to its edges along each axis.

public SetVolumeAsOrientedBox ( Vector3 origin, Vector3 extents, Quaternion orientation ) : void
origin Vector3 The origin of the requested observation volume.
extents Vector3 The extents in meters of the requested observation volume.
orientation UnityEngine.Quaternion The orientation of the requested observation volume.
return void

SetVolumeAsSphere() public method

This method sets the observation volume as a sphere at the requested location. Successive calls can be used to reshape the observation volume and/or to move it in the scene as needed.

public SetVolumeAsSphere ( Vector3 origin, float radiusMeters ) : void
origin Vector3 The origin of the requested observation volume.
radiusMeters float The radius in meters of the requested observation volume.
return void

SurfaceObserver() public method

Basic constructor for SurfaceObserver.

public SurfaceObserver ( ) : System
return System

Update() public method

public Update ( SurfaceChangedDelegate onSurfaceChanged ) : void
onSurfaceChanged SurfaceChangedDelegate
return void