Panda3DRendererSet

class Panda3DRendererSet(self, renderParameters: visp._visp.ar.Panda3DRenderParameters)

Bases: Panda3DBaseRenderer, Panda3DLightable

Class that rendering multiple datatypes, in a single pass. A RendererSet contains multiple subrenderers, all inheriting from vpPanda3DBaseRenderer . The renderer set synchronizes all scene properties for the different subrenderers. This includes:

  • The camera properties (intrinsics, resolution) and extrinsics

  • The pose and properties of every object in the scene

  • The pose and properties of lights, for subrenderers that are defined as lightable.

<unparsed orderedlist <doxmlparser.compound.docListType object at 0x7f6dff93e1d0>>

Methods

__init__

addLight

Light this lightable object with a new light.

addNodeToScene

Overloaded function.

addSubRenderer

Add a new subrenderer: This subrenderer should have a unique name, not present in the set.

afterFrameRendered

Overloaded function.

beforeFrameRendered

Overloaded function.

enableSharedDepthBuffer

Overloaded function.

getCameraPose

Overloaded function.

getNodePose

Overloaded function.

initFramework

Overloaded function.

initFromParent

Overloaded function.

setCameraPose

Overloaded function.

setNodePose

Overloaded function.

setRenderParameters

Overloaded function.

Inherited Methods

loadObject

Load a 3D object.

setName

setAbortOnPandaError

Set the behaviour when a Panda3D assertion fails.

computeNearAndFarPlanesFromNode

Compute the near and far planes for the camera at the current pose, given a certain node/part of the graph.

vispVectorToPanda

printStructure

isRendering3DScene

Returns true if this renderer process 3D data and its scene root can be interacted with.

setRenderOrder

renderFrame

enableDebugLog

getName

Get the name of the renderer.

getRenderRoot

Get the scene root.

setVerticalSyncEnabled

set whether vertical sync is enabled.

vispPointToPanda

getRenderOrder

Get the rendering order of this renderer.

Operators

__doc__

__init__

__module__

Attributes

__annotations__

__init__(self, renderParameters: visp._visp.ar.Panda3DRenderParameters)
addLight(self, light: visp._visp.ar.Panda3DLight) None

Light this lightable object with a new light.

Parameters:
light: visp._visp.ar.Panda3DLight

addNodeToScene(*args, **kwargs)

Overloaded function.

  1. addNodeToScene(self: visp._visp.ar.Panda3DRendererSet, object: NodePath) -> None

Warning

This method is not supported and will throw

  1. addNodeToScene(self: visp._visp.ar.Panda3DBaseRenderer, object: NodePath) -> None

Add a node to the scene. Its pose is set as the identity matrix.

Parameters:
object

addSubRenderer(self, renderer: visp._visp.ar.Panda3DBaseRenderer) None

Add a new subrenderer: This subrenderer should have a unique name, not present in the set.

Parameters:
renderer: visp._visp.ar.Panda3DBaseRenderer

the renderer to add

afterFrameRendered(*args, **kwargs)

Overloaded function.

  1. afterFrameRendered(self: visp._visp.ar.Panda3DRendererSet) -> None

  2. afterFrameRendered(self: visp._visp.ar.Panda3DBaseRenderer) -> None

beforeFrameRendered(*args, **kwargs)

Overloaded function.

  1. beforeFrameRendered(self: visp._visp.ar.Panda3DRendererSet) -> None

  2. beforeFrameRendered(self: visp._visp.ar.Panda3DBaseRenderer) -> None

computeNearAndFarPlanesFromNode(self, name: str, near: float, far: float, fast: bool) tuple[float, float]

Compute the near and far planes for the camera at the current pose, given a certain node/part of the graph.

The near clipping value will be set to the distance to the closest point of the object. The far clipping value will be set to the distance to farthest vertex of the object.

Warning

Depending on geometry complexity, this may be an expensive operation.

Warning

if the object lies partly behind the camera, the near plane value will be zero. If it fully behind, the far plane will also be zero. If these near/far values are used to update the rendering parameters of the camera, this may result in an invalid projection matrix.

Parameters:
name: str

name of the node that should be used to compute near and far values.

near: float

resulting near clipping plane distance

far: float

resulting far clipping plane distance

fast: bool

