Add const to getViewerPose()

getViewerPose() doesn't modify an object of the class so it can be
made const. It also makes this method consistent with other getters
in the class as they are defined as const.
pull/9889/head
Igor Wodiany 7 years ago
parent a6c02af099
commit d7cbe6e947
No known key found for this signature in database
GPG Key ID: A036D7BA617AD3B1
  1. 2
      modules/viz/src/vizimpl.cpp
  2. 2
      modules/viz/src/vizimpl.hpp

@ -509,7 +509,7 @@ void cv::viz::Viz3d::VizImpl::setViewerPose(const Affine3d &pose)
} }
///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
cv::Affine3d cv::viz::Viz3d::VizImpl::getViewerPose() cv::Affine3d cv::viz::Viz3d::VizImpl::getViewerPose() const
{ {
vtkCamera& camera = *renderer_->GetActiveCamera(); vtkCamera& camera = *renderer_->GetActiveCamera();

@ -88,7 +88,7 @@ public:
void resetCamera(); void resetCamera();
void setViewerPose(const Affine3d &pose); void setViewerPose(const Affine3d &pose);
Affine3d getViewerPose(); Affine3d getViewerPose() const;
void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord); void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord);
void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction); void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction);

Loading…
Cancel
Save