Fawkes API
Fawkes Development Version
|
Draw images from camera in texture. More...
#include "texture_drawer.h"
Public Member Functions | |
SkelGuiTextureDrawer (unsigned int width, unsigned int height) | |
Constructor. More... | |
virtual | ~SkelGuiTextureDrawer () |
Destructor. More... | |
virtual void | fill_texture ()=0 |
Fill texture with data. More... | |
void | draw () |
Draw texture to screen. More... | |
Protected Member Functions | |
void | copy_rgb_to_texture (const unsigned char *rgb_buf) |
Copy an RGB buffer to texture. More... | |
Protected Attributes | |
unsigned char * | __texture |
Texture buffer. More... | |
const unsigned int | __width |
Width of visible area from texture. More... | |
const unsigned int | __height |
Height of visible area from texture. More... | |
const unsigned int | __texture_width |
Real texture width. More... | |
const unsigned int | __texture_height |
Real texture height. More... | |
Draw images from camera in texture.
Uses texture mapping to show an image acquired from a camera in the background.
Definition at line 30 of file texture_drawer.h.
SkelGuiTextureDrawer::SkelGuiTextureDrawer | ( | unsigned int | width, |
unsigned int | height | ||
) |
Constructor.
width | width of visible area |
height | height of visible area |
Definition at line 54 of file texture_drawer.cpp.
References __texture, __texture_height, and __texture_width.
|
virtual |
Destructor.
Definition at line 66 of file texture_drawer.cpp.
References __height, __texture, __texture_height, __texture_width, and __width.
|
protected |
Copy an RGB buffer to texture.
rgb_buf | the RGB buffer to copy, it must exactly of dimensions __width and __height. |
Definition at line 138 of file texture_drawer.cpp.
References __height, __texture, __texture_width, and __width.
Referenced by SkelGuiImageDrawer::fill_texture(), and SkelGuiDepthDrawer::fill_texture().
void SkelGuiTextureDrawer::draw | ( | ) |
Draw texture to screen.
Definition at line 112 of file texture_drawer.cpp.
References __height, __texture, __texture_height, __texture_width, __width, and fill_texture().
|
pure virtual |
Fill texture with data.
This function is called during draw() and the sub-class shall implement it to fill the texture with the data to show. Be aware that the texture size and the actually shown size will likely differ.
Implemented in SkelGuiDepthDrawer, and SkelGuiImageDrawer.
Referenced by draw().
|
protected |
Height of visible area from texture.
Definition at line 54 of file texture_drawer.h.
Referenced by copy_rgb_to_texture(), draw(), SkelGuiImageDrawer::fill_texture(), SkelGuiDepthDrawer::fill_texture(), SkelGuiDepthDrawer::SkelGuiDepthDrawer(), SkelGuiImageDrawer::SkelGuiImageDrawer(), and ~SkelGuiTextureDrawer().
|
protected |
Texture buffer.
Definition at line 51 of file texture_drawer.h.
Referenced by copy_rgb_to_texture(), draw(), SkelGuiTextureDrawer(), and ~SkelGuiTextureDrawer().
|
protected |
Real texture height.
Definition at line 57 of file texture_drawer.h.
Referenced by draw(), SkelGuiTextureDrawer(), and ~SkelGuiTextureDrawer().
|
protected |
Real texture width.
Definition at line 56 of file texture_drawer.h.
Referenced by copy_rgb_to_texture(), draw(), SkelGuiTextureDrawer(), and ~SkelGuiTextureDrawer().
|
protected |
Width of visible area from texture.
Definition at line 53 of file texture_drawer.h.
Referenced by copy_rgb_to_texture(), draw(), SkelGuiImageDrawer::fill_texture(), SkelGuiDepthDrawer::fill_texture(), SkelGuiDepthDrawer::SkelGuiDepthDrawer(), SkelGuiImageDrawer::SkelGuiImageDrawer(), and ~SkelGuiTextureDrawer().