Table of Contents

Class View

Namespace
View

Methods

configureFunctionLogger

view.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)

Parameters

functionName String
enableFunction Boolean
enableParameters Boolean
enableExecutionTime Boolean

suitableGPUAvailable

returns true if a suitable device is found.

view.suitableGPUAvailable() -> core.Bool

Returns

Bool

True if a suitable device was found.

applyPlayingAnimations

apply the animations

Warning

This function is tagged as EXPERIMENTAL.

view.applyPlayingAnimations(time)

Parameters

time AnimationTime

Current time

getAnimationPlayerInfo

packs all AnimationPlayer-related info about an animation in an object

Warning

This function is tagged as EXPERIMENTAL.

view.getAnimationPlayerInfo(animation) -> view.AnimationPlayerInfo

Parameters

animation Animation

Animation to get info of

Returns

AnimationPlayerInfo

isAnimationPlaying

is this animation playing?

Warning

This function is tagged as EXPERIMENTAL.

view.isAnimationPlaying(animation) -> core.Bool

Parameters

animation Animation

Animation to check

Returns

Bool

pauseAllAnimation

pauses all animations

Warning

This function is tagged as EXPERIMENTAL.

view.pauseAllAnimation()

pauseAnimation

pauses an animation

Warning

This function is tagged as EXPERIMENTAL.

view.pauseAnimation(animation)

Parameters

animation Animation

Animation to pause

playAnimation

plays an animation

Warning

This function is tagged as EXPERIMENTAL.

view.playAnimation(animation, speed=1, loop=False)

Parameters

animation Animation

Animation to play

speed Double

Speed

loop Boolean

Should the animation loop?

resumeAllAnimation

resumes all animations

Warning

This function is tagged as EXPERIMENTAL.

view.resumeAllAnimation()

resumeAnimation

resumes an animation

Warning

This function is tagged as EXPERIMENTAL.

view.resumeAnimation(animation)

Parameters

animation Animation

Animation to resume

setAnimationFrame

set animation's current frame

Warning

This function is tagged as EXPERIMENTAL.

view.setAnimationFrame(animation, frame)

Parameters

animation Animation

Animation to set frame

frame AnimationTime

Frame to set

setAnimationLoop

set animation's looping status

Warning

This function is tagged as EXPERIMENTAL.

view.setAnimationLoop(animation, loop)

Parameters

animation Animation

Animation to set loop status

loop Boolean

Should the animation loop?

setAnimationSpeed

set animation's playing speed

Warning

This function is tagged as EXPERIMENTAL.

view.setAnimationSpeed(animation, speed)

Parameters

animation Animation

Animation to set speed

speed Double

The speed

stopAllAnimation

stops all animations

Warning

This function is tagged as EXPERIMENTAL.

view.stopAllAnimation(applyDefault=True)

Parameters

applyDefault Bool

Should the default position be applied

stopAnimation

stops an animation

Warning

This function is tagged as EXPERIMENTAL.

view.stopAnimation(animation, applyDefault=True)

Parameters

animation Animation

Animation to stop

applyDefault Bool

Should the default position be applied

getD3D11Texture

view.getD3D11Texture(renderMap, viewer) -> view.D3D11Texture

Parameters

renderMap RenderMap
viewer Viewer

Returns

D3D11Texture

getGLTextureHandle

view.getGLTextureHandle(renderMap, viewer) -> view.GLTextureHandle

Parameters

renderMap RenderMap
viewer Viewer

Returns

GLTextureHandle

getVulkanTexture

view.getVulkanTexture(renderMap, viewer) -> view.VulkanTexture

Parameters

renderMap RenderMap
viewer Viewer

Returns

VulkanTexture

createGPUScene

view.createGPUScene(roots, constructEdges) -> view.GPUScene

Parameters

roots OccurrenceList

Roots of the subtrees that will be uploaded to GPU

constructEdges Bool

Construct buffer to render edges colored by topology (slower to construct)

Returns

GPUScene

Identifier of the newly created GPU Scene

destroyGPUScene

view.destroyGPUScene(scene)

Parameters

scene GPUScene

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

view.getGlobalGPUScene() -> view.GPUScene

Returns

GPUScene

Identifier of the global GPU Scene

getOccurrenceIndex

