glob3mobile / g3m

The multiplatform advanced visualization framework
http://www.glob3mobile.com/
Other
117 stars 56 forks source link

PeriodicalTask problem #160

Open Userpack4 opened 8 years ago

Userpack4 commented 8 years ago

Hi, I have yet another problem with my 3d android application. In onCreate method I've set this:

builder = new G3MBuilder_Android(this);
layerSet = new LayerSet();

WMSLayer blueMarble = LayerBuilder.createBlueMarbleLayer(true);
layerSet.addLayer(blueMarble);
builder.getPlanetRendererBuilder().setLayerSet(layerSet);
…….
builder.setInitializationTask(initGlobe());

initGlobe() is my GinitializationTask where i have created the Mark Then:

builder.addPeriodicalTask(updateTime3DPeriodicaLtask());
g3mWidget = builder.createWidget();

The problem is with the PeriodicalTask updateTime3DPeriodicaLtask It perform some calculation that change the Geodetic3D position of the mark via setPosition every 1 seconds. To make the mark centered on the globe I call, inside PeriodicalTask:

g3mWidget.setCameraPosition(position);

The problem: after some changing position the mark disappear and, after some time, reappear.

When the changing position are not great it seems to perform well. When the changing position make the globe to rotate more quickly the problem appear. If anyone can give me some hint…..thanks all.