34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 #include <visp3/core/vpConfig.h>
38 #if (defined(VISP_HAVE_D3D9))
40 #ifndef VPD3DRENDERER_HH
41 #define VPD3DRENDERER_HH
47 #include <visp3/core/vpDisplayException.h>
48 #include <visp3/gui/vpWin32Renderer.h>
59 class VISP_EXPORT vpD3DRenderer :
public vpWin32Renderer
64 IDirect3DDevice9 *pd3dDevice;
71 IDirect3DTexture9 *pd3dText;
75 IDirect3DTexture9 *pd3dVideoText;
78 unsigned int textWidth;
93 bool init(HWND hwnd,
unsigned int width,
unsigned int height);
97 virtual ~vpD3DRenderer() vp_override;
100 void setImg(const
vpImage<
unsigned char> &im);
102 void setImgROI(const
vpImage<
unsigned char> &im, const
vpImagePoint &iP,
unsigned int width,
unsigned int height);
107 int style = PS_SOLID);
109 void drawRect(const
vpImagePoint &topLeft,
unsigned int width,
unsigned int height, const
vpColor &color,
110 bool fill = false,
unsigned int thickness = 1);
112 void clear(const
vpColor &color);
114 void drawCircle(const
vpImagePoint ¢er,
unsigned int radius, const
vpColor &color,
bool fill = false,
115 unsigned int thickness = 1);
119 void drawCross(const
vpImagePoint &ip,
unsigned int size, const
vpColor &color,
unsigned int thickness = 1);
122 unsigned int thickness = 1);
127 void initView(
float,
float);
133 void subDrawCircle(
int i,
int j,
int x,
int y,
vpColor col,
unsigned char *buf,
unsigned int pitch,
unsigned int maxX,
136 void convert(const
vpImage<
vpRGBa> &I,
unsigned char *imBuffer,
unsigned int pitch);
137 void convert(const
vpImage<
unsigned char> &I,
unsigned char *imBuffer,
unsigned int pitch);
138 void convertROI(const
vpImage<
vpRGBa> &I,
unsigned char *imBuffer,
unsigned int pitch,
int i_min,
int j_min,
139 int i_max,
int j_max);
140 void convertROI(const
vpImage<
unsigned char> &I,
unsigned char *imBuffer,
unsigned int pitch,
int i_min,
int j_min,
141 int i_max,
int j_max);
155 inline
void setBufferPixel(
unsigned char *buf,
unsigned int pitch,
int x,
int y, const
vpColor &color,
156 unsigned int maxX,
unsigned int maxY)
160 c = colors[color.id];
162 c = D3DCOLOR_ARGB(0xFF, color.R, color.G, color.B);
165 if (x >= 0 && y >= 0 && x <= (
int)maxX && y <= (
int)maxY)
166 *(
unsigned long *)(buf + (y * pitch) + (x << 2)) = c;
177 inline void setBufferPixel(
unsigned char *buf,
unsigned int pitch,
int x,
int y,
const vpColor &color)
181 c = colors[color.
id];
183 c = D3DCOLOR_ARGB(0xFF, color.
R, color.
G, color.
B);
186 *(
unsigned long *)(buf + (y * pitch) + (x << 2)) = c;
189 unsigned int supPowerOf2(
unsigned int n);
Class to define RGB colors available for display functionalities.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition of the vpImage class member functions.
unsigned char B
Blue component.
unsigned char R
Red component.
unsigned char G
Green component.
void init(vpImage< unsigned char > &Iinput, vpImage< unsigned char > &IcannyVisp, vpImage< unsigned char > *p_dIx, vpImage< unsigned char > *p_dIy, vpImage< unsigned char > *p_IcannyimgFilter)
Initialize the different displays.