31 #ifndef VP_PANDA3D_RENDERER_SET_H
32 #define VP_PANDA3D_RENDERER_SET_H
34 #include <visp3/core/vpConfig.h>
36 #if defined(VISP_HAVE_PANDA3D)
40 #include <visp3/ar/vpPanda3DBaseRenderer.h>
41 #include <visp3/ar/vpPanda3DLight.h>
74 void initFromParent(std::shared_ptr<PandaFramework> framework, PointerTo<WindowFramework> window) VP_OVERRIDE;
137 void addNodeToScene(const NodePath &
object) VP_OVERRIDE;
160 template<typename RendererType>
161 std::shared_ptr<RendererType> getRenderer()
163 for (std::shared_ptr<vpPanda3DBaseRenderer> &renderer: m_subRenderers) {
164 std::shared_ptr<RendererType> rendererCast = std::dynamic_pointer_cast<RendererType>(renderer);
165 if (rendererCast !=
nullptr) {
179 template<
typename RendererType>
180 std::shared_ptr<RendererType>
getRenderer(
const std::string &name)
182 for (std::shared_ptr<vpPanda3DBaseRenderer> &renderer: m_subRenderers) {
183 if (renderer->getName() == name) {
184 std::shared_ptr<RendererType> rendererCast = std::dynamic_pointer_cast<RendererType>(renderer);
185 if (rendererCast !=
nullptr) {
195 for (std::shared_ptr<vpPanda3DBaseRenderer> &renderer: m_subRenderers) {
196 renderer->beforeFrameRendered();
202 for (std::shared_ptr<vpPanda3DBaseRenderer> &renderer: m_subRenderers) {
203 renderer->afterFrameRendered();
Implementation of an homogeneous matrix and operations on such kind of matrices.
Base class for a panda3D renderer. This class handles basic functionalities, such as loading object,...
virtual void initFramework()
Initialize the whole Panda3D framework. Create a new PandaFramework object and a new window.
Base class for a Light that can be added to a Panda3D scene.
Interface for objects, scenes or other Panda3D related data that can be lit by a vpPanda3DLight.
Rendering parameters for a panda3D simulation.
Class that rendering multiple datatypes, in a single pass. A RendererSet contains multiple subrendere...
std::shared_ptr< RendererType > getRenderer(const std::string &name)
Retrieve the subrenderer with the specified template type and the given name.
virtual ~vpPanda3DRendererSet()=default
void beforeFrameRendered() VP_OVERRIDE
std::vector< std::shared_ptr< vpPanda3DBaseRenderer > > m_subRenderers
void setupScene() VP_OVERRIDE
Initialize the scene for this specific renderer.
void afterFrameRendered() VP_OVERRIDE
void setupCamera() VP_OVERRIDE
Initialize camera. Should be called when the scene root of this render has already been created.