|
|
|
@ -591,6 +591,18 @@ void cv::viz::Viz3d::VizImpl::getCameras (cv::viz::Camera& camera) |
|
|
|
|
camera.window_pos = cv::Vec2d::all(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
void cv::viz::Viz3d::VizImpl::setCamera(const Camera2 &camera) |
|
|
|
|
{ |
|
|
|
|
vtkCamera& active_camera = *renderer_->GetActiveCamera(); |
|
|
|
|
|
|
|
|
|
// Set the intrinsic parameters of the camera
|
|
|
|
|
active_camera.SetUseHorizontalViewAngle (0); // Horizontal view angle is set based on the window size
|
|
|
|
|
active_camera.SetViewAngle (camera.getFov()[1] * 180.0f / CV_PI); |
|
|
|
|
active_camera.SetClippingRange (camera.getClip()[0], camera.getClip()[1]); |
|
|
|
|
window_->SetSize (static_cast<int> (camera.getWindowSize().width), static_cast<int> (camera.getWindowSize().height)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
void cv::viz::Viz3d::VizImpl::setViewerPose(const Affine3f &pose) |
|
|
|
|
{ |
|
|
|
|