Revision 0c8d22a5 src/gaze_state.cpp
| src/gaze_state.cpp | ||
|---|---|---|
| 25 | 25 |
* Excellence Initiative. |
| 26 | 26 |
*/ |
| 27 | 27 |
|
| 28 |
#include "gaze_state.h" |
|
| 29 | 28 |
#include <stdio.h> |
| 30 | 29 |
|
| 31 |
using namespace humotion; |
|
| 32 |
GazeState::GazeState(){
|
|
| 33 |
pan=0.0; |
|
| 34 |
tilt=0.0; |
|
| 35 |
roll=0.0; |
|
| 36 |
vergence=0.0; |
|
| 30 |
#include "humotion/gaze_state.h" |
|
| 31 |
|
|
| 32 |
using humotion::GazeState; |
|
| 33 |
|
|
| 34 |
GazeState::GazeState() {
|
|
| 35 |
pan = 0.0; |
|
| 36 |
tilt = 0.0; |
|
| 37 |
roll = 0.0; |
|
| 38 |
vergence = 0.0; |
|
| 37 | 39 |
|
| 38 | 40 |
pan_offset = 0.0; |
| 39 | 41 |
tilt_offset = 0.0; |
| ... | ... | |
| 51 | 53 |
eyeblink_request_left = 0; |
| 52 | 54 |
} |
| 53 | 55 |
|
| 54 |
GazeState::~GazeState(){
|
|
| 56 |
GazeState::~GazeState() {
|
|
| 55 | 57 |
} |
| 56 | 58 |
|
| 57 |
void GazeState::dump(){
|
|
| 58 |
//dump values to stdout: |
|
| 59 |
printf("> GAZE STATE: %4.2f [%2.1f] %4.2f [%2.1f] %4.2f [%2.1f] (PTR) vergence=%4.2f eyelid_opening=%4.2f/%4.2f eyebrows = %4.2f %4.2f type=%s [ts=%.3f] eyeblink_requests=%d %d\n",
|
|
| 59 |
void GazeState::dump() {
|
|
| 60 |
// dump values to stdout |
|
| 61 |
printf("> GAZE STATE: %4.2f [%2.1f] %4.2f [%2.1f] %4.2f [%2.1f] (PTR) vergence=%4.2f "
|
|
| 62 |
"eyelid_opening=%4.2f/%4.2f eyebrows = %4.2f %4.2f type=%s [ts=%.3f] " |
|
| 63 |
"eyeblink_requests=%d %d\n", |
|
| 60 | 64 |
pan, pan_offset, tilt, tilt_offset, roll, roll_offset, vergence, |
| 61 |
eyelid_opening_upper,eyelid_opening_lower, |
|
| 65 |
eyelid_opening_upper, eyelid_opening_lower,
|
|
| 62 | 66 |
eyebrow_left, eyebrow_right, |
| 63 |
(gaze_type==GAZETYPE_ABSOLUTE?"absolute":(gaze_type==GAZETYPE_RELATIVE?"relative":(gaze_type==GAZETYPE_OVERRIDE?"override":"!INVALID!"))), |
|
| 67 |
(gaze_type == GAZETYPE_ABSOLUTE?"absolute":(gaze_type == GAZETYPE_RELATIVE?"relative": |
|
| 68 |
(gaze_type == GAZETYPE_OVERRIDE?"override":"!INVALID!"))), |
|
| 64 | 69 |
timestamp.to_seconds(), |
| 65 |
eyeblink_request_left, eyeblink_request_right |
|
| 66 |
); |
|
| 70 |
eyeblink_request_left, eyeblink_request_right); |
|
| 67 | 71 |
} |
Also available in: Unified diff