1 #ifndef VP_RB_TEST_UTILS_H
2 #define VP_RB_TEST_UTILS_H
4 #include <visp3/ar/vpPanda3DRendererSet.h>
5 #include <visp3/ar/vpPanda3DGeometryRenderer.h>
6 #include <visp3/ar/vpPanda3DRGBRenderer.h>
12 std::vector<vpImage<vpRGBa>>
rgb;
13 std::vector<vpImage<float>>
depth;
14 std::vector<vpHomogeneousMatrix>
cTo;
19 std::vector<vpHomogeneousMatrix> &cTw, std::vector<vpHomogeneousMatrix> &oTw)
22 auto rgbRenderer = std::make_shared<vpPanda3DRGBRenderer>(
true);
28 if (cTw.size() != oTw.size()) {
32 res.
rgb.resize(cTw.size());
33 res.
depth.resize(cTw.size());
34 res.
cTo.resize(cTw.size());
36 for (
unsigned int i = 0; i < cTw.size(); ++i) {
43 rgbRenderer->computeNearAndFarPlanesFromNode(
"object", nearV, farV,
true);
51 res.
cTo[i] = cTw[i] * oTw[i].inverse();
error that can be emitted by ViSP classes.
@ dimensionError
Bad dimension.
virtual void renderFrame()
Renderer that outputs object geometric information.
Implementation of a traditional RGB renderer in Panda3D.
Rendering parameters for a panda3D simulation.
unsigned int getImageWidth() const
void setClippingDistance(double nearV, double farV)
Set the clipping distance. When a panda camera uses these render parameters, objects that are closer ...
unsigned int getImageHeight() const
Class that renders multiple datatypes, in a single pass. A renderer set contains multiple subrenderer...
void initFramework() VP_OVERRIDE
Initialize the framework and propagate the created panda3D framework to the subrenderers.
virtual void setRenderParameters(const vpPanda3DRenderParameters ¶ms) VP_OVERRIDE
Set new rendering parameters. If the scene has already been initialized, the renderer camera is updat...
void addSubRenderer(std::shared_ptr< vpPanda3DBaseRenderer > renderer)
Add a new subrenderer: This subrenderer should have a unique name, not present in the set.
void setNodePose(const std::string &name, const vpHomogeneousMatrix &wTo) VP_OVERRIDE
Set the pose of an object for all the subrenderers. The pose is specified using the ViSP convention T...
void setCameraPose(const vpHomogeneousMatrix &wTc) VP_OVERRIDE
Set the pose of the camera, using the ViSP convention. This change is propagated to all subrenderers.
std::shared_ptr< RendererType > getRenderer()
Retrieve the first subrenderer with the specified template type.
std::vector< vpHomogeneousMatrix > cTo
std::vector< vpImage< float > > depth
std::vector< vpImage< vpRGBa > > rgb