ViewInterface
Class
Read time 19 minutesLast updated 8 months ago
Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.View
public class ViewInterface : Interface
Methods
GetLastError
public static string GetLastError()
Returns
Type | Description |
|---|---|
| string |
ConfigureFunctionLogger
[HandleProcessCorruptedStateExceptions]public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters
DestroyContext
Destroy the Vulkan instance. All existing viewers and gpuScenes will also be destroyed and all view module properties will be reset.
[HandleProcessCorruptedStateExceptions]public void DestroyContext()
SuitableGPUAvailable
Returns true if a suitable device is found.
[HandleProcessCorruptedStateExceptions]public bool SuitableGPUAvailable()
Returns
Type | Description |
|---|---|
| bool |
AddAfterFramebufferCreateCallback
public uint AddAfterFramebufferCreateCallback(ViewInterface.AfterFramebufferCreateDelegate callback, IntPtr userData)
Parameters
Type | Name | Description |
|---|---|---|
| ViewInterface.AfterFramebufferCreateDelegate | callback | |
| IntPtr | userData |
Returns
Type | Description |
|---|---|
| uint |
RemoveAfterFramebufferCreateCallback
public void RemoveAfterFramebufferCreateCallback(uint id)
Parameters
Type | Name | Description |
|---|---|---|
| uint | id |
AddAfterViewerPropertyChangedCallback
public uint AddAfterViewerPropertyChangedCallback(ViewInterface.AfterViewerPropertyChangedDelegate callback, IntPtr userData)
Parameters
Type | Name | Description |
|---|---|---|
| ViewInterface.AfterViewerPropertyChangedDelegate | callback | |
| IntPtr | userData |
Returns
Type | Description |
|---|---|
| uint |
RemoveAfterViewerPropertyChangedCallback
public void RemoveAfterViewerPropertyChangedCallback(uint id)
Parameters
Type | Name | Description |
|---|---|---|
| uint | id |
AddBeforeFramebufferDeleteCallback
public uint AddBeforeFramebufferDeleteCallback(ViewInterface.BeforeFramebufferDeleteDelegate callback, IntPtr userData)
Parameters
Type | Name | Description |
|---|---|---|
| ViewInterface.BeforeFramebufferDeleteDelegate | callback | |
| IntPtr | userData |
Returns
Type | Description |
|---|---|
| uint |
RemoveBeforeFramebufferDeleteCallback
public void RemoveBeforeFramebufferDeleteCallback(uint id)
Parameters
Type | Name | Description |
|---|---|---|
| uint | id |
AddBeforeViewerPropertyChangedCallback
public uint AddBeforeViewerPropertyChangedCallback(ViewInterface.BeforeViewerPropertyChangedDelegate callback, IntPtr userData)
Parameters
Type | Name | Description |
|---|---|---|
| ViewInterface.BeforeViewerPropertyChangedDelegate | callback | |
| IntPtr | userData |
Returns
Type | Description |
|---|---|
| uint |
RemoveBeforeViewerPropertyChangedCallback
public void RemoveBeforeViewerPropertyChangedCallback(uint id)
Parameters
Type | Name | Description |
|---|---|---|
| uint | id |
ApplyPlayingAnimations
[HandleProcessCorruptedStateExceptions]public void ApplyPlayingAnimations(ulong time)
Parameters
Type | Name | Description |
|---|---|---|
| ulong | time | Current time. |
DebugAnimation
[HandleProcessCorruptedStateExceptions]public void DebugAnimation(uint animation)
Parameters
Type | Name | Description |
|---|---|---|
| uint | animation | Animation to debug. |
GetAnimationPlayerInfo
[HandleProcessCorruptedStateExceptions]public AnimationPlayerInfo GetAnimationPlayerInfo(uint animation)
Parameters
Type | Name | Description |
|---|---|---|
| uint | animation | Animation to get info of. |
Returns
Type | Description |
|---|---|
| AnimationPlayerInfo |
IsAnimationPlaying
[HandleProcessCorruptedStateExceptions]public bool IsAnimationPlaying(uint animation)
Parameters
Type | Name | Description |
|---|---|---|
| uint | animation | Animation to check. |
Returns
Type | Description |
|---|---|
| bool |
PauseAllAnimation
[HandleProcessCorruptedStateExceptions]public void PauseAllAnimation()
PauseAnimation
[HandleProcessCorruptedStateExceptions]public void PauseAnimation(uint animation)
Parameters
Type | Name | Description |
|---|---|---|
| uint | animation | Animation to pause. |
PlayAnimation
[HandleProcessCorruptedStateExceptions]public void PlayAnimation(uint animation, double speed = 1, bool loop = false)
Parameters
Type | Name | Description |
|---|---|---|
| uint | animation | Animation to play. |
| double | speed | Speed. |
| bool | loop | Should the animation loop?. |
ResumeAllAnimation
[HandleProcessCorruptedStateExceptions]public void ResumeAllAnimation()
ResumeAnimation
[HandleProcessCorruptedStateExceptions]public void ResumeAnimation(uint animation)
Parameters
Type | Name | Description |
|---|---|---|
| uint | animation | Animation to resume. |
SetAnimationFrame
[HandleProcessCorruptedStateExceptions]public void SetAnimationFrame(uint animation, ulong frame)
Parameters
SetAnimationLoop
[HandleProcessCorruptedStateExceptions]public void SetAnimationLoop(uint animation, bool loop)
Parameters
SetAnimationSpeed
[HandleProcessCorruptedStateExceptions]public void SetAnimationSpeed(uint animation, double speed)
Parameters
StopAllAnimation
[HandleProcessCorruptedStateExceptions]public void StopAllAnimation(bool applyDefault = true)
Parameters
Type | Name | Description |
|---|---|---|
| bool | applyDefault | Should the default position be applied. |
StopAnimation
[HandleProcessCorruptedStateExceptions]public void StopAnimation(uint animation, bool applyDefault = true)
Parameters
Type | Name | Description |
|---|---|---|
| uint | animation | Animation to stop. |
| bool | applyDefault | Should the default position be applied. |
AddAnimationPausedOrStoppedCallback
public uint AddAnimationPausedOrStoppedCallback(ViewInterface.AnimationPausedOrStoppedDelegate callback, IntPtr userData)
Parameters
Type | Name | Description |
|---|---|---|
| ViewInterface.AnimationPausedOrStoppedDelegate | callback | |
| IntPtr | userData |
Returns
Type | Description |
|---|---|
| uint |
RemoveAnimationPausedOrStoppedCallback
public void RemoveAnimationPausedOrStoppedCallback(uint id)
Parameters
Type | Name | Description |
|---|---|---|
| uint | id |
AddAnimationPlayedOrResumedCallback
public uint AddAnimationPlayedOrResumedCallback(ViewInterface.AnimationPlayedOrResumedDelegate callback, IntPtr userData)
Parameters
Type | Name | Description |
|---|---|---|
| ViewInterface.AnimationPlayedOrResumedDelegate | callback | |
| IntPtr | userData |
Returns
Type | Description |
|---|---|
| uint |
RemoveAnimationPlayedOrResumedCallback
public void RemoveAnimationPlayedOrResumedCallback(uint id)
Parameters
Type | Name | Description |
|---|---|---|
| uint | id |
AddAnimationPlayingStatusChangedCallback
public uint AddAnimationPlayingStatusChangedCallback(ViewInterface.AnimationPlayingStatusChangedDelegate callback, IntPtr userData)
Parameters
Type | Name | Description |
|---|---|---|
| ViewInterface.AnimationPlayingStatusChangedDelegate | callback | |
| IntPtr | userData |
Returns
Type | Description |
|---|---|
| uint |
RemoveAnimationPlayingStatusChangedCallback
public void RemoveAnimationPlayingStatusChangedCallback(uint id)
Parameters
Type | Name | Description |
|---|---|---|
| uint | id |
GetD3D11Texture
[HandleProcessCorruptedStateExceptions]public IntPtr GetD3D11Texture(RenderMap renderMap, int viewer = -1)
Parameters
Returns
Type | Description |
|---|---|
| IntPtr |
GetGLTextureHandle
[HandleProcessCorruptedStateExceptions]public int GetGLTextureHandle(RenderMap renderMap, int viewer = -1)
Parameters
Returns
Type | Description |
|---|---|
| int |
GetVulkanTexture
[HandleProcessCorruptedStateExceptions]public IntPtr GetVulkanTexture(RenderMap renderMap, int viewer = -1)
Parameters
Returns
Type | Description |
|---|---|
| IntPtr |
CreateGPUScene
[HandleProcessCorruptedStateExceptions]public int CreateGPUScene(OccurrenceList roots, bool constructEdges = false, bool useIsolate = true)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | Roots of the subtrees that will be uploaded to GPU. |
| bool | constructEdges | Construct buffer to render edges colored by topology (slower to construct). |
| bool | useIsolate | Indicates if the isolate manager should be used for visibility. |
Returns
Type | Description |
|---|---|
| int |
DestroyGPUScene
[HandleProcessCorruptedStateExceptions]public void DestroyGPUScene(int scene)
Parameters
Type | Name | Description |
|---|---|---|
| int | scene | GPU Scene to destroy (previously created by createGPUScene). |
GetDebugGPUScene
[HandleProcessCorruptedStateExceptions]public int GetDebugGPUScene()
Returns
Type | Description |
|---|---|
| int |
GetGlobalGPUScene
Returns (and create if it does not exist) a global GPU scene (with the scene root) to be used commonly by several clients.
[HandleProcessCorruptedStateExceptions]public int GetGlobalGPUScene()
Returns
Type | Description |
|---|---|
| int |
GetLastAABB
Return the lastAABB computed during a frame drawing, requires the viewer property ComputeLastAABB to be True.
[HandleProcessCorruptedStateExceptions]public AABB GetLastAABB(int scene, int viewer)
Parameters
Returns
Type | Description |
|---|---|
| AABB |
GetOccurrenceIndex
Returns the occurrence index in the viewer buffers. Can be used for mapping an index retrieved in a GLTextureHandle id map.
[HandleProcessCorruptedStateExceptions]public uint GetOccurrenceIndex(uint occurrence, int scene)
Parameters
Returns
Type | Description |
|---|---|
| uint |
GetSceneIndex
Returns the GPU scene index in the viewer buffers. Can be used for mapping an index retrieved in a GLTextureHandle id map.
[HandleProcessCorruptedStateExceptions]public uint GetSceneIndex(int scene, int viewer)
Parameters
Returns
Type | Description |
|---|---|
| uint |
LockGPUSceneUpdate
Lock the mutex that ensure no update of the gpu scene is done between lock/unlock.
[HandleProcessCorruptedStateExceptions]public void LockGPUSceneUpdate(int scene)
Parameters
Type | Name | Description |
|---|---|---|
| int | scene | Identifier of the GPU scene to lock update for. |
LockGPUScenesUpdate
Lock the mutex that ensure no update of multiple gpu scenes is done between lock/unlock.
[HandleProcessCorruptedStateExceptions]public void LockGPUScenesUpdate(GPUSceneList scenes)
Parameters
Type | Name | Description |
|---|---|---|
| GPUSceneList | scenes | Identifiers of the GPU scenes to lock update for. |
TryLockGPUSceneUpdate
Try to lock the mutex that ensure no update of the gpu scene is done between lock/unlock, returns true if the mutex has been locked, false if it was already locked.
[HandleProcessCorruptedStateExceptions]public bool TryLockGPUSceneUpdate(int scene)
Parameters
Type | Name | Description |
|---|---|---|
| int | scene | Identifier of the GPU scene to try to lock update for. |
Returns
Type | Description |
|---|---|
| bool |
TryLockGPUScenesUpdate
Try to lock the mutex that ensure no update of multiple gpu scenes is done between lock/unlock, returns true if the mutex has been locked, false if it was already locked.
[HandleProcessCorruptedStateExceptions]public BoolList TryLockGPUScenesUpdate(GPUSceneList scenes)
Parameters
Type | Name | Description |
|---|---|---|
| GPUSceneList | scenes | Identifiers of the GPU scenes to try to lock update for. |
Returns
Type | Description |
|---|---|
| BoolList |
UnlockGPUSceneUpdate
Unlock the mutex that ensure no update of the gpu scene is done between lock/unlock.
[HandleProcessCorruptedStateExceptions]public void UnlockGPUSceneUpdate(int scene)
Parameters
Type | Name | Description |
|---|---|---|
| int | scene | Identifier of the GPU scene to unlock update for. |
UnlockGPUScenesUpdate
Unlock the mutex that ensure no update of multiple gpu scenes is done between lock/unlock.
[HandleProcessCorruptedStateExceptions]public void UnlockGPUScenesUpdate(GPUSceneList scenes)
Parameters
Type | Name | Description |
|---|---|---|
| GPUSceneList | scenes | Identifiers of the GPU scenes to unlock update for. |
AddGPUScene
Add a GPU scene to a viewer.
[HandleProcessCorruptedStateExceptions]public void AddGPUScene(int scene, int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| int | scene | GPU Scene to render in the viewer. |
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
BeginRenderDocCapture
[HandleProcessCorruptedStateExceptions]public void BeginRenderDocCapture()
CaptureNextFrame
[HandleProcessCorruptedStateExceptions]public void CaptureNextFrame(int viewer)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer to capture. |
CreateViewer
Create a new viewer.
[HandleProcessCorruptedStateExceptions]public int CreateViewer(int width, int height, GraphicsContext sharedContext = null, int nbViews = 1)
Parameters
Type | Name | Description |
|---|---|---|
| int | width | Width of the viewer framebuffer. |
| int | height | Height of the viewer framebuffer. |
| GraphicsContext | sharedContext | Interop context handle. |
| int | nbViews | Nb views. |
Returns
Type | Description |
|---|---|
| int |
DestroyViewer
[HandleProcessCorruptedStateExceptions]public void DestroyViewer(int viewer)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer to destroy. |
DrawCappingPlane
Create an occurrence that holds the mesh of the surfaces that have been cut by the cutting plane.
[HandleProcessCorruptedStateExceptions]public uint DrawCappingPlane(uint cuttingPlane)
Parameters
Type | Name | Description |
|---|---|---|
| uint | cuttingPlane | Cutting plane component for which we create the capping plane. |
Returns
Type | Description |
|---|---|
| uint |
EndRenderDocCapture
[HandleProcessCorruptedStateExceptions]public void EndRenderDocCapture()
GetAutoClipping
Automatically compute the near and far planes depending on the scene.
[HandleProcessCorruptedStateExceptions]public Point2 GetAutoClipping(int viewer, Point3 cameraPos)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| Point3 | cameraPos |
Returns
Type | Description |
|---|---|
| Point2 |
GetCameraFrontAxis
Get the front axis of the nth view matrix of a given viewer.
[HandleProcessCorruptedStateExceptions]public Point3 GetCameraFrontAxis(int viewer = -1, uint matrixIndex = 0)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| uint | matrixIndex | Index of the view matrix to use. |
Returns
Type | Description |
|---|---|
| Point3 |
GetCameraPosition
Get the position of the nth view matrix of a given viewer.
[HandleProcessCorruptedStateExceptions]public Point3 GetCameraPosition(int viewer = -1, uint matrixIndex = 0)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| uint | matrixIndex | Index of the view matrix to use. |
Returns
Type | Description |
|---|---|
| Point3 |
GetCameraRightAxis
Get the right axis of the nth view matrix of a given viewer.
[HandleProcessCorruptedStateExceptions]public Point3 GetCameraRightAxis(int viewer = -1, uint matrixIndex = 0)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| uint | matrixIndex | Index of the view matrix to use. |
Returns
Type | Description |
|---|---|
| Point3 |
GetCameraUpAxis
Get the up axis of the nth view matrix of a given viewer.
[HandleProcessCorruptedStateExceptions]public Point3 GetCameraUpAxis(int viewer = -1, uint matrixIndex = 0)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| uint | matrixIndex | Index of the view matrix to use. |
Returns
Type | Description |
|---|---|
| Point3 |
GetViewerProperty
Get a viewer property value.
[HandleProcessCorruptedStateExceptions]public string GetViewerProperty(string propertyName, int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| string | propertyName | |
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
Returns
Type | Description |
|---|---|
| string |
GetViewerPropertyInfo
Get a viewer property info.
[HandleProcessCorruptedStateExceptions]public PropertyInfo GetViewerPropertyInfo(string propertyName, int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| string | propertyName | |
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
Returns
Type | Description |
|---|---|
| PropertyInfo |
GetViewerSize
Retrieve the viewport size of a viewer.
[HandleProcessCorruptedStateExceptions]public GetViewerSizeReturn GetViewerSize(int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
Returns
Type | Description |
|---|---|
| GetViewerSizeReturn |
GetViewerStats
Returns the number of rendered occurrences and triangles. (Warning: this function does not handle isolate nor invertVisibility viewer property).
[HandleProcessCorruptedStateExceptions]public GetViewerStatsReturn GetViewerStats(int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
Returns
Type | Description |
|---|---|
| GetViewerStatsReturn |
IdentifySelectedEdges
[HandleProcessCorruptedStateExceptions]public void IdentifySelectedEdges(int scene)
Parameters
Type | Name | Description |
|---|---|---|
| int | scene | Identifier of the GPU scene to identify the edges from. |
InvertSelectPrimitives
Invert the selection of the primitives (polygons, surfaces) contained in the given rectangle.
[HandleProcessCorruptedStateExceptions]public void InvertSelectPrimitives(int xMin, int xMax, int yMin, int yMax, PrimitiveSelectionType primitiveType, int viewer = -1)
Parameters
ListViewerProperties
Get the list of viewer properties.
[HandleProcessCorruptedStateExceptions]public PropertyInfoList ListViewerProperties(int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
Returns
Type | Description |
|---|---|
| PropertyInfoList |
Pick
[HandleProcessCorruptedStateExceptions]public PickReturn Pick(int x, int y, int viewer = -1)
Parameters
Returns
Type | Description |
|---|---|
| PickReturn |
PickRectangle
[HandleProcessCorruptedStateExceptions]public OccurrenceList PickRectangle(int xMin, int xMax, int yMin, int yMax, int viewer = -1, bool inDepth = false)
Parameters
Returns
Type | Description |
|---|---|
| OccurrenceList |
RefreshViewer
Refresh the viewer.
[HandleProcessCorruptedStateExceptions]public void RefreshViewer(int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer to refresh. |
RemoveGPUScene
Remove a viewer root.
[HandleProcessCorruptedStateExceptions]public void RemoveGPUScene(int scene, int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| int | scene | GPU Scene to remove from the viewer. |
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
ResizeViewer
[HandleProcessCorruptedStateExceptions]public void ResizeViewer(int width, int height, int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| int | width | Width of the viewer framebuffer. |
| int | height | Height of the viewer framebuffer. |
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
SelectPrimitives
Select the primitives (polygons, surfaces) contained in the given rectangle.
[HandleProcessCorruptedStateExceptions]public void SelectPrimitives(int xMin, int xMax, int yMin, int yMax, PrimitiveSelectionType primitiveType, int viewer = -1)
Parameters
SetDefaultViewerId
Set default viewer id. This viewer will be used in other functions taking a Viewer as a parameter. Useful if a viewer needs to be shared across different contexts.
[HandleProcessCorruptedStateExceptions]public void SetDefaultViewerId(int viewer)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer |
SetViewerProperty
Set a viewer property value.
[HandleProcessCorruptedStateExceptions]public void SetViewerProperty(string propertyName, string propertyValue, int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| string | propertyName | |
| string | propertyValue | |
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
UnselectPrimitives
Unselect the primitives (polygons, surfaces) contained in the given rectangle.
[HandleProcessCorruptedStateExceptions]public void UnselectPrimitives(int xMin, int xMax, int yMin, int yMax, PrimitiveSelectionType primitiveType, int viewer = -1)
Parameters
GetCompositedImage
[HandleProcessCorruptedStateExceptions]public ImageDefinition GetCompositedImage(int viewer)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer |
Returns
Type | Description |
|---|---|
| ImageDefinition |
GetRenderMapImage
[HandleProcessCorruptedStateExceptions]public ImageDefinition GetRenderMapImage(int viewer, RenderMap renderMap)
Parameters
Returns
Type | Description |
|---|---|
| ImageDefinition |
TakeScreenshot
[HandleProcessCorruptedStateExceptions]public void TakeScreenshot(string fileName, int viewer)
Parameters
CreateStreamedViewer
Create a viewer for streaming.
[HandleProcessCorruptedStateExceptions]public StreamedViewerInfo CreateStreamedViewer(int width, int height, EncoderSettings encoderSettings = null, bool useWebRTC = false, WebRTCInfo? webRTCInfo = null)
Parameters
Type | Name | Description |
|---|---|---|
| int | width | Width of the viewer framebuffer. |
| int | height | Height of the viewer framebuffer. |
| EncoderSettings | encoderSettings | Settings used for the encoder. |
| bool | useWebRTC | Switch between raw websockets and webRTC. |
| WebRTCInfo | webRTCInfo | Info for web rtc signaling connection. |
Returns
Type | Description |
|---|---|
| StreamedViewerInfo |
ResizeStreamedViewer
[HandleProcessCorruptedStateExceptions]public void ResizeStreamedViewer(int width, int height, int viewer = -1, EncoderSettings encoderSettings = null)
Parameters
Type | Name | Description |
|---|---|---|
| int | width | Width of the viewer framebuffer. |
| int | height | Height of the viewer framebuffer. |
| int | viewer | |
| EncoderSettings | encoderSettings | Settings used for the encoder. |
StartRecording
Record viewer in a file.
[HandleProcessCorruptedStateExceptions]public void StartRecording(string filePath, int viewer, EncoderSettings encoderSettings = null)
Parameters
Type | Name | Description |
|---|---|---|
| string | filePath | File in which video while be saved. |
| int | viewer | Viewer to use for recording video. |
| EncoderSettings | encoderSettings | Settings used for the encoder. |
StopRecording
Stop recording video.
[HandleProcessCorruptedStateExceptions]public void StopRecording(int viewer)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer to use for recording video. |
FitCamera
Set the viewer matrices to adjust the camera to the scene.
[HandleProcessCorruptedStateExceptions]public void FitCamera(Point3 direction, CameraType cameraType = CameraType.Orthographic, double fov = 90, int viewer = -1, OccurrenceList fitToOccurrences = null)
Parameters
Type | Name | Description |
|---|---|---|
| Point3 | direction | Camera direction. |
| CameraType | cameraType | Camera type, Orthographic or Perspective. |
| double | fov | Field of view (perspective mode only). |
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| OccurrenceList | fitToOccurrences |
GetViewerMatrices
[HandleProcessCorruptedStateExceptions]public GetViewerMatricesReturn GetViewerMatrices(int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
Returns
Type | Description |
|---|---|
| GetViewerMatricesReturn |
SetViewerMatrices
[HandleProcessCorruptedStateExceptions]public void SetViewerMatrices(Matrix4List views, Matrix4List projs, Point2 clipping, int viewer = -1)
Parameters
Type | Name | Description |
|---|---|---|
| Matrix4List | views | |
| Matrix4List | projs | |
| Point2 | clipping | |
| int | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
VisibilityShoot
Render one frame of the visibility session.
[HandleProcessCorruptedStateExceptions]public OccurrenceList VisibilityShoot(int viewer = -1, bool parts = true, bool patches = true, bool polygons = true, bool countOnce = false)
Parameters
Type | Name | Description |
|---|---|---|
| int | viewer | Viewer to use for the visibility shoot. |
| bool | parts | If false, optimize when parts seen are not wanted. |
| bool | patches | If false, optimize when patches seen are not wanted. |
| bool | polygons | If false, optimize when polygons seen are not wanted. |
| bool | countOnce | Optimize when it is not needed to count the numbers of pixels seen during the session. |
Returns
Type | Description |
|---|---|
| OccurrenceList |