35 #ifndef VP_OBJECT_CENTRIC_RENDERER_H
36 #define VP_OBJECT_CENTRIC_RENDERER_H
38 #include <visp3/core/vpConfig.h>
40 #if defined(VISP_HAVE_PANDA3D)
42 #include <visp3/core/vpMeterPixelConversion.h>
43 #include <visp3/ar/vpPanda3DRendererSet.h>
44 #include <visp3/core/vpRect.h>
66 m_focusedObject = focused;
67 m_shouldComputeBBPoints =
true;
72 void computeBoundingBox3DPoints();
73 void computeClipping(
float &nearV,
float &farV);
77 if (m_shouldComputeBBPoints) {
78 computeBoundingBox3DPoints();
79 m_shouldComputeBBPoints =
false;
84 vpRect computeBoundingBox();
93 const unsigned h = m_renderParameters.getImageHeight();
94 const unsigned w = m_renderParameters.getImageWidth();
95 const unsigned top =
static_cast<unsigned int>(std::max(0.0, m_bb.getTop()));
96 const unsigned left =
static_cast<unsigned int>(std::max(0.0, m_bb.getLeft()));
97 const unsigned bottom =
static_cast<unsigned int>(std::min(
static_cast<double>(h), m_bb.getBottom()));
98 const unsigned right =
static_cast<unsigned int>(std::min(
static_cast<double>(w), m_bb.getRight()));
100 target.
resize(h, w, clearValue);
101 for (
unsigned int i = top; i < bottom; ++i) {
102 memcpy(target.
bitmap + i * w + left, render[i - top], (right - left) *
sizeof(T));
113 std::string m_focusedObject;
115 std::vector<vpColVector> m_bb3DPoints;
116 bool m_shouldComputeBBPoints;
Implementation of column vector and the associated operations.
Definition of the vpImage class member functions.
void resize(unsigned int h, unsigned int w)
resize the image : Image initialization
Type * bitmap
points toward the bitmap
Single object focused renderer.
vpRect getBoundingBox() const
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 setFocusedObject(const std::string &focused)
void placeRenderInto(const vpImage< T > &render, vpImage< T > &target, const T &clearValue)
Rendering parameters for a panda3D simulation.
Class that renders multiple datatypes, in a single pass. A renderer set contains multiple subrenderer...
void beforeFrameRendered() VP_OVERRIDE
virtual void setRenderParameters(const vpPanda3DRenderParameters ¶ms) VP_OVERRIDE
Set new rendering parameters. If the scene has already been initialized, the renderer camera is updat...
Defines a rectangle in the plane.