1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef MAPDRAWER_H
- #define MAPDRAWER_H
- #include"Atlas.h"
- #include"MapPoint.h"
- #include"KeyFrame.h"
- #include<pangolin/pangolin.h>
- #include<mutex>
- namespace ORB_SLAM3
- {
- class MapDrawer
- {
- public:
- MapDrawer(Atlas* pAtlas, const string &strSettingPath);
- Atlas* mpAtlas;
- void DrawMapPoints();
- void DrawKeyFrames(const bool bDrawKF, const bool bDrawGraph, const bool bDrawInertialGraph);
- void DrawCurrentCamera(pangolin::OpenGlMatrix &Twc);
- void SetCurrentCameraPose(const cv::Mat &Tcw);
- void SetReferenceKeyFrame(KeyFrame *pKF);
- void GetCurrentOpenGLCameraMatrix(pangolin::OpenGlMatrix &M, pangolin::OpenGlMatrix &MOw);
- void GetCurrentOpenGLCameraMatrix(pangolin::OpenGlMatrix &M, pangolin::OpenGlMatrix &MOw, pangolin::OpenGlMatrix &MTwwp);
- private:
- float mKeyFrameSize;
- float mKeyFrameLineWidth;
- float mGraphLineWidth;
- float mPointSize;
- float mCameraSize;
- float mCameraLineWidth;
- cv::Mat mCameraPose;
- std::mutex mMutexCamera;
- float mfFrameColors[6][3] = {{0.0f, 0.0f, 1.0f},
- {0.8f, 0.4f, 1.0f},
- {1.0f, 0.2f, 0.4f},
- {0.6f, 0.0f, 1.0f},
- {1.0f, 1.0f, 0.0f},
- {0.0f, 1.0f, 1.0f}};
- };
- }
- #endif
|