void CamaraLucida::init_cml(string kinect_calibration_filename, string proj_calibration_filename, string xml_config_filename) { _inited = true; xml_config.loadFile(xml_config_filename); xml_config.pushTag("camaralucida"); calib.near = xml_config.getValue("near", 0.1); calib.far = xml_config.getValue("far", 20.0); load_data(kinect_calibration_filename, proj_calibration_filename); proj_loc = ofVec3f( proj_RT[12], proj_RT[13], proj_RT[14] ); proj_fwd = ofVec3f( proj_RT[8], proj_RT[9], proj_RT[10] ); proj_up = ofVec3f( proj_RT[4], proj_RT[5], proj_RT[6] ); proj_trg = proj_loc + proj_fwd; rgb_loc = ofVec3f( rgb_RT[12], rgb_RT[13], rgb_RT[14] ); rgb_fwd = ofVec3f( rgb_RT[8], rgb_RT[9], rgb_RT[10] ); rgb_up = ofVec3f( rgb_RT[4], rgb_RT[5], rgb_RT[6] ); rgb_trg = rgb_loc + rgb_fwd; init_keys(); init_events(); init_gl_scene_control(); }
Renderer::Renderer( cml::Config* config, OpticalDevice* proj, OpticalDevice* depth, OpticalDevice* rgb ) { this->proj = proj; this->depth = depth; this->rgb = rgb; _debug = false; _viewpoint = V_DEPTH; ofFbo::Settings s; s.width = config->tex_width; s.height = config->tex_height; s.numSamples = config->tex_nsamples; s.numColorbuffers = 1; s.internalformat = GL_RGBA; fbo.allocate(s); //shader.load(config->render_shader_path); init_gl_scene_control(); }