re-render the scene after changing camera properties

This commit is contained in:
Ozan Tonkal 2013-09-12 19:23:05 +02:00
parent 620d92824c
commit 3f27ba54e0

View File

@ -382,6 +382,9 @@ void cv::viz::Viz3d::VizImpl::setCamera(const Camera &camera)
transform->SetMatrix(convertToVtkMatrix(proj_mat * old_proj_mat.inv()));
active_camera.SetUserTransform(transform);
transform->Delete();
renderer_->ResetCameraClippingRange();
renderer_->Render();
}
/////////////////////////////////////////////////////////////////////////////////////////////
@ -418,6 +421,9 @@ void cv::viz::Viz3d::VizImpl::setViewerPose(const Affine3f &pose)
camera.SetPosition(pos_vec[0], pos_vec[1], pos_vec[2]);
camera.SetFocalPoint(focal_vec[0], focal_vec[1], focal_vec[2]);
camera.SetViewUp(up_vec[0], up_vec[1], up_vec[2]);
renderer_->ResetCameraClippingRange();
renderer_->Render();
}
/////////////////////////////////////////////////////////////////////////////////////////////