Returns the occurrence index in the viewer buffers. Can be used for mapping an index retrieved in a GLTextureHandle id map.

view.getOccurrenceIndex(occurrence, scene) -> core.UInt

Parameters

occurrence Occurrence

Occurrence identifier

scene GPUScene

Scene identifier

Returns

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.

view.getSceneIndex(scene, viewer) -> core.UInt

Parameters

scene GPUScene

GPU scene identifier

viewer Viewer

Viewer identifier

Returns

UInt

GPU scene index

addGPUScene

Add a GPU scene to a viewer

view.addGPUScene(scene, viewer=-1)

Parameters

scene GPUScene

GPU Scene to render in the viewer

viewer Viewer

Viewer to modify

captureNextFrame

Debug: capture next frame with renderdoc (only if launched with renderdoc)

view.captureNextFrame(viewer)

Parameters

viewer Viewer

Viewer to capture

createViewer

Create a new viewer

view.createViewer(width, height, deferred, sharedContext, nbViews) -> view.Viewer

Parameters

width Int

Width of the viewer framebuffer

height Int

Height of the viewer framebuffer

deferred Bool

Deferred render mode

sharedContext GraphicsContext

Interop context handle

nbViews Int

Nb views

Returns

Viewer

destroyViewer

view.destroyViewer(viewer)

Parameters

viewer Viewer

Viewer to destroy

fitCamera

Set the viewer matrices to adjust the camera to the scene

view.fitCamera(direction, cameraType=1, fov=90, viewer=-1, fitToOccurrence=0)

Parameters

direction Vector3

Camera direction

cameraType CameraType

Camera type, Orthographic or Perspective

fov Angle

Field of view (perspective mode only)

viewer Viewer
fitToOccurrence Occurrence

getAutoClipping

Automatically compute the near and far planes depending on the scene

view.getAutoClipping(viewer, cameraPos) -> geom.Vector2

Parameters

viewer Viewer
cameraPos Vector3

Returns

Vector2

getViewerMatrices

view.getViewerMatrices(viewer) -> geom.Matrix4List, geom.Matrix4List, geom.Vector2

Parameters

viewer Viewer

Returns

Matrix4List

getViewerProperty

Get a viewer property value

view.getViewerProperty(propertyName, viewer) -> core.String

Parameters

propertyName String
viewer Viewer

Returns

String

getViewerPropertyInfo

Get a viewer property info

view.getViewerPropertyInfo(propertyName, viewer) -> core.PropertyInfo

Parameters

propertyName String
viewer Viewer

Returns

PropertyInfo

getViewerSize

Retrieve the viewport size of a viewer

view.getViewerSize(viewer) -> core.Int, core.Int

Parameters

viewer Viewer

Returns

Int

getViewerStats

view.getViewerStats(viewer) -> core.Int, core.Int

Parameters

viewer Viewer

Returns

Int

Number of rendered occurrences

listViewerProperties

Get the list of viewer properties

view.listViewerProperties(viewer) -> core.PropertyInfoList

Parameters

viewer Viewer

Returns

PropertyInfoList

pick

view.pick(x, y, viewer) -> scene.Occurrence, geom.Point3, core.Ident

Parameters

x Int
y Int
viewer Viewer

Returns

Occurrence

Picked occurrence, 0 if not occurrence picked

pickRectangle

view.pickRectangle(xMin, xMax, yMin, yMax, viewer, inDepth) -> scene.OccurrenceList

Parameters

xMin Int
xMax Int
yMin Int
yMax Int
viewer Viewer
inDepth Bool

Returns

OccurrenceList

List of picked occurrences

refreshViewer

Refresh the viewer

view.refreshViewer(viewer=-1, frameCount=1, forceUpdate=False)

Parameters

viewer Viewer

Viewer to refresh

frameCount Int

Number of frames to render

forceUpdate Boolean

Force the viewer to update pending modification on the geometry. By default this is disabled while running process

removeGPUScene

Remove a viewer root

view.removeGPUScene(scene, viewer=-1)

Parameters

scene GPUScene

GPU Scene to remove from the viewer

viewer Viewer

Viewer to modify

resizeViewer

view.resizeViewer(width, height, viewer=-1)

Parameters

width Int

Width of the viewer framebuffer

height Int

Height of the viewer framebuffer

viewer Viewer

setViewerMatrices

