[Marble-devel] Re: Question
Torsten Rahn
tackat at t-online.de
Wed Mar 23 11:21:57 CET 2011
Hi Victor,
On Monday, 21. March 2011 01:29:55 Victor Ponomariov wrote:
> Hello. Could you help me with next problem, please.
> I have downloaded Marble source code and I'm trying to draw a line. I tried
> to do it in paintGround method (in marbleMap class), using painter.
> Everything is ok, except that when I add altitude to line's points I still
> have the line bent across the surface. For example:
>
> GeoDataCoordinates GDC1(0,0,0), GDC2(50*DEG2RAD,50*DEG2RAD,100);
The altitude is given in meters, so it might be hard to spot what's going on.
Please have a look at our testplugin inside
marble/src/plugins/render/test/TestPlugin.cpp , line 157
Using values such as 3000000.0 would make it more obvious whether stuff
regarding altitude works or not :-)
> QPen pen1;
> pen1.setWidth(2);
> pen1.setColor(Qt::red);
> painter.setPen(pen1);
> painter.drawLine(GDC1,GDC2);
The GeoDataLineString has got TessellationFlags that you can set.
One of them is "clampToGround" IIRC.
You could use this in combination with
GeoPainter::drawPolyLine(GeoDataLineString)
in order to tweak the way the line gets painted.
If this still doesn't work then it's a bug in the implementation. We don't
make use of the case of drawing lines across different altitudes in Marble
itself, so this could could possibly be a regression that we haven't caught.
> I got the line like GDC2 has zero altitude. What am I doing wrong?
> Thanks in advance
We are happy about all kinds of feedback or bugfixes.
Best Regards,
Torsten
More information about the Marble-devel
mailing list