Go to the documentation of this file.
55 uint8_t get_nr_cameras()
const;
60 virtual bool put_projection_matrix(
int camera_index,
bool undistorted,
float z_near,
float z_far,
float* projection_matrix)
const = 0;
62 virtual bool put_camera_intrinsics(
int camera_index,
bool undistorted,
float* focal_length_2d_ptr,
float* center_2d_ptr)
const = 0;
70 bool has_error()
const {
return !last_error.empty(); }
72 const std::string& get_last_error()
const;
82 bool is_frame_flipped()
const;
84 bool get_frame(std::vector<uint8_t>& frame_data, uint32_t& width, uint32_t& height,
bool undistorted,
bool maximum_valid_rectangle);
86 bool get_gl_texture_id(uint32_t& tex_id, uint32_t& width, uint32_t& height,
bool undistorted,
float max_valid_texcoord_range[4]);
95 virtual bool initialize_impl() = 0;
96 virtual bool start_impl() = 0;
97 virtual bool stop_impl() = 0;
98 virtual bool get_frame_impl(std::vector<uint8_t>& frame_data, uint32_t& width, uint32_t& height,
bool undistorted,
bool maximum_valid_rectangle) = 0;
99 virtual bool get_gl_texture_id_impl(uint32_t& tex_id, uint32_t& width, uint32_t& height,
bool undistorted,
float max_valid_texcoord_range[4]) = 0;
105 #include <cgv/config/lib_end.h>
CameraFrameSplit
in case of stereo cameras a frame contains images of both eyes either split vertically (left right) o...
Definition: vr_camera.h:30
virtual bool put_camera_intrinsics(int camera_index, bool undistorted, float *focal_length_2d_ptr, float *center_2d_ptr) const =0
write the focal lengths in x- and y-direction to access to focal_length_2d_ptr[0|1] and the texture c...
the vr namespace for virtual reality support
Definition: gl_vr_display.cxx:5
bool has_error() const
check for error
Definition: vr_camera.h:70
CameraFrameFormat
currently only a single frame format supported
Definition: vr_camera.h:25
std::string last_error
store last error as a string to be as flexible as possible
Definition: vr_camera.h:51
a vr kit is composed of headset, two controllers, and two trackers, where all devices can be attached...
Definition: vr_kit.h:69
interface class for vr drivers.
Definition: vr_driver.h:57
interface for mono or stereo cameras in VR headsets
Definition: vr_camera.h:38
virtual bool put_projection_matrix(int camera_index, bool undistorted, float z_near, float z_far, float *projection_matrix) const =0
access to 4x4 matrix in column major format for perspective transformation of camera (0....
CameraState
different status values for a vr camera
Definition: vr_camera.h:18
virtual ~vr_camera()=default
destruct camera
virtual bool put_camera_to_head_matrix(int camera_index, float *pose_matrix) const =0
access to 3x4 matrix in column major format for transformation from camera (0 .. left,...