Commit 90a75652 authored by pixhawk's avatar pixhawk

Fixed axis colors and added world grid.

parent 096a38ad
This diff is collapsed.
...@@ -62,7 +62,8 @@ public slots: ...@@ -62,7 +62,8 @@ public slots:
private slots: private slots:
void selectFrame(QString text); void selectFrame(QString text);
void showGrid(int state); void showLocalGrid(int state);
void showWorldGrid(int state);
void showTrail(int state); void showTrail(int state);
void showWaypoints(int state); void showWaypoints(int state);
void selectMapSource(int index); void selectMapSource(int index);
...@@ -106,7 +107,8 @@ private: ...@@ -106,7 +107,8 @@ private:
QString& utmZone); QString& utmZone);
void getPosition(double& x, double& y, double& z); void getPosition(double& x, double& y, double& z);
osg::ref_ptr<osg::Geode> createGrid(void); osg::ref_ptr<osg::Geode> createLocalGrid(void);
osg::ref_ptr<osg::Geode> createWorldGrid(void);
osg::ref_ptr<osg::Geode> createTrail(const osg::Vec4& color); osg::ref_ptr<osg::Geode> createTrail(const osg::Vec4& color);
osg::ref_ptr<Imagery> createMap(void); osg::ref_ptr<Imagery> createMap(void);
osg::ref_ptr<osg::Geode> createRGBD3D(void); osg::ref_ptr<osg::Geode> createRGBD3D(void);
...@@ -143,7 +145,8 @@ private: ...@@ -143,7 +145,8 @@ private:
Mode mode; Mode mode;
int selectedWpIndex; int selectedWpIndex;
bool displayGrid; bool displayLocalGrid;
bool displayWorldGrid;
bool displayTrail; bool displayTrail;
bool displayImagery; bool displayImagery;
bool displayWaypoints; bool displayWaypoints;
...@@ -166,7 +169,8 @@ private: ...@@ -166,7 +169,8 @@ private:
osg::ref_ptr<ImageWindowGeode> depth2DGeode; osg::ref_ptr<ImageWindowGeode> depth2DGeode;
osg::ref_ptr<osg::Image> rgbImage; osg::ref_ptr<osg::Image> rgbImage;
osg::ref_ptr<osg::Image> depthImage; osg::ref_ptr<osg::Image> depthImage;
osg::ref_ptr<osg::Geode> gridNode; osg::ref_ptr<osg::Geode> localGridNode;
osg::ref_ptr<osg::Geode> worldGridNode;
osg::ref_ptr<osg::Geode> trailNode; osg::ref_ptr<osg::Geode> trailNode;
osg::ref_ptr<Imagery> mapNode; osg::ref_ptr<Imagery> mapNode;
osg::ref_ptr<WaypointGroupNode> waypointGroupNode; osg::ref_ptr<WaypointGroupNode> waypointGroupNode;
......
...@@ -148,8 +148,8 @@ Q3DWidget::createRobot(void) ...@@ -148,8 +148,8 @@ Q3DWidget::createRobot(void)
osg::ref_ptr<osg::Vec3Array> coords(new osg::Vec3Array(6)); osg::ref_ptr<osg::Vec3Array> coords(new osg::Vec3Array(6));
(*coords)[0] = (*coords)[2] = (*coords)[4] = (*coords)[0] = (*coords)[2] = (*coords)[4] =
osg::Vec3(0.0f, 0.0f, 0.0f); osg::Vec3(0.0f, 0.0f, 0.0f);
(*coords)[1] = osg::Vec3(0.15f, 0.0f, 0.0f); (*coords)[1] = osg::Vec3(0.0f, 0.3f, 0.0f);
(*coords)[3] = osg::Vec3(0.0f, 0.3f, 0.0f); (*coords)[3] = osg::Vec3(0.15f, 0.0f, 0.0f);
(*coords)[5] = osg::Vec3(0.0f, 0.0f, -0.15f); (*coords)[5] = osg::Vec3(0.0f, 0.0f, -0.15f);
geometry->setVertexArray(coords); geometry->setVertexArray(coords);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment