CloudViewer: added camera Ortho mode context menu option

This commit is contained in:
matlabbe
2018-08-28 17:07:36 -04:00
parent 7cb39f02f2
commit 3e6f14f3bd
4 changed files with 96 additions and 9 deletions

View File

@@ -329,6 +329,7 @@ public:
bool isCameraTargetFollow() const;
bool isCameraFree() const;
bool isCameraLockZ() const;
bool isCameraOrtho() const;
bool isGridShown() const;
unsigned int getGridCellCount() const;
float getGridCellSize() const;
@@ -341,6 +342,7 @@ public:
void setCameraTargetFollow(bool enabled = true);
void setCameraFree();
void setCameraLockZ(bool enabled = true);
void setCameraOrtho(bool enabled = true);
void setGridShown(bool shown);
void setNormalsShown(bool shown);
void setGridCellCount(unsigned int count);
@@ -387,6 +389,7 @@ private:
QAction * _aFollowCamera;
QAction * _aResetCamera;
QAction * _aLockViewZ;
QAction * _aCameraOrtho;
QAction * _aShowTrajectory;
QAction * _aSetTrajectorySize;
QAction * _aClearTrajectory;

View File

@@ -28,6 +28,7 @@ public:
public:
CloudViewerInteractorStyle();
virtual void Rotate();
void setOrthoMode(bool enabled);
protected:
virtual void OnMouseMove();
virtual void OnLeftButtonDown();
@@ -43,6 +44,7 @@ private:
int ResetPixelDistance;
float PreviousMeasure[3];
pcl::PointCloud<pcl::PointXYZRGB>::Ptr pointsHolder_;
bool orthoMode_;
};
} /* namespace rtabmap */