view.setViewerMatrices(views, projs, clipping, viewer=-1)

Parameters

views Matrix4List
projs Matrix4List
clipping Vector2
viewer Viewer

setViewerProperty

Set a viewer property value

view.setViewerProperty(propertyName, propertyValue, viewer=-1)

Parameters

propertyName String
propertyValue String
viewer Viewer

getCompositedImage

view.getCompositedImage(viewer) -> material.ImageDefinition

Parameters

viewer Viewer

Returns

ImageDefinition

Returned composited image

getRenderMapImage

view.getRenderMapImage(viewer, renderMap) -> material.ImageDefinition

Parameters

viewer Viewer
renderMap RenderMap

Returns

ImageDefinition

Returned composited image

takeScreenshot

view.takeScreenshot(fileName, viewer)

Parameters

fileName OutputFilePath

Path where to save the screenshot

viewer Viewer

createStreamedViewer

create a viewer for streaming

view.createStreamedViewer(width, height, encoderSettings, webStreaming) -> view.StreamedViewerInfo

Parameters

width Int

Width of the viewer framebuffer

height Int

Height of the viewer framebuffer

encoderSettings EncoderSettings

Settings used for the encoder

webStreaming Bool

Start a websocket server

Returns

StreamedViewerInfo

Port and host for stream connection

startRecording

record viewer in a file

view.startRecording(filePath, viewer, encoderSettings)

Parameters

filePath String

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

view.stopRecording(viewer)

Parameters

viewer Viewer

Viewer to use for recording video

visibilityShoot

Render one frame of the visibility session

view.visibilityShoot(viewer, parts, patches, polygons, countOnce) -> scene.OccurrenceList

Parameters

viewer Viewer

Viewer to use for the visibility shoot

parts Bool

If false, optimize when parts seen are not wanted

patches Bool

If false, optimize when patches seen are not wanted

polygons Bool

If false, optimize when polygons seen are not wanted

countOnce Bool

Optimize when it is not needed to count the numbers of pixels seen during the session

Returns

OccurrenceList

The list of scene paths seen from this shoot

AfterFramebufferCreate

def onAfterFramebufferCreate(viewer):
    pass

id = view.addAfterFramebufferCreateCallback(onAfterFramebufferCreate)

...

view.removeAfterFramebufferCreateCallback(id)

Parameters

viewer Viewer

AfterViewerPropertyChanged

def onAfterViewerPropertyChanged(viewer, property):
    pass

id = view.addAfterViewerPropertyChangedCallback(onAfterViewerPropertyChanged)

...

view.removeAfterViewerPropertyChangedCallback(id)

Parameters

viewer Viewer

Viewer id

property String

Property changed

BeforeFramebufferDelete

def onBeforeFramebufferDelete(viewer):
    pass

id = view.addBeforeFramebufferDeleteCallback(onBeforeFramebufferDelete)

...

view.removeBeforeFramebufferDeleteCallback(id)

Parameters

viewer Viewer

BeforeViewerPropertyChanged

def onBeforeViewerPropertyChanged(viewer, property):
    pass

id = view.addBeforeViewerPropertyChangedCallback(onBeforeViewerPropertyChanged)

...

view.removeBeforeViewerPropertyChangedCallback(id)

Parameters

viewer Viewer

Viewer id

property String

Property changed

AnimationPausedOrStopped

def onAnimationPausedOrStopped(animation):
    pass

id = view.addAnimationPausedOrStoppedCallback(onAnimationPausedOrStopped)

...

view.removeAnimationPausedOrStoppedCallback(id)

Parameters

animation Animation

Paused or stopped animation

AnimationPlayedOrResumed

def onAnimationPlayedOrResumed(animation):
    pass

id = view.addAnimationPlayedOrResumedCallback(onAnimationPlayedOrResumed)

...

view.removeAnimationPlayedOrResumedCallback(id)

Parameters

animation Animation

Played or resumed animation

AnimationPlayingStatusChanged

def onAnimationPlayingStatusChanged(animation, playInfo):
    pass

id = view.addAnimationPlayingStatusChangedCallback(onAnimationPlayingStatusChanged)

...

view.removeAnimationPlayingStatusChangedCallback(id)

Parameters

animation Animation

Paused or stopped animation

playInfo AnimationPlayerInfo

Animation info