01 void tickerCallback(void *data, SoSensor *) 02 { 03 // Pointer to camera 04 SoCamera *camera = (SoCamera *) data; 05 SbRotation rot; 06 SbMatrix mtx; 07 SbVec3f pos; 08 09 // Rotate camera 10 pos = camera->position.getValue(); 11 rot = SbRotation(SbVec3f(0,1,0), ROTATION_ANGLE); 12 mtx.setRotate(rot); 13 mtx.multVecMatrix(pos, pos); 14 camera->position.setValue(pos); 15 16 // Correct orientation of camera 17 camera->orientation.setValue(camera ->orientation.getValue() * rot); 18 }