# View

> Python API functions

### configureFunctionLogger

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

Parameters

| Type                            | Name                | Description |
| ------------------------------- | ------------------- | ----------- |
| [String](./core_types#string)   | functionName        |             |
| [Boolean](./core_types#boolean) | enableFunction      |             |
| [Boolean](./core_types#boolean) | enableParameters    |             |
| [Boolean](./core_types#boolean) | enableExecutionTime |             |

### destroyContext

Destroy the Vulkan instance. All existing viewers and gpuScenes will also be destroyed and all view module properties will be reset.

```python
view.destroyContext()
```

### suitableGPUAvailable

Returns true if a suitable device is found.

```python
view.suitableGPUAvailable() -> core.Bool
```

Returns

| Type                      | Name  | Description                          |
| ------------------------- | ----- | ------------------------------------ |
| [Bool](./core_types#bool) | found | True if a suitable device was found. |

## Animation Player

### applyPlayingAnimations

> **Important:**
>
> This function is tagged as experimental.

Apply the animations.

```python
view.applyPlayingAnimations(time)
```

Parameters

| Type                                         | Name | Description   |
| -------------------------------------------- | ---- | ------------- |
| [AnimationTime](./scene_types#animationtime) | time | Current time. |

See also:

* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### getAnimationPlayerInfo

> **Important:**
>
> This function is tagged as experimental.

Packs all AnimationPlayer-related info about an animation in an object.

```python
view.getAnimationPlayerInfo(animation) -> view.AnimationPlayerInfo
```

Parameters

| Type                                 | Name      | Description               |
| ------------------------------------ | --------- | ------------------------- |
| [Animation](./scene_types#animation) | animation | Animation to get info of. |

Returns

| Type                                                    | Name                | Description |
| ------------------------------------------------------- | ------------------- | ----------- |
| [AnimationPlayerInfo](./view_types#animationplayerinfo) | animationPlayerInfo |             |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### isAnimationPlaying

> **Important:**
>
> This function is tagged as experimental.

Is this animation playing?.

```python
view.isAnimationPlaying(animation) -> core.Bool
```

Parameters

| Type                                 | Name      | Description         |
| ------------------------------------ | --------- | ------------------- |
| [Animation](./scene_types#animation) | animation | Animation to check. |

Returns

| Type                      | Name         | Description |
| ------------------------- | ------------ | ----------- |
| [Bool](./core_types#bool) | playingValue |             |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### pauseAllAnimation

> **Important:**
>
> This function is tagged as experimental.

Pauses all animations.

```python
view.pauseAllAnimation()
```

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### pauseAnimation

> **Important:**
>
> This function is tagged as experimental.

Pauses an animation.

```python
view.pauseAnimation(animation)
```

Parameters

| Type                                 | Name      | Description         |
| ------------------------------------ | --------- | ------------------- |
| [Animation](./scene_types#animation) | animation | Animation to pause. |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### playAnimation

> **Important:**
>
> This function is tagged as experimental.

Plays an animation.

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

Parameters

| Type                                 | Name      | Description                 |
| ------------------------------------ | --------- | --------------------------- |
| [Animation](./scene_types#animation) | animation | Animation to play.          |
| [Double](./core_types#double)        | speed     | Speed.                      |
| [Boolean](./core_types#boolean)      | loop      | Should the animation loop?. |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### resumeAllAnimation

> **Important:**
>
> This function is tagged as experimental.

Resumes all animations.

```python
view.resumeAllAnimation()
```

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### resumeAnimation

> **Important:**
>
> This function is tagged as experimental.

Resumes an animation.

```python
view.resumeAnimation(animation)
```

Parameters

| Type                                 | Name      | Description          |
| ------------------------------------ | --------- | -------------------- |
| [Animation](./scene_types#animation) | animation | Animation to resume. |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### setAnimationFrame

> **Important:**
>
> This function is tagged as experimental.

Set animation's current frame.

```python
view.setAnimationFrame(animation, frame)
```

Parameters

| Type                                         | Name      | Description             |
| -------------------------------------------- | --------- | ----------------------- |
| [Animation](./scene_types#animation)         | animation | Animation to set frame. |
| [AnimationTime](./scene_types#animationtime) | frame     | Frame to set.           |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### setAnimationLoop

> **Important:**
>
> This function is tagged as experimental.

Set animation's looping status.

```python
view.setAnimationLoop(animation, loop)
```

Parameters

| Type                                 | Name      | Description                   |
| ------------------------------------ | --------- | ----------------------------- |
| [Animation](./scene_types#animation) | animation | Animation to set loop status. |
| [Boolean](./core_types#boolean)      | loop      | Should the animation loop?.   |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### setAnimationSpeed

> **Important:**
>
> This function is tagged as experimental.

Set animation's playing speed.

```python
view.setAnimationSpeed(animation, speed)
```

Parameters

| Type                                 | Name      | Description             |
| ------------------------------------ | --------- | ----------------------- |
| [Animation](./scene_types#animation) | animation | Animation to set speed. |
| [Double](./core_types#double)        | speed     | The speed.              |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.stopAllAnimation](./view_functions#stopallanimation)
* [view.stopAnimation](./view_functions#stopanimation)

### stopAllAnimation

> **Important:**
>
> This function is tagged as experimental.

Stops all animations.

```python
view.stopAllAnimation(applyDefault=True)
```

Parameters

| Type                      | Name         | Description                             |
| ------------------------- | ------------ | --------------------------------------- |
| [Bool](./core_types#bool) | applyDefault | Should the default position be applied. |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAnimation](./view_functions#stopanimation)

### stopAnimation

> **Important:**
>
> This function is tagged as experimental.

Stops an animation.

```python
view.stopAnimation(animation, applyDefault=True)
```

Parameters

| Type                                 | Name         | Description                             |
| ------------------------------------ | ------------ | --------------------------------------- |
| [Animation](./scene_types#animation) | animation    | Animation to stop.                      |
| [Bool](./core_types#bool)            | applyDefault | Should the default position be applied. |

See also:

* [view.applyPlayingAnimations](./view_functions#applyplayinganimations)
* [view.getAnimationPlayerInfo](./view_functions#getanimationplayerinfo)
* [view.isAnimationPlaying](./view_functions#isanimationplaying)
* [view.pauseAllAnimation](./view_functions#pauseallanimation)
* [view.pauseAnimation](./view_functions#pauseanimation)
* [view.playAnimation](./view_functions#playanimation)
* [view.resumeAllAnimation](./view_functions#resumeallanimation)
* [view.resumeAnimation](./view_functions#resumeanimation)
* [view.setAnimationFrame](./view_functions#setanimationframe)
* [view.setAnimationLoop](./view_functions#setanimationloop)
* [view.setAnimationSpeed](./view_functions#setanimationspeed)
* [view.stopAllAnimation](./view_functions#stopallanimation)

## D3D11 interop

### getD3D11Texture

```python
view.getD3D11Texture(renderMap, viewer=-1) -> view.D3D11Texture
```

Parameters

| Type                                | Name      | Description |
| ----------------------------------- | --------- | ----------- |
| [RenderMap](./view_types#rendermap) | renderMap |             |
| [Viewer](./view_types#viewer)       | viewer    |             |

Returns

| Type                                      | Name   | Description |
| ----------------------------------------- | ------ | ----------- |
| [D3D11Texture](./view_types#d3d11texture) | handle |             |

## OpenGL interop

### getGLTextureHandle

```python
view.getGLTextureHandle(renderMap, viewer=-1) -> view.GLTextureHandle
```

Parameters

| Type                                | Name      | Description |
| ----------------------------------- | --------- | ----------- |
| [RenderMap](./view_types#rendermap) | renderMap |             |
| [Viewer](./view_types#viewer)       | viewer    |             |

Returns

| Type                                            | Name   | Description |
| ----------------------------------------------- | ------ | ----------- |
| [GLTextureHandle](./view_types#gltexturehandle) | handle |             |

## Vulkan interop

### getVulkanTexture

```python
view.getVulkanTexture(renderMap, viewer=-1) -> view.VulkanTexture
```

Parameters

| Type                                | Name      | Description |
| ----------------------------------- | --------- | ----------- |
| [RenderMap](./view_types#rendermap) | renderMap |             |
| [Viewer](./view_types#viewer)       | viewer    |             |

Returns

| Type                                        | Name   | Description |
| ------------------------------------------- | ------ | ----------- |
| [VulkanTexture](./view_types#vulkantexture) | handle |             |

## gpu scene

### createGPUScene

```python
view.createGPUScene(roots, constructEdges=False, useIsolate=True) -> view.GPUScene
```

Parameters

| Type                                           | Name           | Description                                                                 |
| ---------------------------------------------- | -------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | roots          | Roots of the subtrees that will be uploaded to GPU.                         |
| [Bool](./core_types#bool)                      | constructEdges | Construct buffer to render edges colored by topology (slower to construct). |
| [Bool](./core_types#bool)                      | useIsolate     | Indicates if the isolate manager should be used for visibility.             |

Returns

| Type                              | Name  | Description                                |
| --------------------------------- | ----- | ------------------------------------------ |
| [GPUScene](./view_types#gpuscene) | scene | Identifier of the newly created GPU Scene. |

See also:

* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### destroyGPUScene

```python
view.destroyGPUScene(scene)
```

Parameters

| Type                              | Name  | Description                                                  |
| --------------------------------- | ----- | ------------------------------------------------------------ |
| [GPUScene](./view_types#gpuscene) | scene | GPU Scene to destroy (previously created by createGPUScene). |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### getGlobalGPUScene

Returns (and create if it does not exist) a global GPU scene (with the scene root) to be used commonly by several clients.

```python
view.getGlobalGPUScene() -> view.GPUScene
```

Returns

| Type                              | Name  | Description                         |
| --------------------------------- | ----- | ----------------------------------- |
| [GPUScene](./view_types#gpuscene) | scene | Identifier of the global GPU Scene. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### getLastAABB

Return the lastAABB computed during a frame drawing, requires the viewer property ComputeLastAABB to be True.

```python
view.getLastAABB(scene, viewer) -> geom.AABB
```

Parameters

| Type                              | Name   | Description                                            |
| --------------------------------- | ------ | ------------------------------------------------------ |
| [GPUScene](./view_types#gpuscene) | scene  | Identifier of the GPU scene to get the last AABB from. |
| [Viewer](./view_types#viewer)     | viewer |                                                        |

Returns

| Type                      | Name | Description                                         |
| ------------------------- | ---- | --------------------------------------------------- |
| [AABB](./geom_types#aabb) | aabb | The last scene AABB computed during the last frame. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### getOccurrenceIndex

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

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

Parameters

| Type                                   | Name       | Description            |
| -------------------------------------- | ---------- | ---------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Occurrence identifier. |
| [GPUScene](./view_types#gpuscene)      | scene      | Scene identifier.      |

Returns

| Type                      | Name  | Description       |
| ------------------------- | ----- | ----------------- |
| [UInt](./core_types#uint) | index | Occurrence index. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### getSceneIndex

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

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

Parameters

| Type                              | Name   | Description           |
| --------------------------------- | ------ | --------------------- |
| [GPUScene](./view_types#gpuscene) | scene  | GPU scene identifier. |
| [Viewer](./view_types#viewer)     | viewer | Viewer identifier.    |

Returns

| Type                      | Name  | Description      |
| ------------------------- | ----- | ---------------- |
| [UInt](./core_types#uint) | index | GPU scene index. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### lockGPUSceneUpdate

Lock the mutex that ensure no update of the gpu scene is done between lock/unlock.

```python
view.lockGPUSceneUpdate(scene)
```

Parameters

| Type                              | Name  | Description                                     |
| --------------------------------- | ----- | ----------------------------------------------- |
| [GPUScene](./view_types#gpuscene) | scene | Identifier of the GPU scene to lock update for. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### lockGPUScenesUpdate

Lock the mutex that ensure no update of multiple gpu scenes is done between lock/unlock.

```python
view.lockGPUScenesUpdate(scenes)
```

Parameters

| Type                                      | Name   | Description                                       |
| ----------------------------------------- | ------ | ------------------------------------------------- |
| [GPUSceneList](./view_types#gpuscenelist) | scenes | Identifiers of the GPU scenes to lock update for. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### 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.

```python
view.tryLockGPUSceneUpdate(scene) -> core.Bool
```

Parameters

| Type                              | Name  | Description                                            |
| --------------------------------- | ----- | ------------------------------------------------------ |
| [GPUScene](./view_types#gpuscene) | scene | Identifier of the GPU scene to try to lock update for. |

Returns

| Type                      | Name   | Description                                     |
| ------------------------- | ------ | ----------------------------------------------- |
| [Bool](./core_types#bool) | locked | True if the mutex has been successfully locked. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### 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.

```python
view.tryLockGPUScenesUpdate(scenes) -> core.BoolList
```

Parameters

| Type                                      | Name   | Description                                              |
| ----------------------------------------- | ------ | -------------------------------------------------------- |
| [GPUSceneList](./view_types#gpuscenelist) | scenes | Identifiers of the GPU scenes to try to lock update for. |

Returns

| Type                              | Name   | Description                                                     |
| --------------------------------- | ------ | --------------------------------------------------------------- |
| [BoolList](./core_types#boollist) | locked | For each scene, true if the mutex has been successfully locked. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### unlockGPUSceneUpdate

Unlock the mutex that ensure no update of the gpu scene is done between lock/unlock.

```python
view.unlockGPUSceneUpdate(scene)
```

Parameters

| Type                              | Name  | Description                                       |
| --------------------------------- | ----- | ------------------------------------------------- |
| [GPUScene](./view_types#gpuscene) | scene | Identifier of the GPU scene to unlock update for. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUScenesUpdate](./view_functions#unlockgpuscenesupdate)

### unlockGPUScenesUpdate

Unlock the mutex that ensure no update of multiple gpu scenes is done between lock/unlock.

```python
view.unlockGPUScenesUpdate(scenes)
```

Parameters

| Type                                      | Name   | Description                                         |
| ----------------------------------------- | ------ | --------------------------------------------------- |
| [GPUSceneList](./view_types#gpuscenelist) | scenes | Identifiers of the GPU scenes to unlock update for. |

See also:

* [view.createGPUScene](./view_functions#creategpuscene)
* [view.destroyGPUScene](./view_functions#destroygpuscene)
* [view.getGlobalGPUScene](./view_functions#getglobalgpuscene)
* [view.getLastAABB](./view_functions#getlastaabb)
* [view.getOccurrenceIndex](./view_functions#getoccurrenceindex)
* [view.getSceneIndex](./view_functions#getsceneindex)
* [view.lockGPUSceneUpdate](./view_functions#lockgpusceneupdate)
* [view.lockGPUScenesUpdate](./view_functions#lockgpuscenesupdate)
* [view.tryLockGPUSceneUpdate](./view_functions#trylockgpusceneupdate)
* [view.tryLockGPUScenesUpdate](./view_functions#trylockgpuscenesupdate)
* [view.unlockGPUSceneUpdate](./view_functions#unlockgpusceneupdate)

## offscreen

### addGPUScene

Add a GPU scene to a viewer.

```python
view.addGPUScene(scene, viewer=-1)
```

Parameters

| Type                              | Name   | Description                                                                                              |
| --------------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| [GPUScene](./view_types#gpuscene) | scene  | GPU Scene to render in the viewer.                                                                       |
| [Viewer](./view_types#viewer)     | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

See also:

* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### createViewer

Create a new viewer.

```python
view.createViewer(width, height, sharedContext=view.GraphicsContext(), nbViews=1) -> view.Viewer
```

Parameters

| Type                                            | Name          | Description                       |
| ----------------------------------------------- | ------------- | --------------------------------- |
| [Int](./core_types#int)                         | width         | Width of the viewer framebuffer.  |
| [Int](./core_types#int)                         | height        | Height of the viewer framebuffer. |
| [GraphicsContext](./view_types#graphicscontext) | sharedContext | Interop context handle.           |
| [Int](./core_types#int)                         | nbViews       | Nb views.                         |

Returns

| Type                          | Name   | Description |
| ----------------------------- | ------ | ----------- |
| [Viewer](./view_types#viewer) | viewer |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### destroyViewer

```python
view.destroyViewer(viewer)
```

Parameters

| Type                          | Name   | Description        |
| ----------------------------- | ------ | ------------------ |
| [Viewer](./view_types#viewer) | viewer | Viewer to destroy. |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### drawCappingPlane

Create an occurrence that holds the mesh of the surfaces that have been cut by the cutting plane.

```python
view.drawCappingPlane(cuttingPlane) -> scene.Occurrence
```

Parameters

| Type                                 | Name         | Description                                                    |
| ------------------------------------ | ------------ | -------------------------------------------------------------- |
| [Component](./scene_types#component) | cuttingPlane | Cutting plane component for which we create the capping plane. |

Returns

| Type                                   | Name | Description             |
| -------------------------------------- | ---- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | root | The created occurrence. |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getAutoClipping

Automatically compute the near and far planes depending on the scene.

```python
view.getAutoClipping(viewer=-1, cameraPos) -> geom.Vector2
```

Parameters

| Type                            | Name      | Description                                                                                              |
| ------------------------------- | --------- | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer)   | viewer    | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| [Vector3](./geom_types#vector3) | cameraPos |                                                                                                          |

Returns

| Type                            | Name     | Description |
| ------------------------------- | -------- | ----------- |
| [Vector2](./geom_types#vector2) | clipping |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getCameraFrontAxis

Get the front axis of the nth view matrix of a given viewer.

```python
view.getCameraFrontAxis(viewer=-1, matrixIndex=0) -> geom.Vector3
```

Parameters

| Type                          | Name        | Description                                                                                              |
| ----------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer      | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| [UInt](./core_types#uint)     | matrixIndex | Index of the view matrix to use.                                                                         |

Returns

| Type                            | Name | Description |
| ------------------------------- | ---- | ----------- |
| [Vector3](./geom_types#vector3) | axis |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getCameraPosition

Get the position of the nth view matrix of a given viewer.

```python
view.getCameraPosition(viewer=-1, matrixIndex=0) -> geom.Vector3
```

Parameters

| Type                          | Name        | Description                                                                                              |
| ----------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer      | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| [UInt](./core_types#uint)     | matrixIndex | Index of the view matrix to use.                                                                         |

Returns

| Type                            | Name     | Description |
| ------------------------------- | -------- | ----------- |
| [Vector3](./geom_types#vector3) | position |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getCameraRightAxis

Get the right axis of the nth view matrix of a given viewer.

```python
view.getCameraRightAxis(viewer=-1, matrixIndex=0) -> geom.Vector3
```

Parameters

| Type                          | Name        | Description                                                                                              |
| ----------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer      | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| [UInt](./core_types#uint)     | matrixIndex | Index of the view matrix to use.                                                                         |

Returns

| Type                            | Name | Description |
| ------------------------------- | ---- | ----------- |
| [Vector3](./geom_types#vector3) | axis |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getCameraUpAxis

Get the up axis of the nth view matrix of a given viewer.

```python
view.getCameraUpAxis(viewer=-1, matrixIndex=0) -> geom.Vector3
```

Parameters

| Type                          | Name        | Description                                                                                              |
| ----------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer      | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| [UInt](./core_types#uint)     | matrixIndex | Index of the view matrix to use.                                                                         |

Returns

| Type                            | Name | Description |
| ------------------------------- | ---- | ----------- |
| [Vector3](./geom_types#vector3) | axis |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getViewerProperty

Get a viewer property value.

```python
view.getViewerProperty(propertyName, viewer=-1) -> core.String
```

Parameters

| Type                          | Name         | Description                                                                                              |
| ----------------------------- | ------------ | -------------------------------------------------------------------------------------------------------- |
| [String](./core_types#string) | propertyName |                                                                                                          |
| [Viewer](./view_types#viewer) | viewer       | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

Returns

| Type                          | Name          | Description |
| ----------------------------- | ------------- | ----------- |
| [String](./core_types#string) | propertyValue |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getViewerPropertyInfo

Get a viewer property info.

```python
view.getViewerPropertyInfo(propertyName, viewer=-1) -> core.PropertyInfo
```

Parameters

| Type                          | Name         | Description                                                                                              |
| ----------------------------- | ------------ | -------------------------------------------------------------------------------------------------------- |
| [String](./core_types#string) | propertyName |                                                                                                          |
| [Viewer](./view_types#viewer) | viewer       | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

Returns

| Type                                      | Name         | Description |
| ----------------------------------------- | ------------ | ----------- |
| [PropertyInfo](./core_types#propertyinfo) | propertyInfo |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getViewerSize

Retrieve the viewport size of a viewer.

```python
view.getViewerSize(viewer=-1) -> core.Int, core.Int
```

Parameters

| Type                          | Name   | Description                                                                                              |
| ----------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

Returns

| Type                    | Name   | Description |
| ----------------------- | ------ | ----------- |
| [Int](./core_types#int) | width  |             |
| [Int](./core_types#int) | height |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### getViewerStats

Returns the number of rendered occurrences and triangles. (Warning: this function does not handle isolate nor invertVisibility viewer property).

```python
view.getViewerStats(viewer=-1) -> core.Int, core.Int
```

Parameters

| Type                          | Name   | Description                                                                                              |
| ----------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

Returns

| Type                    | Name                | Description                     |
| ----------------------- | ------------------- | ------------------------------- |
| [Int](./core_types#int) | renderedOccurrences | Number of rendered occurrences. |
| [Int](./core_types#int) | renderedTriangles   | Number of rendered triangles.   |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### identifySelectedEdges

> **Important:**
>
> This function is tagged as experimental.

Identify selected edges.

```python
view.identifySelectedEdges(scene)
```

Parameters

| Type                              | Name  | Description                                             |
| --------------------------------- | ----- | ------------------------------------------------------- |
| [GPUScene](./view_types#gpuscene) | scene | Identifier of the GPU scene to identify the edges from. |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### invertSelectPrimitives

Invert the selection of the primitives (polygons, surfaces) contained in the given rectangle.

```python
view.invertSelectPrimitives(xMin, xMax, yMin, yMax, primitiveType, viewer=-1)
```

Parameters

| Type                                                          | Name          | Description |
| ------------------------------------------------------------- | ------------- | ----------- |
| [Int](./core_types#int)                                       | xMin          |             |
| [Int](./core_types#int)                                       | xMax          |             |
| [Int](./core_types#int)                                       | yMin          |             |
| [Int](./core_types#int)                                       | yMax          |             |
| [PrimitiveSelectionType](./view_types#primitiveselectiontype) | primitiveType |             |
| [Viewer](./view_types#viewer)                                 | viewer        |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### listViewerProperties

Get the list of viewer properties.

```python
view.listViewerProperties(viewer=-1) -> core.PropertyInfoList
```

Parameters

| Type                          | Name   | Description                                                                                              |
| ----------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

Returns

| Type                                              | Name       | Description |
| ------------------------------------------------- | ---------- | ----------- |
| [PropertyInfoList](./core_types#propertyinfolist) | properties |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### pick

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

Parameters

| Type                          | Name   | Description |
| ----------------------------- | ------ | ----------- |
| [Int](./core_types#int)       | x      |             |
| [Int](./core_types#int)       | y      |             |
| [Viewer](./view_types#viewer) | viewer |             |

Returns

| Type                                   | Name        | Description                                                                                                           |
| -------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence  | Picked occurrence, 0 if not occurrence picked.                                                                        |
| [Point3](./geom_types#point3)          | position    | World space position of the picking point.                                                                            |
| [Ident](./core_types#ident)            | primitiveId | Depending of the Part shape representation, it can be a triangle/quadrangle index (Mesh) or a Face identifier (BRep). |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### pickRectangle

```python
view.pickRectangle(xMin, xMax, yMin, yMax, viewer=-1, inDepth=False) -> scene.OccurrenceList
```

Parameters

| Type                          | Name    | Description |
| ----------------------------- | ------- | ----------- |
| [Int](./core_types#int)       | xMin    |             |
| [Int](./core_types#int)       | xMax    |             |
| [Int](./core_types#int)       | yMin    |             |
| [Int](./core_types#int)       | yMax    |             |
| [Viewer](./view_types#viewer) | viewer  |             |
| [Bool](./core_types#bool)     | inDepth |             |

Returns

| Type                                           | Name        | Description                 |
| ---------------------------------------------- | ----------- | --------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | List of picked occurrences. |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### refreshViewer

Refresh the viewer.

```python
view.refreshViewer(viewer=-1)
```

Parameters

| Type                          | Name   | Description        |
| ----------------------------- | ------ | ------------------ |
| [Viewer](./view_types#viewer) | viewer | Viewer to refresh. |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### removeGPUScene

Remove a viewer root.

```python
view.removeGPUScene(scene, viewer=-1)
```

Parameters

| Type                              | Name   | Description                                                                                              |
| --------------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| [GPUScene](./view_types#gpuscene) | scene  | GPU Scene to remove from the viewer.                                                                     |
| [Viewer](./view_types#viewer)     | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### resizeViewer

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

Parameters

| Type                          | Name   | Description                                                                                              |
| ----------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| [Int](./core_types#int)       | width  | Width of the viewer framebuffer.                                                                         |
| [Int](./core_types#int)       | height | Height of the viewer framebuffer.                                                                        |
| [Viewer](./view_types#viewer) | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### selectPrimitives

Select the primitives (polygons, surfaces) contained in the given rectangle.

```python
view.selectPrimitives(xMin, xMax, yMin, yMax, primitiveType, viewer=-1)
```

Parameters

| Type                                                          | Name          | Description |
| ------------------------------------------------------------- | ------------- | ----------- |
| [Int](./core_types#int)                                       | xMin          |             |
| [Int](./core_types#int)                                       | xMax          |             |
| [Int](./core_types#int)                                       | yMin          |             |
| [Int](./core_types#int)                                       | yMax          |             |
| [PrimitiveSelectionType](./view_types#primitiveselectiontype) | primitiveType |             |
| [Viewer](./view_types#viewer)                                 | viewer        |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### 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.

```python
view.setDefaultViewerId(viewer)
```

Parameters

| Type                          | Name   | Description |
| ----------------------------- | ------ | ----------- |
| [Viewer](./view_types#viewer) | viewer |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setViewerProperty](./view_functions#setviewerproperty)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### setViewerProperty

Set a viewer property value.

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

Parameters

| Type                          | Name          | Description                                                                                              |
| ----------------------------- | ------------- | -------------------------------------------------------------------------------------------------------- |
| [String](./core_types#string) | propertyName  |                                                                                                          |
| [String](./core_types#string) | propertyValue |                                                                                                          |
| [Viewer](./view_types#viewer) | viewer        | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.unselectPrimitives](./view_functions#unselectprimitives)

### unselectPrimitives

Unselect the primitives (polygons, surfaces) contained in the given rectangle.

```python
view.unselectPrimitives(xMin, xMax, yMin, yMax, primitiveType, viewer=-1)
```

Parameters

| Type                                                          | Name          | Description |
| ------------------------------------------------------------- | ------------- | ----------- |
| [Int](./core_types#int)                                       | xMin          |             |
| [Int](./core_types#int)                                       | xMax          |             |
| [Int](./core_types#int)                                       | yMin          |             |
| [Int](./core_types#int)                                       | yMax          |             |
| [PrimitiveSelectionType](./view_types#primitiveselectiontype) | primitiveType |             |
| [Viewer](./view_types#viewer)                                 | viewer        |             |

See also:

* [view.addGPUScene](./view_functions#addgpuscene)
* [view.createViewer](./view_functions#createviewer)
* [view.destroyViewer](./view_functions#destroyviewer)
* [view.drawCappingPlane](./view_functions#drawcappingplane)
* [view.getAutoClipping](./view_functions#getautoclipping)
* [view.getCameraFrontAxis](./view_functions#getcamerafrontaxis)
* [view.getCameraPosition](./view_functions#getcameraposition)
* [view.getCameraRightAxis](./view_functions#getcamerarightaxis)
* [view.getCameraUpAxis](./view_functions#getcameraupaxis)
* [view.getViewerProperty](./view_functions#getviewerproperty)
* [view.getViewerPropertyInfo](./view_functions#getviewerpropertyinfo)
* [view.getViewerSize](./view_functions#getviewersize)
* [view.getViewerStats](./view_functions#getviewerstats)
* [view.identifySelectedEdges](./view_functions#identifyselectededges)
* [view.invertSelectPrimitives](./view_functions#invertselectprimitives)
* [view.listViewerProperties](./view_functions#listviewerproperties)
* [view.pick](./view_functions#pick)
* [view.pickRectangle](./view_functions#pickrectangle)
* [view.refreshViewer](./view_functions#refreshviewer)
* [view.removeGPUScene](./view_functions#removegpuscene)
* [view.resizeViewer](./view_functions#resizeviewer)
* [view.selectPrimitives](./view_functions#selectprimitives)
* [view.setDefaultViewerId](./view_functions#setdefaultviewerid)
* [view.setViewerProperty](./view_functions#setviewerproperty)

## raw images

### getCompositedImage

```python
view.getCompositedImage(viewer) -> material.ImageDefinition
```

Parameters

| Type                          | Name   | Description |
| ----------------------------- | ------ | ----------- |
| [Viewer](./view_types#viewer) | viewer |             |

Returns

| Type                                                | Name  | Description                |
| --------------------------------------------------- | ----- | -------------------------- |
| [ImageDefinition](./material_types#imagedefinition) | image | Returned composited image. |

See also:

* [view.getRenderMapImage](./view_functions#getrendermapimage)
* [view.takeScreenshot](./view_functions#takescreenshot)

### getRenderMapImage

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

Parameters

| Type                                | Name      | Description |
| ----------------------------------- | --------- | ----------- |
| [Viewer](./view_types#viewer)       | viewer    |             |
| [RenderMap](./view_types#rendermap) | renderMap |             |

Returns

| Type                                                | Name  | Description                |
| --------------------------------------------------- | ----- | -------------------------- |
| [ImageDefinition](./material_types#imagedefinition) | image | Returned composited image. |

See also:

* [view.getCompositedImage](./view_functions#getcompositedimage)
* [view.takeScreenshot](./view_functions#takescreenshot)

### takeScreenshot

```python
view.takeScreenshot(fileName, viewer)
```

Parameters

| Type                                          | Name     | Description                        |
| --------------------------------------------- | -------- | ---------------------------------- |
| [OutputFilePath](./core_types#outputfilepath) | fileName | Path where to save the screenshot. |
| [Viewer](./view_types#viewer)                 | viewer   |                                    |

See also:

* [view.getCompositedImage](./view_functions#getcompositedimage)
* [view.getRenderMapImage](./view_functions#getrendermapimage)

## streaming

### createStreamedViewer

Create a viewer for streaming.

```python
view.createStreamedViewer(width, height, encoderSettings=None, useWebRTC=False, webRTCInfo=None) -> view.StreamedViewerInfo
```

Parameters

| Type                                            | Name            | Description                               |
| ----------------------------------------------- | --------------- | ----------------------------------------- |
| [Int](./core_types#int)                         | width           | Width of the viewer framebuffer.          |
| [Int](./core_types#int)                         | height          | Height of the viewer framebuffer.         |
| [EncoderSettings](./view_types#encodersettings) | encoderSettings | Settings used for the encoder.            |
| [Boolean](./core_types#boolean)                 | useWebRTC       | Switch between raw websockets and webRTC. |
| [WebRTCInfo](./view_types#webrtcinfo)           | webRTCInfo      | Info for web rtc signaling connection.    |

Returns

| Type                                                  | Name               | Description                          |
| ----------------------------------------------------- | ------------------ | ------------------------------------ |
| [StreamedViewerInfo](./view_types#streamedviewerinfo) | streamedViewerInfo | Port and host for stream connection. |

See also:

* [view.resizeStreamedViewer](./view_functions#resizestreamedviewer)
* [view.startRecording](./view_functions#startrecording)
* [view.stopRecording](./view_functions#stoprecording)

### resizeStreamedViewer

```python
view.resizeStreamedViewer(width, height, viewer=-1, encoderSettings=None)
```

Parameters

| Type                                            | Name            | Description                       |
| ----------------------------------------------- | --------------- | --------------------------------- |
| [Int](./core_types#int)                         | width           | Width of the viewer framebuffer.  |
| [Int](./core_types#int)                         | height          | Height of the viewer framebuffer. |
| [Viewer](./view_types#viewer)                   | viewer          |                                   |
| [EncoderSettings](./view_types#encodersettings) | encoderSettings | Settings used for the encoder.    |

See also:

* [view.createStreamedViewer](./view_functions#createstreamedviewer)
* [view.startRecording](./view_functions#startrecording)
* [view.stopRecording](./view_functions#stoprecording)

### startRecording

Record viewer in a file.

```python
view.startRecording(filePath, viewer, encoderSettings=None)
```

Parameters

| Type                                            | Name            | Description                         |
| ----------------------------------------------- | --------------- | ----------------------------------- |
| [String](./core_types#string)                   | filePath        | File in which video while be saved. |
| [Viewer](./view_types#viewer)                   | viewer          | Viewer to use for recording video.  |
| [EncoderSettings](./view_types#encodersettings) | encoderSettings | Settings used for the encoder.      |

See also:

* [view.createStreamedViewer](./view_functions#createstreamedviewer)
* [view.resizeStreamedViewer](./view_functions#resizestreamedviewer)
* [view.stopRecording](./view_functions#stoprecording)

### stopRecording

Stop recording video.

```python
view.stopRecording(viewer)
```

Parameters

| Type                          | Name   | Description                        |
| ----------------------------- | ------ | ---------------------------------- |
| [Viewer](./view_types#viewer) | viewer | Viewer to use for recording video. |

See also:

* [view.createStreamedViewer](./view_functions#createstreamedviewer)
* [view.resizeStreamedViewer](./view_functions#resizestreamedviewer)
* [view.startRecording](./view_functions#startrecording)

## viewer matrices

### fitCamera

Set the viewer matrices to adjust the camera to the scene.

```python
view.fitCamera(direction, cameraType=1, fov=90, viewer=-1, fitToOccurrences=[])
```

Parameters

| Type                                           | Name             | Description                                                                                              |
| ---------------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------- |
| [Vector3](./geom_types#vector3)                | direction        | Camera direction.                                                                                        |
| [CameraType](./view_types#cameratype)          | cameraType       | Camera type, Orthographic or Perspective.                                                                |
| [Angle](./geom_types#angle)                    | fov              | Field of view (perspective mode only).                                                                   |
| [Viewer](./view_types#viewer)                  | viewer           | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |
| [OccurrenceList](./scene_types#occurrencelist) | fitToOccurrences |                                                                                                          |

See also:

* [view.getViewerMatrices](./view_functions#getviewermatrices)
* [view.setViewerMatrices](./view_functions#setviewermatrices)

### getViewerMatrices

```python
view.getViewerMatrices(viewer=-1) -> geom.Matrix4List, geom.Matrix4List, geom.Vector2
```

Parameters

| Type                          | Name   | Description                                                                                              |
| ----------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

Returns

| Type                                    | Name     | Description |
| --------------------------------------- | -------- | ----------- |
| [Matrix4List](./geom_types#matrix4list) | views    |             |
| [Matrix4List](./geom_types#matrix4list) | projs    |             |
| [Vector2](./geom_types#vector2)         | clipping |             |

See also:

* [view.fitCamera](./view_functions#fitcamera)
* [view.setViewerMatrices](./view_functions#setviewermatrices)

### setViewerMatrices

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

Parameters

| Type                                    | Name     | Description                                                                                              |
| --------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| [Matrix4List](./geom_types#matrix4list) | views    |                                                                                                          |
| [Matrix4List](./geom_types#matrix4list) | projs    |                                                                                                          |
| [Vector2](./geom_types#vector2)         | clipping |                                                                                                          |
| [Viewer](./view_types#viewer)           | viewer   | Viewer id returned by the createViewer function. -1 uses the default viewer id (see setDefaultViewerId). |

See also:

* [view.fitCamera](./view_functions#fitcamera)
* [view.getViewerMatrices](./view_functions#getviewermatrices)

## visibility

### visibilityShoot

Render one frame of the visibility session.

```python
view.visibilityShoot(viewer=-1, parts=True, patches=True, polygons=True, countOnce=False) -> scene.OccurrenceList
```

Parameters

| Type                          | Name      | Description                                                                            |
| ----------------------------- | --------- | -------------------------------------------------------------------------------------- |
| [Viewer](./view_types#viewer) | viewer    | Viewer to use for the visibility shoot.                                                |
| [Bool](./core_types#bool)     | parts     | If false, optimize when parts seen are not wanted.                                     |
| [Bool](./core_types#bool)     | patches   | If false, optimize when patches seen are not wanted.                                   |
| [Bool](./core_types#bool)     | polygons  | If false, optimize when polygons seen are not wanted.                                  |
| [Bool](./core_types#bool)     | countOnce | Optimize when it is not needed to count the numbers of pixels seen during the session. |

Returns

| Type                                           | Name             | Description                                   |
| ---------------------------------------------- | ---------------- | --------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | sceneOccurrences | The list of scene paths seen from this shoot. |
