C# Класс UnityEngine.VR.WSA.SurfaceObserver

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

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Dispose() публичный Метод

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
Результат void

RequestMeshAsync() публичный Метод

public RequestMeshAsync ( SurfaceData dataRequest, SurfaceDataReadyDelegate onDataReady ) : bool
dataRequest SurfaceData
onDataReady SurfaceDataReadyDelegate
Результат bool

SetVolumeAsAxisAlignedBox() публичный Метод

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.
Результат void

SetVolumeAsFrustum() публичный Метод

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.
Результат void

SetVolumeAsOrientedBox() публичный Метод

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.
Результат void

SetVolumeAsSphere() публичный Метод

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.
Результат void

SurfaceObserver() публичный Метод

Basic constructor for SurfaceObserver.

public SurfaceObserver ( ) : System
Результат System

Update() публичный Метод

public Update ( SurfaceChangedDelegate onSurfaceChanged ) : void
onSurfaceChanged SurfaceChangedDelegate
Результат void