Whether to use the axis align bounding box to compute the clipping planes. This is faster than reprojecting the full geometry in the camera frame

Returns:

A tuple containing:

  • near: resulting near clipping plane distance

  • far: resulting far clipping plane distance

enableDebugLog(self) None
enableSharedDepthBuffer(*args, **kwargs)

Overloaded function.

  1. enableSharedDepthBuffer(self: visp._visp.ar.Panda3DRendererSet, sourceBuffer: visp._visp.ar.Panda3DBaseRenderer) -> None

  2. enableSharedDepthBuffer(self: visp._visp.ar.Panda3DBaseRenderer, sourceBuffer: visp._visp.ar.Panda3DBaseRenderer) -> None

getCameraPose(*args, **kwargs)

Overloaded function.

  1. getCameraPose(self: visp._visp.ar.Panda3DRendererSet) -> visp._visp.core.HomogeneousMatrix

Retrieve the pose of the camera. As this renderer contains multiple other renderers.

Returns:

the pose of the camera using the ViSP convention

  1. getCameraPose(self: visp._visp.ar.Panda3DBaseRenderer) -> visp._visp.core.HomogeneousMatrix

Retrieve the camera’s pose, in the world frame. The pose is specified using the ViSP convention (Y-down right handed).

getName(self) str

Get the name of the renderer.

Returns:

const std::string&

getNodePose(*args, **kwargs)

Overloaded function.

  1. getNodePose(self: visp._visp.ar.Panda3DRendererSet, name: str) -> visp._visp.core.HomogeneousMatrix

Retrieve the pose of a scene node. The pose is in the world frame, using a ViSP convention.

Parameters:
name

name of the node

Returns:

vpHomogeneousMatrix the pose of the node in the world frame

  1. getNodePose(self: visp._visp.ar.Panda3DRendererSet, object: NodePath) -> visp._visp.core.HomogeneousMatrix

This method is not supported for this renderer type. Use the std::string version.

Parameters:
object

  1. getNodePose(self: visp._visp.ar.Panda3DBaseRenderer, name: str) -> visp._visp.core.HomogeneousMatrix

Get the pose of a Panda node, in world frame in the ViSP convention (Y-down right handed).

Parameters:
name

Node path to search for.

Returns:

wTo, the pose of the object in world frame

  1. getNodePose(self: visp._visp.ar.Panda3DBaseRenderer, object: NodePath) -> visp._visp.core.HomogeneousMatrix

Get the pose of a Panda node, in world frame in the ViSP convention (Y-down right handed). This version of the method directly uses the Panda Nodepath.

getRenderOrder(self) int

Get the rendering order of this renderer. If a renderer A has a lower order value than B, it will be rendered before B. This is useful, if for instance, B is a postprocessing filter that depends on the result of B.

Returns:

int

getRenderRoot(self) NodePath

Get the scene root.

initFramework(*args, **kwargs)

Overloaded function.

  1. initFramework(self: visp._visp.ar.Panda3DRendererSet) -> None

Initialize the framework and propagate the created panda3D framework to the subrenderers.

The subrenderers will be initialized in the order of their priority as defined by vpPanda3DBaseRenderer::getRenderOrder Thus, if a renderer B depends on A for its render, and if B.getRenderOrder() > A.getRenderOrder() it can rely on A being initialized when B.initFromParent is called (along with the setupCamera, setupRenderTarget).

  1. initFramework(self: visp._visp.ar.Panda3DBaseRenderer) -> None

Initialize the whole Panda3D framework. Create a new PandaFramework object and a new window.

Will also perform the renderer setup (scene, camera and render targets)

initFromParent(*args, **kwargs)

Overloaded function.

  1. initFromParent(self: visp._visp.ar.Panda3DRendererSet, framework: PandaFramework, window: PointerTo<WindowFramework>) -> None

  2. initFromParent(self: visp._visp.ar.Panda3DRendererSet, renderer: visp._visp.ar.Panda3DBaseRenderer) -> None

  3. initFromParent(self: visp._visp.ar.Panda3DBaseRenderer, framework: PandaFramework, window: PointerTo<WindowFramework>) -> None

  4. initFromParent(self: visp._visp.ar.Panda3DBaseRenderer, renderer: visp._visp.ar.Panda3DBaseRenderer) -> None

