ot::ARToolKitModule Class Reference
#include <ARToolKitModule.h>
Inheritance diagram for ot::ARToolKitModule:


Public Member Functions | |
| ARToolKitModule () | |
| virtual | ~ARToolKitModule () |
| virtual Node * | createNode (const std::string &name, StringTable &attributes) |
| virtual void | start () |
| virtual void | close () |
| virtual void | pushEvent () |
| virtual void | init (StringTable &attributes, ConfigNode *localTree) |
| bool | isStereo () |
| int | getSizeX (int stereo_buffer=STEREO_L) |
| int | getSizeY (int stereo_buffer=STEREO_L) |
| void | getFlipping (bool *isFlippedH, bool *isFlippedV, int stereo_buffer=STEREO_L) |
| unsigned char * | lockFrame (MemoryBufferHandle *pHandle, int stereo_buffer=STEREO_L) |
| void | unlockFrame (MemoryBufferHandle Handle, int stereo_buffer=STEREO_L) |
| int | getImageFormat (int stereo_buffer=STEREO_L) |
Protected Member Functions | |
| virtual void | run () |
| void | grab () |
Protected Attributes | |
| NodeVector | sources |
| int | did |
| int | treshhold |
| int | stop |
| std::string | cameradata |
| double | rate |
| std::string | videomode |
| std::string | videomode2 |
| bool | stereo |
| unsigned char * | frame |
| int | sizeX |
| int | sizeY |
| std::string | patternDirectory |
Detailed Description
Definition at line 248 of file ARToolKitModule.h.
Constructor & Destructor Documentation
| ot::ARToolKitModule::ARToolKitModule | ( | ) |
constructor method
| virtual ot::ARToolKitModule::~ARToolKitModule | ( | ) | [virtual] |
destructor method
Member Function Documentation
| virtual void ot::ARToolKitModule::close | ( | ) | [virtual] |
| virtual Node* ot::ARToolKitModule::createNode | ( | const std::string & | name, | |
| StringTable & | attributes | |||
| ) | [virtual] |
This method is called to construct a new Node.
It compares name to the ARToolKitSource element name, and if it matches creates a new ARToolKitSource node.
- Parameters:
-
name reference to string containing element name refenrence to StringMap containing attribute values
Implements ot::NodeFactory.
| void ot::ARToolKitModule::getFlipping | ( | bool * | isFlippedH, | |
| bool * | isFlippedV, | |||
| int | stereo_buffer = STEREO_L | |||
| ) |
returns whether the grabbed image is flipped horizontally or vertically
| int ot::ARToolKitModule::getImageFormat | ( | int | stereo_buffer = STEREO_L |
) |
returns the OpenGL flag that is used by ARToolkit to describe the pixel format in the frame buffer.
This is a simple way to pass the necessary information to use the image data in GL calls.
| int ot::ARToolKitModule::getSizeX | ( | int | stereo_buffer = STEREO_L |
) |
returns the width of the grabbed image in pixels
| int ot::ARToolKitModule::getSizeY | ( | int | stereo_buffer = STEREO_L |
) |
returns the height of the grabbed image in pixels
| void ot::ARToolKitModule::grab | ( | ) | [protected] |
grabs a frame and processes the data
| virtual void ot::ARToolKitModule::init | ( | StringTable & | attributes, | |
| ConfigNode * | localTree | |||
| ) | [virtual] |
initializes the ARToolKit module.
- Parameters:
-
attributes StringMap of elements attribute values. Should be possibly , but is not for convenience. localTree pointer to root of configuration nodes tree
Reimplemented from ot::Module.
| bool ot::ARToolKitModule::isStereo | ( | ) |
returns whether two cameras are configured
| unsigned char* ot::ARToolKitModule::lockFrame | ( | MemoryBufferHandle * | pHandle, | |
| int | stereo_buffer = STEREO_L | |||
| ) |
returns a pointer to the grabbed image.
The image format is depending on the pixel format and typically RGB or RGBA times X times Y bytes.
- Returns:
- pointer to image buffer
| virtual void ot::ARToolKitModule::pushEvent | ( | ) | [virtual] |
pushes events into the tracker tree.
Checks all source nodes for new events and pushes them into the tracker tree.
Reimplemented from ot::Module.
| virtual void ot::ARToolKitModule::run | ( | ) | [protected, virtual] |
the work method for the module thread.
This method grabs a frame and computes any marker information from it. Then it updates the source nodes accordingly. If the stop flag is set, it finishes.
Reimplemented from ot::ThreadModule.
| virtual void ot::ARToolKitModule::start | ( | ) | [virtual] |
This method is called after initialisation is finished and before the main loop is started.
It opens the artoolkit library and video system.
Reimplemented from ot::ThreadModule.
| void ot::ARToolKitModule::unlockFrame | ( | MemoryBufferHandle | Handle, | |
| int | stereo_buffer = STEREO_L | |||
| ) |
releases the pointer to the grabbed image.
frame pointer
Member Data Documentation
std::string ot::ARToolKitModule::cameradata [protected] |
int ot::ARToolKitModule::did [protected] |
Definition at line 254 of file ARToolKitModule.h.
unsigned char* ot::ARToolKitModule::frame [protected] |
std::string ot::ARToolKitModule::patternDirectory [protected] |
double ot::ARToolKitModule::rate [protected] |
int ot::ARToolKitModule::sizeX [protected] |
int ot::ARToolKitModule::sizeY [protected] |
Definition at line 273 of file ARToolKitModule.h.
NodeVector ot::ARToolKitModule::sources [protected] |
bool ot::ARToolKitModule::stereo [protected] |
int ot::ARToolKitModule::stop [protected] |
int ot::ARToolKitModule::treshhold [protected] |
std::string ot::ARToolKitModule::videomode [protected] |
std::string ot::ARToolKitModule::videomode2 [protected] |
The documentation for this class was generated from the following file: