Browse Source

Fixed coordinate frame issue in overlay. Outstanding issue of slow rendering of large overlays.

QGC4.4
hengli 13 years ago
parent
commit
3027f1aeeb
  1. 10
      src/ui/map3D/GLOverlayGeode.cc
  2. 4
      src/ui/map3D/GLOverlayGeode.h

10
src/ui/map3D/GLOverlayGeode.cc

@ -1,15 +1,16 @@ @@ -1,15 +1,16 @@
#include "GLOverlayGeode.h"
GLOverlayGeode::GLOverlayGeode()
: mDrawable()
: mDrawable(new GLOverlayDrawable)
{
addDrawable(mDrawable);
}
void
GLOverlayGeode::setOverlay(px::GLOverlay &overlay)
{
mDrawable.setOverlay(overlay);
mDrawable->setOverlay(overlay);
mCoordinateFrameType = overlay.coordinateframetype();
dirtyBound();
}
@ -136,6 +137,9 @@ GLOverlayGeode::GLOverlayDrawable::drawImplementation(osg::RenderInfo&) const @@ -136,6 +137,9 @@ GLOverlayGeode::GLOverlayDrawable::drawImplementation(osg::RenderInfo&) const
glPushMatrix();
glScalef(-1.0f, 1.0f, 1.0f);
glRotatef(90.0f, 0.0f, 0.0f, 1.0f);
const std::string& data = mOverlay.data();
for (size_t i = 0; i < data.size(); ++i)

4
src/ui/map3D/GLOverlayGeode.h

@ -28,7 +28,7 @@ private: @@ -28,7 +28,7 @@ private:
virtual void drawImplementation(osg::RenderInfo&) const;
osg::BoundingBox computeBound() const;
virtual osg::BoundingBox computeBound() const;
private:
float getFloatValue(const std::string& data, size_t& mark) const;
@ -37,7 +37,7 @@ private: @@ -37,7 +37,7 @@ private:
osg::BoundingBox mBBox;
};
GLOverlayDrawable mDrawable;
osg::ref_ptr<GLOverlayDrawable> mDrawable;
px::GLOverlay::CoordinateFrameType mCoordinateFrameType;
};

Loading…
Cancel
Save