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
Light this lightable object with a new light.
Overloaded function.
Add a new subrenderer: This subrenderer should have a unique name, not present in the set.
Overloaded function.
Overloaded function.
Overloaded function.
Overloaded function.
Overloaded function.
Overloaded function.
Overloaded function.
Overloaded function.
Overloaded function.
Overloaded function.
Inherited Methods
Load a 3D object.
Set the behaviour when a Panda3D assertion fails.
Compute the near and far planes for the camera at the current pose, given a certain node/part of the graph.
Returns true if this renderer process 3D data and its scene root can be interacted with.
Get the name of the renderer.
Get the scene root.
set whether vertical sync is enabled.
Get the rendering order of this renderer.
Operators
__doc__
__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.
addNodeToScene(self: visp._visp.ar.Panda3DRendererSet, object: NodePath) -> None
Warning
This method is not supported and will throw
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.
afterFrameRendered(self: visp._visp.ar.Panda3DRendererSet) -> None
afterFrameRendered(self: visp._visp.ar.Panda3DBaseRenderer) -> None
- beforeFrameRendered(*args, **kwargs)¶
Overloaded function.
beforeFrameRendered(self: visp._visp.ar.Panda3DRendererSet) -> None
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
Overloaded function.
enableSharedDepthBuffer(self: visp._visp.ar.Panda3DRendererSet, sourceBuffer: visp._visp.ar.Panda3DBaseRenderer) -> None
enableSharedDepthBuffer(self: visp._visp.ar.Panda3DBaseRenderer, sourceBuffer: visp._visp.ar.Panda3DBaseRenderer) -> None
- getCameraPose(*args, **kwargs)¶
Overloaded function.
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
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).
- getNodePose(*args, **kwargs)¶
Overloaded function.
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
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
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
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.
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).
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.
initFromParent(self: visp._visp.ar.Panda3DRendererSet, framework: PandaFramework, window: PointerTo<WindowFramework>) -> None
initFromParent(self: visp._visp.ar.Panda3DRendererSet, renderer: visp._visp.ar.Panda3DBaseRenderer) -> None
initFromParent(self: visp._visp.ar.Panda3DBaseRenderer, framework: PandaFramework, window: PointerTo<WindowFramework>) -> None
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.
- 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.
- setCameraPose(*args, **kwargs)¶
Overloaded function.
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
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
- setNodePose(*args, **kwargs)¶
Overloaded function.
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
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
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
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
- setRenderParameters(*args, **kwargs)¶
Overloaded function.
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
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
- static vispPointToPanda(point: visp._visp.core.ColVector) visp._visp.core.ColVector ¶
- static vispVectorToPanda(vec: visp._visp.core.ColVector) visp._visp.core.ColVector ¶