Class View
Inheritance
Namespace:
Syntax
Methods
configureFunctionLogger
Declaration
view.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)Parameters
| Type | Name | Description | 
|---|---|---|
| String | functionName | |
| Boolean | enableFunction | |
| Boolean | enableParameters | |
| Boolean | enableExecutionTime | 
destroyContext
Destroy the Vulkan instance. All existing viewers and gpuScenes will also be destroyed and all view module properties will be reset
Declaration
view.destroyContext()suitableGPUAvailable
returns true if a suitable device is found.
Declaration
view.suitableGPUAvailable() -> core.BoolReturns
| Type | Description | 
|---|---|
| Bool | True if a suitable device was found. | 
applyPlayingAnimations
apply the animations
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.applyPlayingAnimations(time)Parameters
| Type | Name | Description | 
|---|---|---|
| AnimationTime | time | Current time | 
getAnimationPlayerInfo
packs all AnimationPlayer-related info about an animation in an object
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.getAnimationPlayerInfo(animation) -> view.AnimationPlayerInfoParameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to get info of | 
Returns
| Type | Description | 
|---|---|
| AnimationPlayerInfo | 
isAnimationPlaying
is this animation playing?
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.isAnimationPlaying(animation) -> core.BoolParameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to check | 
Returns
| Type | Description | 
|---|---|
| Bool | 
pauseAllAnimation
pauses all animations
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.pauseAllAnimation()pauseAnimation
pauses an animation
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.pauseAnimation(animation)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to pause | 
playAnimation
plays an animation
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.playAnimation(animation, speed=1, loop=False)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to play | 
| Double | speed | Speed | 
| Boolean | loop | Should the animation loop? | 
resumeAllAnimation
resumes all animations
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.resumeAllAnimation()resumeAnimation
resumes an animation
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.resumeAnimation(animation)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to resume | 
setAnimationFrame
set animation's current frame
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.setAnimationFrame(animation, frame)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to set frame | 
| AnimationTime | frame | Frame to set | 
setAnimationLoop
set animation's looping status
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.setAnimationLoop(animation, loop)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to set loop status | 
| Boolean | loop | Should the animation loop? | 
setAnimationSpeed
set animation's playing speed
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.setAnimationSpeed(animation, speed)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to set speed | 
| Double | speed | The speed | 
stopAllAnimation
stops all animations
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.stopAllAnimation(applyDefault=True)Parameters
| Type | Name | Description | 
|---|---|---|
| Bool | applyDefault | Should the default position be applied | 
stopAnimation
stops an animation
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
view.stopAnimation(animation, applyDefault=True)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Animation to stop | 
| Bool | applyDefault | Should the default position be applied | 
getD3D11Texture
Declaration
view.getD3D11Texture(renderMap, viewer=-1) -> view.D3D11TextureParameters
| Type | Name | Description | 
|---|---|---|
| RenderMap | renderMap | |
| Viewer | viewer | 
Returns
| Type | Description | 
|---|---|
| D3D11Texture | 
getGLTextureHandle
Declaration
view.getGLTextureHandle(renderMap, viewer=-1) -> view.GLTextureHandleParameters
| Type | Name | Description | 
|---|---|---|
| RenderMap | renderMap | |
| Viewer | viewer | 
Returns
| Type | Description | 
|---|---|
| GLTextureHandle | 
getVulkanTexture
Declaration
view.getVulkanTexture(renderMap, viewer=-1) -> view.VulkanTextureParameters
| Type | Name | Description | 
|---|---|---|
| RenderMap | renderMap | |
| Viewer | viewer | 
Returns
| Type | Description | 
|---|---|
| VulkanTexture | 
createGPUScene
See also:
Declaration
view.createGPUScene(roots, constructEdges=False, useIsolate=True) -> view.GPUSceneParameters
| 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 | 
|---|---|
| GPUScene | Identifier of the newly created GPU Scene | 
destroyGPUScene
See also:
Declaration
view.destroyGPUScene(scene)Parameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | scene | GPU Scene to destroy (previously created by createGPUScene) | 
getGlobalGPUScene
Returns (and create if it does not exist) a global GPU scene (with the scene root) to be used commonly by several clients
See also:
Declaration
view.getGlobalGPUScene() -> view.GPUSceneReturns
| Type | Description | 
|---|---|
| GPUScene | Identifier of the global GPU Scene | 
getLastAABB
Return the lastAABB computed during a frame drawing, requires the viewer property ComputeLastAABB to be True
See also:
Declaration
view.getLastAABB(scene, viewer) -> geom.AABBParameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | scene | Identifier of the GPU scene to get the last AABB from | 
| Viewer | viewer | 
Returns
| Type | Description | 
|---|---|
| AABB | The last scene AABB computed during the last frame | 
getOccurrenceIndex
Returns the occurrence index in the viewer buffers. Can be used for mapping an index retrieved in a GLTextureHandle id map.
See also:
Declaration
view.getOccurrenceIndex(occurrence, scene) -> core.UIntParameters
| Type | Name | Description | 
|---|---|---|
| Occurrence | occurrence | Occurrence identifier | 
| GPUScene | scene | Scene identifier | 
Returns
| Type | Description | 
|---|---|
| UInt | Occurrence index | 
getSceneIndex
Returns the GPU scene index in the viewer buffers. Can be used for mapping an index retrieved in a GLTextureHandle id map.
See also:
Declaration
view.getSceneIndex(scene, viewer) -> core.UIntParameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | scene | GPU scene identifier | 
| Viewer | viewer | Viewer identifier | 
Returns
| Type | Description | 
|---|---|
| UInt | GPU scene index | 
lockGPUSceneUpdate
Lock the mutex that ensure no update of the gpu scene is done between lock/unlock
See also:
Declaration
view.lockGPUSceneUpdate(scene)Parameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | 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
See also:
Declaration
view.lockGPUScenesUpdate(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
See also:
Declaration
view.tryLockGPUSceneUpdate(scene) -> core.BoolParameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | scene | Identifier of the GPU scene to try to lock update for | 
Returns
| Type | Description | 
|---|---|
| Bool | True if the mutex has been successfully locked | 
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
See also:
Declaration
view.tryLockGPUScenesUpdate(scenes) -> core.BoolListParameters
| Type | Name | Description | 
|---|---|---|
| GPUSceneList | scenes | Identifiers of the GPU scenes to try to lock update for | 
Returns
| Type | Description | 
|---|---|
| BoolList | For each scene, true if the mutex has been successfully locked | 
unlockGPUSceneUpdate
Unlock the mutex that ensure no update of the gpu scene is done between lock/unlock
See also:
Declaration
view.unlockGPUSceneUpdate(scene)Parameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | 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
See also:
Declaration
view.unlockGPUScenesUpdate(scenes)Parameters
| Type | Name | Description | 
|---|---|---|
| GPUSceneList | scenes | Identifiers of the GPU scenes to unlock update for | 
addGPUScene
Add a GPU scene to a viewer
See also:
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.addGPUScene(scene, viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | scene | GPU Scene to render in the viewer | 
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
createViewer
Create a new viewer
See also:
- view.addGPUScene
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.createViewer(width, height, sharedContext=view.GraphicsContext(), nbViews=1) -> view.ViewerParameters
| 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 | 
|---|---|
| Viewer | 
destroyViewer
See also:
- view.addGPUScene
- view.createViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.destroyViewer(viewer)Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer to destroy | 
drawCappingPlane
Create an occurrence that holds the mesh of the surfaces that have been cut by the cutting plane
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.drawCappingPlane(cuttingPlane) -> scene.OccurrenceParameters
| Type | Name | Description | 
|---|---|---|
| Component | cuttingPlane | Cutting plane component for which we create the capping plane | 
Returns
| Type | Description | 
|---|---|
| Occurrence | The created occurrence | 
getAutoClipping
Automatically compute the near and far planes depending on the scene
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getAutoClipping(viewer=-1, cameraPos) -> geom.Vector2Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
| Vector3 | cameraPos | 
Returns
| Type | Description | 
|---|---|
| Vector2 | 
getCameraFrontAxis
Get the front axis of the nth view matrix of a given viewer
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getCameraFrontAxis(viewer=-1, matrixIndex=0) -> geom.Vector3Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | 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 | 
|---|---|
| Vector3 | 
getCameraPosition
Get the position of the nth view matrix of a given viewer
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getCameraPosition(viewer=-1, matrixIndex=0) -> geom.Vector3Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | 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 | 
|---|---|
| Vector3 | 
getCameraRightAxis
Get the right axis of the nth view matrix of a given viewer
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getCameraRightAxis(viewer=-1, matrixIndex=0) -> geom.Vector3Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | 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 | 
|---|---|
| Vector3 | 
getCameraUpAxis
Get the up axis of the nth view matrix of a given viewer
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getCameraUpAxis(viewer=-1, matrixIndex=0) -> geom.Vector3Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | 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 | 
|---|---|
| Vector3 | 
getViewerProperty
Get a viewer property value
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getViewerProperty(propertyName, viewer=-1) -> core.StringParameters
| Type | Name | Description | 
|---|---|---|
| String | propertyName | |
| Viewer | 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
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getViewerPropertyInfo(propertyName, viewer=-1) -> core.PropertyInfoParameters
| Type | Name | Description | 
|---|---|---|
| String | propertyName | |
| Viewer | 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
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getViewerSize(viewer=-1) -> core.Int, core.IntParameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
Returns
| Type | Description | 
|---|---|
| Int | 
getViewerStats
Returns the number of rendered occurrences and triangles. (Warning: this function does not handle isolate nor invertVisibility viewer property)
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.getViewerStats(viewer=-1) -> core.Int, core.IntParameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
Returns
| Type | Description | 
|---|---|
| Int | Number of rendered occurrences | 
identifySelectedEdges
Identify selected edges
Warning
This function is tagged as EXPERIMENTAL.
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.identifySelectedEdges(scene)Parameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | 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
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.invertSelectPrimitives(xMin, xMax, yMin, yMax, primitiveType, viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| Int | xMin | |
| Int | xMax | |
| Int | yMin | |
| Int | yMax | |
| PrimitiveSelectionType | primitiveType | |
| Viewer | viewer | 
listViewerProperties
Get the list of viewer properties
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.listViewerProperties(viewer=-1) -> core.PropertyInfoListParameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
Returns
| Type | Description | 
|---|---|
| PropertyInfoList | 
pick
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.pick(x, y, viewer=-1) -> scene.Occurrence, geom.Point3, core.IdentParameters
| Type | Name | Description | 
|---|---|---|
| Int | x | |
| Int | y | |
| Viewer | viewer | 
Returns
| Type | Description | 
|---|---|
| Occurrence | Picked occurrence, 0 if not occurrence picked | 
pickRectangle
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.pickRectangle(xMin, xMax, yMin, yMax, viewer=-1, inDepth=False) -> scene.OccurrenceListParameters
| Type | Name | Description | 
|---|---|---|
| Int | xMin | |
| Int | xMax | |
| Int | yMin | |
| Int | yMax | |
| Viewer | viewer | |
| Bool | inDepth | 
Returns
| Type | Description | 
|---|---|
| OccurrenceList | List of picked occurrences | 
refreshViewer
Refresh the viewer
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.refreshViewer(viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer to refresh | 
removeGPUScene
Remove a viewer root
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.removeGPUScene(scene, viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| GPUScene | scene | GPU Scene to remove from the viewer | 
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
resizeViewer
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.resizeViewer(width, height, viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| Int | width | Width of the viewer framebuffer | 
| Int | height | Height of the viewer framebuffer | 
| Viewer | 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
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.setDefaultViewerId
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.selectPrimitives(xMin, xMax, yMin, yMax, primitiveType, viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| Int | xMin | |
| Int | xMax | |
| Int | yMin | |
| Int | yMax | |
| PrimitiveSelectionType | primitiveType | |
| Viewer | viewer | 
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.
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setViewerProperty
- view.unselectPrimitives
Declaration
view.setDefaultViewerId(viewer)Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | 
setViewerProperty
Set a viewer property value
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.unselectPrimitives
Declaration
view.setViewerProperty(propertyName, propertyValue, viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| String | propertyName | |
| String | propertyValue | |
| Viewer | 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
See also:
- view.addGPUScene
- view.createViewer
- view.destroyViewer
- view.drawCappingPlane
- view.getAutoClipping
- view.getCameraFrontAxis
- view.getCameraPosition
- view.getCameraRightAxis
- view.getCameraUpAxis
- view.getViewerProperty
- view.getViewerPropertyInfo
- view.getViewerSize
- view.getViewerStats
- view.identifySelectedEdges
- view.invertSelectPrimitives
- view.listViewerProperties
- view.pick
- view.pickRectangle
- view.refreshViewer
- view.removeGPUScene
- view.resizeViewer
- view.selectPrimitives
- view.setDefaultViewerId
- view.setViewerProperty
Declaration
view.unselectPrimitives(xMin, xMax, yMin, yMax, primitiveType, viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| Int | xMin | |
| Int | xMax | |
| Int | yMin | |
| Int | yMax | |
| PrimitiveSelectionType | primitiveType | |
| Viewer | viewer | 
getCompositedImage
See also:
Declaration
view.getCompositedImage(viewer) -> material.ImageDefinitionParameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | 
Returns
| Type | Description | 
|---|---|
| ImageDefinition | Returned composited image | 
getRenderMapImage
See also:
Declaration
view.getRenderMapImage(viewer, renderMap) -> material.ImageDefinitionParameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | |
| RenderMap | renderMap | 
Returns
| Type | Description | 
|---|---|
| ImageDefinition | Returned composited image | 
takeScreenshot
Declaration
view.takeScreenshot(fileName, viewer)Parameters
| Type | Name | Description | 
|---|---|---|
| OutputFilePath | fileName | Path where to save the screenshot | 
| Viewer | viewer | 
createStreamedViewer
create a viewer for streaming
See also:
Declaration
view.createStreamedViewer(width, height, encoderSettings=None, useWebRTC=False, webRTCInfo=None) -> view.StreamedViewerInfoParameters
| Type | Name | Description | 
|---|---|---|
| Int | width | Width of the viewer framebuffer | 
| Int | height | Height of the viewer framebuffer | 
| EncoderSettings | encoderSettings | Settings used for the encoder | 
| Boolean | useWebRTC | Switch between raw websockets and webRTC | 
| WebRTCInfo | webRTCInfo | Info for web rtc signaling connection | 
Returns
| Type | Description | 
|---|---|
| StreamedViewerInfo | Port and host for stream connection | 
resizeStreamedViewer
Declaration
view.resizeStreamedViewer(width, height, viewer=-1, encoderSettings=None)Parameters
| Type | Name | Description | 
|---|---|---|
| Int | width | Width of the viewer framebuffer | 
| Int | height | Height of the viewer framebuffer | 
| Viewer | viewer | |
| EncoderSettings | encoderSettings | Settings used for the encoder | 
startRecording
record viewer in a file
See also:
Declaration
view.startRecording(filePath, viewer, encoderSettings=None)Parameters
| Type | Name | Description | 
|---|---|---|
| String | filePath | File in which video while be saved | 
| Viewer | viewer | Viewer to use for recording video | 
| EncoderSettings | encoderSettings | Settings used for the encoder | 
stopRecording
stop recording video
See also:
Declaration
view.stopRecording(viewer)Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer to use for recording video | 
fitCamera
Set the viewer matrices to adjust the camera to the scene
See also:
Declaration
view.fitCamera(direction, cameraType=1, fov=90, viewer=-1, fitToOccurrences=[])Parameters
| Type | Name | Description | 
|---|---|---|
| Vector3 | direction | Camera direction | 
| CameraType | cameraType | Camera type, Orthographic or Perspective | 
| Angle | fov | Field of view (perspective mode only) | 
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
| OccurrenceList | fitToOccurrences | 
getViewerMatrices
See also:
Declaration
view.getViewerMatrices(viewer=-1) -> geom.Matrix4List, geom.Matrix4List, geom.Vector2Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
Returns
| Type | Description | 
|---|---|
| Matrix4List | 
setViewerMatrices
See also:
Declaration
view.setViewerMatrices(views, projs, clipping, viewer=-1)Parameters
| Type | Name | Description | 
|---|---|---|
| Matrix4List | views | |
| Matrix4List | projs | |
| Vector2 | clipping | |
| Viewer | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). | 
visibilityShoot
Render one frame of the visibility session
Declaration
view.visibilityShoot(viewer=-1, parts=True, patches=True, polygons=True, countOnce=False) -> scene.OccurrenceListParameters
| Type | Name | Description | 
|---|---|---|
| Viewer | 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 | The list of scene paths seen from this shoot | 
AfterFramebufferCreate
Declaration
def onAfterFramebufferCreate(viewer):
    pass
id = view.addAfterFramebufferCreateCallback(onAfterFramebufferCreate)
...
view.removeAfterFramebufferCreateCallback(id)Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | 
AfterViewerPropertyChanged
Declaration
def onAfterViewerPropertyChanged(viewer, property):
    pass
id = view.addAfterViewerPropertyChangedCallback(onAfterViewerPropertyChanged)
...
view.removeAfterViewerPropertyChangedCallback(id)Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer id | 
| String | property | Property changed | 
BeforeFramebufferDelete
Declaration
def onBeforeFramebufferDelete(viewer):
    pass
id = view.addBeforeFramebufferDeleteCallback(onBeforeFramebufferDelete)
...
view.removeBeforeFramebufferDeleteCallback(id)Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | 
BeforeViewerPropertyChanged
Declaration
def onBeforeViewerPropertyChanged(viewer, property):
    pass
id = view.addBeforeViewerPropertyChangedCallback(onBeforeViewerPropertyChanged)
...
view.removeBeforeViewerPropertyChangedCallback(id)Parameters
| Type | Name | Description | 
|---|---|---|
| Viewer | viewer | Viewer id | 
| String | property | Property changed | 
AnimationPausedOrStopped
Declaration
def onAnimationPausedOrStopped(animation):
    pass
id = view.addAnimationPausedOrStoppedCallback(onAnimationPausedOrStopped)
...
view.removeAnimationPausedOrStoppedCallback(id)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Paused or stopped animation | 
AnimationPlayedOrResumed
Declaration
def onAnimationPlayedOrResumed(animation):
    pass
id = view.addAnimationPlayedOrResumedCallback(onAnimationPlayedOrResumed)
...
view.removeAnimationPlayedOrResumedCallback(id)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Played or resumed animation | 
AnimationPlayingStatusChanged
Declaration
def onAnimationPlayingStatusChanged(animation, playInfo):
    pass
id = view.addAnimationPlayingStatusChangedCallback(onAnimationPlayingStatusChanged)
...
view.removeAnimationPlayingStatusChangedCallback(id)Parameters
| Type | Name | Description | 
|---|---|---|
| Animation | animation | Paused or stopped animation | 
| AnimationPlayerInfo | playInfo | Animation info |