#include <Webcam.h>

Public Member Functions | |
| void | updateImage () |
| Grabs a new frame from the Webcam. | |
| void | bindAsTexture () |
| Binds webcam image as OpenGL texture. | |
| const Vector & | getLightDirection () |
| Returns the direction from which the most light comes in. | |
| const Vector & | getShadowDirection () |
| Returns the direction from which the least light comes in. | |
| Uint32 | getDarkPixelsCount () |
| Returns the number of dark pixels recorded by the webcam. | |
| Uint32 | getLightPixelsCount () |
| Returns the number of light pixels recorded by the webcam. | |
| float | getDarkPixelsPercentage () |
| Returns the percentage of darkest pixels (100% are numDarkest + numLightest). | |
| GLfloat & | getWidth () |
| Getter for width. | |
| GLfloat & | getHeight () |
| Getter for height. | |
| void | setWidth (const GLfloat &width) |
| Setter for width. | |
| void | setHeight (const GLfloat &height) |
| Setter for height. | |
| void | renderGl () |
| Renders webcam image as OpenGL plane. | |
| void | selectGl () |
| Selection rendering pass. | |
| void | processEvent (SDL_Event &event) |
| A method to deal with SDL_Event. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
Static Public Member Functions | |
| static Webcam * | getInstance () |
| Getter of the singleton instance. | |
Private Member Functions | |
| Webcam () | |
| Standard constructor. | |
| Webcam (const Webcam &source) | |
| Copy constructor. | |
| ~Webcam () | |
| Destructor. | |
| void | updateLightDirection () |
| Recalculates the light vector (maybe should moved to a shader). | |
Private Attributes | |
| CvCapture * | captureDevice |
| Pointer to hardware device. | |
| IplImage * | currentImage |
| Webcam Image. | |
| GLuint | textureId |
| OpenGL Texture ID. | |
| GLfloat | width |
| width of the 3d representation | |
| GLfloat | height |
| height of the 3d representation | |
| Vector | lightDirection |
| Vector pointing to the center of brightness. | |
| Vector | shadowDirection |
| Vector pointing to the center of drakness. | |
| Uint32 | numDark |
| Number of dark pixels recorded by the webcam. | |
| Uint32 | numLight |
| Number of light pixels recorded by the webcam. | |
| float | percentageDarkest |
| percentage of darkest pixels (numDarkest + numLightest = 100%) | |
| bool | lightDirectionUpToDate |
| Is the light direction up to date? | |
| Uint32 | averageColor |
| Average image color. | |
| bool | visible |
| Should the debug-window be rendered? | |
| bool | falseColors |
| Should false colors be rendered? | |
| Texture | fallbackTexture |
| Fallback texture. | |
Static Private Attributes | |
| static Webcam * | instance = 0 |
| Singleton instance. | |
| Webcam::Webcam | ( | ) | [private] |
Standard constructor.
| Webcam::Webcam | ( | const Webcam & | source | ) | [private] |
Copy constructor.
Should never be called with a singleton
| Webcam::~Webcam | ( | ) | [private] |
Destructor.
| void Webcam::updateLightDirection | ( | ) | [private] |
Recalculates the light vector (maybe should moved to a shader).
| Webcam * Webcam::getInstance | ( | ) | [static] |
Getter of the singleton instance.
| void Webcam::updateImage | ( | ) |
| void Webcam::bindAsTexture | ( | ) |
Binds webcam image as OpenGL texture.
| const Vector & Webcam::getLightDirection | ( | ) |
Returns the direction from which the most light comes in.
| const Vector & Webcam::getShadowDirection | ( | ) |
Returns the direction from which the least light comes in.
| Uint32 Webcam::getDarkPixelsCount | ( | ) |
Returns the number of dark pixels recorded by the webcam.
| Uint32 Webcam::getLightPixelsCount | ( | ) |
Returns the number of light pixels recorded by the webcam.
| float Webcam::getDarkPixelsPercentage | ( | ) |
Returns the percentage of darkest pixels (100% are numDarkest + numLightest).
| GLfloat & Webcam::getWidth | ( | ) |
Getter for width.
| GLfloat & Webcam::getHeight | ( | ) |
Getter for height.
| void Webcam::setWidth | ( | const GLfloat & | width | ) |
Setter for width.
| void Webcam::setHeight | ( | const GLfloat & | height | ) |
Setter for height.
| void Webcam::renderGl | ( | ) | [virtual] |
| void Webcam::selectGl | ( | ) | [virtual] |
| void Webcam::processEvent | ( | SDL_Event & | event | ) | [virtual] |
| string Webcam::toString | ( | ) | const [virtual] |
Returns a textual representation.
Implements EventListener.
| string Webcam::className | ( | ) | const [virtual] |
Returns the class name of the object.
Implements EventListener.
| enum classId Webcam::classId | ( | ) | const [virtual] |
Webcam * Webcam::instance = 0 [static, private] |
Singleton instance.
CvCapture* Webcam::captureDevice [private] |
Pointer to hardware device.
IplImage* Webcam::currentImage [private] |
Webcam Image.
GLuint Webcam::textureId [private] |
OpenGL Texture ID.
GLfloat Webcam::width [private] |
width of the 3d representation
GLfloat Webcam::height [private] |
height of the 3d representation
Vector Webcam::lightDirection [private] |
Vector pointing to the center of brightness.
Vector Webcam::shadowDirection [private] |
Vector pointing to the center of drakness.
Uint32 Webcam::numDark [private] |
Number of dark pixels recorded by the webcam.
Uint32 Webcam::numLight [private] |
Number of light pixels recorded by the webcam.
float Webcam::percentageDarkest [private] |
percentage of darkest pixels (numDarkest + numLightest = 100%)
bool Webcam::lightDirectionUpToDate [private] |
Is the light direction up to date?
Uint32 Webcam::averageColor [private] |
Average image color.
bool Webcam::visible [private] |
Should the debug-window be rendered?
bool Webcam::falseColors [private] |
Should false colors be rendered?
Texture Webcam::fallbackTexture [private] |
Fallback texture.
1.5.6