isRendering3DScene(self) bool

Returns true if this renderer process 3D data and its scene root can be interacted with.

This value could be false, if for instance it is redefined in a subclass that performs postprocessing on a texture.

loadObject(self, nodeName: str, modelPath: str) NodePath

Load a 3D object. To load an .obj file, Panda3D must be compiled with assimp support.

Once loaded, the object will not be visible, it should be added to the scene.

Parameters:
nodeName: str

the name that will be used when inserting the node in the scene graph

modelPath: str

Path to the model file

Returns:

NodePath The NodePath containing the 3D model, which can now be added to the scene graph.

printStructure(self) None
renderFrame(self) None
setAbortOnPandaError(self, abort: bool) None

Set the behaviour when a Panda3D assertion fails. If abort is true, the program will stop. Otherwise, an error will be displayed in the console.

Parameters:
abort: bool

whether to abort (true) or display a message when an assertion fails.

setCameraPose(*args, **kwargs)

Overloaded function.

  1. setCameraPose(self: visp._visp.ar.Panda3DRendererSet, wTc: visp._visp.core.HomogeneousMatrix) -> None

Set the pose of the camera, using the ViSP convention. This change is propagated to all subrenderers.

Parameters:
wTc

Pose of the camera

  1. setCameraPose(self: visp._visp.ar.Panda3DBaseRenderer, wTc: visp._visp.core.HomogeneousMatrix) -> None

Set the camera’s pose. The pose is specified using the ViSP convention (Y-down right handed).

Parameters:
wTc

the new pose of the camera, in world frame

setName(self, name: str) None
setNodePose(*args, **kwargs)

Overloaded function.

  1. setNodePose(self: visp._visp.ar.Panda3DRendererSet, name: str, wTo: visp._visp.core.HomogeneousMatrix) -> None

Set the pose of an object for all the subrenderers. The pose is specified using the ViSP convention This method may fail if a subrenderer does not have a node with the given name.

Warning

This method may fail if a subrenderer does not have a node with the given name. It is assumed that the scenes are synchronized

Parameters:
name

wTo

  1. setNodePose(self: visp._visp.ar.Panda3DRendererSet, object: NodePath, wTo: visp._visp.core.HomogeneousMatrix) -> None

This method is not supported for this renderer type. Use the std::string version.

Parameters:
object

wTo

  1. setNodePose(self: visp._visp.ar.Panda3DBaseRenderer, name: str, wTo: visp._visp.core.HomogeneousMatrix) -> None

Set the pose of a node. This node can be any Panda object (light, mesh, camera). The pose is specified using the ViSP convention (Y-down right handed).

Parameters:
name

Node path to search for, from the render root. This is the object that will be modified See https://docs.panda3d.org/1.10/python/programming/scene-graph/searching-scene-graph

wTo

Pose of the object in the world frame

  1. setNodePose(self: visp._visp.ar.Panda3DBaseRenderer, object: NodePath, wTo: visp._visp.core.HomogeneousMatrix) -> None

Set the pose of a node. The pose is specified using the ViSP convention (Y-down right handed). This node can be any Panda object (light, mesh, camera).

Parameters:
object

The object for which to set the pose

wTo

Pose of the object in the world frame

setRenderOrder(self, order: int) None
setRenderParameters(*args, **kwargs)

Overloaded function.

  1. setRenderParameters(self: visp._visp.ar.Panda3DRendererSet, params: visp._visp.ar.Panda3DRenderParameters) -> None

Set new rendering parameters. If the scene has already been initialized, the renderer camera is updated.

Parameters:
params

the new rendering parameters

  1. setRenderParameters(self: visp._visp.ar.Panda3DBaseRenderer, params: visp._visp.ar.Panda3DRenderParameters) -> None

Set new rendering parameters. If the scene has already been initialized, the renderer camera is updated.

Parameters:
params

the new rendering parameters

setVerticalSyncEnabled(self, useVsync: bool) None

set whether vertical sync is enabled. When vertical sync is enabled, render speed will be limited by the display’s refresh rate

Parameters:
useVsync: bool

Whether to use vsync or not

static vispPointToPanda(point: visp._visp.core.ColVector) visp._visp.core.ColVector
static vispVectorToPanda(vec: visp._visp.core.ColVector) visp._visp.core.ColVector