Sentis-ToF-M100 API 1.0.0 API_for_using_the_Bluetechnix_Sentis_ToF_M100_camera

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Macros | Functions | Variables
3d.cpp File Reference
`#include <GL/glut.h>`
`#include <GL/gl.h>`
`#include <GL/glu.h>`
`#include <stdlib.h>`
`#include <m100api.h>`
`#include <stdio.h>`
`#include <stdarg.h>`
`#include <math.h>`
`#include <iostream>`
Include dependency graph for 3d.cpp:

## Macros
#define | TICKS_PER_SECOND 20
#define | LEN 8192
#define | VSNPRINTF vsnprintf

## Functions
int | initCamera (T_SENTIS_HANDLE *handle)
| Helper method that starts the connection with the camera and set the default image_data format. More...
int | getFrame (T_SENTIS_HANDLE handle)
| Get a fame from the camera and save it in the global buffer variable. More...
int | stopCamera (T_SENTIS_HANDLE handle)
| Close the connections with the camera and set free data structures. More...
void | init ()
| Called before main loop to set up the program.
void | reshape (int w, int h)
| Called every time a window is resized to resize the projection matrix.
void | camera (void)
void | printv (va_list args, const char *format)
| Print axis names.
void | print (const char *format,...)
| Loop for printing axis names.
void | drawAxes ()
| draw axes at defined position More...
void | display (int value)
void | firstDisplay ()
| Called at the start of the program.
void | mouseMovement (int x, int y)
| Called after mouse clicking. It calculates the movement of the mouse and redisplays the scene.
void | mouse (int button, int state, int x, int y)
| Callback for mouse clicks.
void | keyboard (unsigned char key, int x, int y)
| Callback for normal key pressed.
void | windowSpecial (int key, int x, int y)
| Callback for arrow keys.
int | main (int argc, char **argv)

## Variables
const int | TIMER_MILLISECONDS = 100 / TICKS_PER_SECOND
float | xpos = 0
float | ypos = 0
float | zpos = 0
float | xrot = 0
float | yrot = 0
float | angle =0.0
float | lastx
float | lasty
double | dim =300.0
int | windowWidth =512
int | windowHeight =512
int | moving = 0
int | toggleAxes = 1
T_SENTIS_HANDLE | handler
T_ERROR_CODE | error

## Detailed Description

Version
  1.0.0

## Macro Definition Documentation

#define TICKS_PER_SECOND 20

# DESCRIPTION

Example application for the sentis-ToF-m100 camera API

This application shows an OpenGl view which displays 3D images based on 3D coordinates. It uses the XYZ+I data format. The camera is supposed to be at 1,5m from the ground. The vindows shows 300cm*300cm*300cm. The Y and Z axis show +150cm. The X axis points 250cm.

The amplitude values are used to set the color (gray) intensity of the image.

## Function Documentation

void drawAxes | ( |  | ) |

draw axes at defined position

We have defined the height and width of 300cm. the y and z axis show the 150cm positive. The camera shoud be at 1,5m over the ground in order to get a centered image. The depth of the X axis is set to 250cm.

int getFrame | ( | T_SENTIS_HANDLE | handle | ) |

Get a fame from the camera and save it in the global buffer variable.

Parameters

  [in] | T_SENTIS_HANDLE | Camera handler.

int initCamera | ( | T_SENTIS_HANDLE * | handle | ) |

Helper method that starts the connection with the camera and set the default image_data format.

Parameters

  [in,out] | T_SENTIS_HANDLE | * Camera handler.

int stopCamera | ( | T_SENTIS_HANDLE | handle | ) |

Close the connections with the camera and set free data structures.

Parameters

  [in] | T_SENTIS_HANDLE | Camera handler.