Giter VIP home page Giter VIP logo

g3m's Introduction

g3m

The multiplatform advanced visualization framework

G3M is a framework developed and designed to:

  • Develop mobile maps apps in 2D, 2,5D and 3D
  • Work with real time data
  • Integrate any kind of data (format,size)
  • Be integrated on any legacy system
  • High performance mobile native development
  • Multi Touch screens
  • Face the problem of the mobile performance as an integrated problem between server & client
  • Online - Offline, cache management
  • Real time, push management

Videos

Architecture

The G3M architecture has been created to have a Multiplatform API creating the fewest possible amount of source code. We have developed a core in C++ that is translated to Java (to work on Android devices) and later is translated to GWT (HTML5 - Javascript) In every platform there are some libraries that must be developed in the diferent prgramming languages, this classes are declared as abstract and must be developed individually for every platform. The result is that we have a native API on IOS, Android and webGL and we can easily add new platforms when it was needed.

Slides

License

G3M is released under a 2 clauses BSD license Except for the Blender plugin exporter which is available under the GPL 2.0 License.:

Information

This project has beed developed with the help of Ministerio de Industria Energía y Turismo. logos logos logos

g3m's People

Contributors

akosmaroy avatar amazingsmash avatar diegogomezdeck avatar g3mbot avatar machanguillo avatar mdelacalle avatar nicodeck97 avatar orthographic-pedant avatar shislim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

g3m's Issues

Problem with MarksRenderer

Hi,

I add MarksRendrer in builder for user position.But when i rebuild globe and change from Spherical to FLAT MarksRenderer make error:

For first enabling to marker rendreder it's ok (picture 1) but when i rebuild globe with new builder i have to problem:
1: In Flat i have a problem in displaying the marker ( picture 2)
2: In Spheerical planet it's impossible to view the marker

device-2013-12-20-100948
device-2013-12-20-100612

How to manipulate globe programatically?

How to zoom in/out the globe programatically? I need to show globe first that will be zoomed yet. Also I want to rotate globe. I tried to do that using setAnimatedCameraPosition(), but don't understand how it works.

Thanks.

WMS parameters

Hi,

On WMS parameters, we tried to choose a more little BBOX with the command : Sector.fromDegrees(-165.27,-53.15,177.13,78.2) instead of Sector.fullSphere()
It doesn't work and error message show url with bounds set out of our bbox.
Here is the list of bbox in url error messages :

-90.0,0.0,0.0,78.2
-90.0,0.0,0.0,78.2
0.0,-53.15,90.0,0.0
0.0,-53.15,90.0,0.0
-90.0,-53.15,0.0,0.0
-90.0,-53.15,0.0,0.0
0.0,0.0,90.0,78.2
0.0,0.0,90.0,78.2

On these parameters, we can set SRS but we can't set CRS which has a default value EPSG:4326.
If we want to join a WMS which provide EPSG:2154 for example. It doesn't work.
How could we set CRS value ?

If the base url of WMS already get a parameter (precede by a "?") the method which make the full request put another "?" in the url instead of a "&".
(Example : http://azar.akka.eu/cgi-bin/mapserv?map=maps/azardev.map?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=256&HEIGHT=256&BBOX=0.0,41.122,18.3832,50.6373&CRS=EPSG:4326&LAYERS=ScanMilAIP&FORMAT=image/png&SRS=EPSG:4326&STYLES=&TRANSPARENT=TRUE)

Finally, can we choose the projection of the map returned (to force server send Mercator or not) ? And how ?

Thanks !

Specific BBOX for WMS Layer

Hi,

How can i use Sector.fromDegrees() to speicify an BBOX for my Layer in Android Application.
My BBOX is: -90 , -180, 90, 180

Thanks

Marks not display - depending on camera pitch?

I placed a number of marks into a MarksRenderer, with specifying minDistanceToCamera as 0. interestingly some marks are not displayed, depending on camera attitude?

please see to screenshots attached, which are of the very same app, a few seconds apart. on one, the Marks are there, on the other, they are not

I wonder what the cause of this issue is, and how to solve

(can provide source code if needed)

device-2013-12-13-134043
device-2013-12-13-134031

Add {culture} support for BingMapsLayer

Hey guys,

when trying to implement localized maps for different languages using a BingMapsLayer, I came across the possibility to add the {culture} parameter to the layer's tile petitions, which in turn results in map tiles for different languages. However, the culture parameter has been hardcoded to the default value, "en-US":

BingMapsLayer.java:createTileMapPetitions(G3MRenderContext rc, LayerTilesRenderParameters layerTilesRenderParameters, Tile tile) {
    …
    path = su.replaceSubstring(path, "{subdomain}", subdomain);
    path = su.replaceSubstring(path, "{quadkey}", quadkey);
    path = su.replaceSubstring(path, "{culture}", "en-US");
    …
}

Do you plan to allow other values for BingMapsLayer's culture parameter being passed in to this call in the future?

Thanks in advance! Best regards,
Marcel

out of memory error on android

Hi,

I'm experimenting with a simple code sample with g3m on Android, and I consintently get an out of memory exception. my code is a very simple activity:

public class MainActivity extends Activity {

    private G3MWidget_Android g3mWidget;
    private FlyTo flyTo;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Sector demSector = new Sector(Geodetic2D.fromDegrees(45.9, 7.6),
                                      Geodetic2D.fromDegrees(47.5, 9));

        final ElevationDataProvider dem = new SingleBillElevationDataProvider(
                new URL("file:///elev.bil", false), demSector,
                   new Vector2I(576, 504), 0);

        final G3MBuilder_Android builder = new G3MBuilder_Android(this);
        builder.getPlanetRendererBuilder().setElevationDataProvider(dem);
        g3mWidget = builder.createWidget();

        G3MWidget g3mw = g3mWidget.getG3MWidget(); 

        g3mw.setCameraPosition(Geodetic3D.fromDegrees(46.1389694, 8.7644777, 851.89));
        g3mw.setCameraHeading(Angle.fromDegrees(81.9));
        g3mw.setCameraPitch(Angle.fromDegrees(90.74));


            final LinearLayout layout = (LinearLayout) findViewById(R.id.glob3);
        layout.addView(g3mWidget);
    }
}

where elev.bil is a file I got by the following URL:

http://data.worldwind.arc.nasa.gov/elev?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=srtm30&STYLES=&FORMAT=image/bil&CRS=EPSG:4326&BBOX=45.9,7.6,47.5,9&WIDTH=576&HEIGHT=504

and after a short while, the exception I get is always the same:

12-10 14:10:45.133: W/dalvikvm(1576): threadid=14: thread exiting with uncaught exception (group=0x409c01f8)
12-10 14:10:45.133: E/AndroidRuntime(1576): FATAL EXCEPTION: Downloader_WorkerThread #2
12-10 14:10:45.133: E/AndroidRuntime(1576): java.lang.OutOfMemoryError
12-10 14:10:45.133: E/AndroidRuntime(1576):     at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method)
12-10 14:10:45.133: E/AndroidRuntime(1576):     at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:424)
12-10 14:10:45.133: E/AndroidRuntime(1576):     at org.glob3.mobile.specific.Downloader_Android_Handler.decodeImage(Downloader_Android_Handler.java:233)
12-10 14:10:45.133: E/AndroidRuntime(1576):     at org.glob3.mobile.specific.Downloader_Android_Handler.runWithDownloader(Downloader_Android_Handler.java:225)
12-10 14:10:45.133: E/AndroidRuntime(1576):     at org.glob3.mobile.specific.Downloader_Android_WorkerThread.run(Downloader_Android_WorkerThread.java:59)
12-10 14:10:46.384: I/dalvikvm-heap(1576): Clamp target GC heap from 64.543MB to 64.000MB
12-10 14:10:46.394: I/dalvikvm-heap(1576): Forcing collection of SoftReferences for 262160-byte allocation
12-10 14:10:46.524: I/dalvikvm-heap(1576): Clamp target GC heap from 64.541MB to 64.000MB
12-10 14:10:46.524: E/dalvikvm-heap(1576): Out of memory on a 262160-byte allocation.

Rounding Issues for Matrix/Viewport

Hey guys,

after setting a camera constraint to the zero Vector to block the axis and keep the north/south ratio alive i got an error with the view port/matrix.

The globe moves off the camera screen when i'm trying to rotate a little bit more (especially when i am zoomed out very far).

Any ideas how to fix it? This is an iOS only bug. The same thing works great on Android.

I assume it is a bug with converting the doubles or the values below zero.

best regards
break2k

WMS Layer add in globe3D in Android Application?

Hi,

I want to integrrate WMS Layer with g3m and i use:

final WMSLayer blueMarble = new WMSLayer("RAS_RIDGE_NEXRAD", new URL(
"http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?", false),
WMSServerVersion.WMS_1_1_0, Sector.fullSphere(), "image/png",
"EPSG:900913", "", false, new LevelTileCondition(0, 18),
TimeInterval.fromDays(30), true);

full exxample to get from server is : http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=RAS_RIDGE_NEXRAD&STYLES=&FORMAT=image%2Fpng&TRANSPARENT=true&HEIGHT=256&WIDTH=256&SRS=EPSG%3A900913&BBOX=-12523442.714243276,5009377.085697313,-11897270.578531113,5635549.221409475

When i show result in my application i have White Globe if isTransparent= false and black globe when isTransparent = true.

And when i integrate other layer to suporpose my layer i have a message: "Inconsistency in Layer's Prametres: MErcator "

Thanks for help

2D Map

How can i change from 3D to 2D views and center map in specific point?

Change opacity

When we display a WMS layer on top of another one, by default the opacity is 1, so the user only see the top layer. Is it possible to change this opacity so users can see the base layer in transparency ?

issues when trying to compile for android using eclipse

Hi,

I'm trying to compile the sources available here on github for Android, using eclipse. It doesn't work 'out of the box', please see the issues outlined here. I'd appreciate guidance on how to 'properly' do this (as the README doesn't really provide a lot of details)

after cloning the repository, first I'm importing the G3MSharedSDK project into eclipse, as 'import existing project into workspace'. this seems to work fine.

then I'm importing G3MAndroidSDK as as 'import existing project into workspace'. so far no error reports from eclipse

then I'm importing G3MAndroidDemo as as 'import existing project into workspace'. here I'm getting the following error message from eclipse:

Description Resource    Path    Location    Type
The container 'Android Dependencies' references non existing library '/home/akos/src/glob3mobile/g3m/Android/G3MAndroidSDK/bin/g3mandroidsdk.jar'   G3MAndroidDemo      Build path  Build Path Problem

and indeed, the G3MAndroidSDK project did not build this jar from eclipse. moreover, I'm not seeing other build tool descriptions either, like maven, etc that would build this jar

I wonder how to proceed from here?

suggestion: use C++ namespaces to achieve proper Java packages

looking at the C++ to Java conversion process, I'd suggest using C++ namespaces, which would result in proper Java packages. this way the 'hackish' approach to prepend a Java 'package foo.barl;' statement in front of generated Java source files can be avoided easily.

for example, the following:

namespace foo::bar {

class A {
public:
    int a;
};

}

is converted to:

package foo.bar;

public class A
{
   public int a;
}

with proper namespacing

'hello world'-like sample app displays nothing

Hi,

I'm trying to create a very basic sample app using g3m, by following the README documentation and the demo code - but I get 'nothing' for a display :( please find the following screenshot attached:

screenshot

the code I used is based on a generic 'Hello, World' app generated by eclipse, and then adding a few lines to add a G3MWidget_Android instance. here is my MainActivity.java:

package aero.schwa.av;

import org.glob3.mobile.specific.G3MBuilder_Android;
import org.glob3.mobile.specific.G3MWidget_Android;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.LinearLayout;

public class MainActivity extends Activity {

    private G3MWidget_Android _g3mWidget;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        final G3MBuilder_Android builder = new G3MBuilder_Android(this);
         _g3mWidget = builder.createWidget();

        final LinearLayout layout = (LinearLayout) findViewById(R.id.glob3);
        layout.addView(_g3mWidget);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

}

and my layout file:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <LinearLayout
           android:id="@+id/glob3"
           android:layout_width="fill_parent"
           android:layout_height="match_parent"
           android:orientation="horizontal" >

    </LinearLayout>

</RelativeLayout>

besides these, I didn't really anything in the Hello World project - other than adding a dependency on the G3M Android SDK.

what am I doing wrong?

the 'official' demo compiles & runs fine

Akos

Add Support to token in WMS Layer

Hi,

To get data from server we need sometimes and for reason of security to use a token to identify connection and authentification. In this time probably g3m not support add token params when i initialized a WMS Layer.

Thanks

Pinch to zoom Listner and save globe orientation

Hi,

I have 2 question:

1: How can i add zoom listner ( or camera distance listner) for globe on pich zoom.

2: How can i disable map rotation relative his center ( I want this: scroll/drag N / S or W / E but the card must remain oriented N / S (no rotation))

Thanks

Block drag when Geodectic Position isNaN in Flat Planet

Hi,

How can i block drag in gloge when Geodectic position in ICameraConstrainer become isNaN.

I use ICameraConstrainer Interface an di found the solution when getGeodeticCenterOfView().isNaN() but not when getGeodeticPosition become NaN
So user never show background of globe.

Thanks

C++ to Java code generation issues

Hi,

I'm trying to reproduce C++ to Java code generation using the Tangible Software C++ to Java code converter. I'm doing this based on files in the converter directory. I'm doing this in Linux using wine. Please see my attempt at re-creating convert.bat as a bash script.

I seem to get three errors when trying to compile the generated .java files:

java_temp/Arrays.java:2: error: class, interface, or enum expected
package tangible;
^
java_temp/Matrix44DMultiplicationHolder.java:5: error: illegal start of type
  private final super[][] _providers;
                ^
java_temp/Matrix44DMultiplicationHolder.java:5: error: ';' expected
  private final super[][] _providers;
                         ^
java_temp/Matrix44DMultiplicationHolder.java:5: error: <identifier> expected
  private final super[][] _providers;
                                    ^
4 errors

the first error comes from the fact that the code converter creates an Arrays.java source with package tangible, but the script prefixes this with the g3m generated pacakge prefix as well. this can be fixed easily.

the other three issues come from Matrix44DProvider.hpp having the following:

class Matrix44DMultiplicationHolder : public Matrix44DProvider {
private:
  const Matrix44D** _matrix;
  const Matrix44DProvider** _providers;
  int _nMatrix;
  mutable Matrix44D* _modelview;
...

where in const Matrix44DProvider** _providers; the type Matrix44DProvider is converted to 'super' by the C++ to Java converter.

I wonder if you have encountered similar issues, and have been able to solve them somehow

PS: convert.bat as a bash script until the java compilation step:

#!/bin/bash

echo Project G3M
echo Init conversion from C++ to Java ....

commons=../iOS/G3MiOSSDK/Commons
java_temp=java_temp
cpp_temp=c_temp
package_path=org.glob3.mobile.generated
android_project=../Android/G3MAndroidSDK/src/org/glob3/mobile/generated
# *** PROYECTO WEBGL: DESCOMENTAR LA SIGUIENTE LINEA
# set "gwt_project=..\HTML5\Glob3WebGLSDK\org\glob3\mobile\generated"

# Se eliminan los archivos temporales para asegurar que no haya quedado nada de conversiones anteriores
rm -rf $cpp_temp
rm -rf $java_temp
mkdir -p $cpp_temp
mkdir -p $java_temp
# echo package %package_path%; > headers.txt

# Se mueve todo el c�digo fuente en C++ a la misma carpeta
cp -a $commons/*/* $cpp_temp;

# Se recupera el ejecutable
# ren conversionapp.dat converter.exe

# set "appdata=AppData\Roaming"
# set "osversion=ver | find "Windows""
# rem echo %osversion%

# set "RutaTangible=AppData\Roaming"
RutaTangible="/home/akos/.wine/drive_c/Program Files/Tangible Software Solutions/CPlusPlus to Java Converter"
userprofile="/home/akos/.wine/drive_c/users/akos/Application Data"

# TODO: copy the conversion stuff
cp "C++ to Java Converter.dat" "$userprofile/Tangible Software Solutions Inc/C++ to Java Converter/C++ to Java Converter.dat"

# Llamada al conversor
#"%userprofile%\%RutaTangible%\Tangible Software Solutions Inc\C++ to Java Converter\converter" %cpp_temp% %java_temp%
wine "$RutaTangible/C++ to Java Converter.exe" $cpp_temp $java_temp

# Se vuelve a ocultar
# ren converter.exe conversionapp.dat

echo Copying files...

# Se eliminan archivos vac�os que genera el conversor
#2>nul del %java_temp%\*1.java

# Inclusi�n de las declaraciones de paquetes en cada fichero
for FILE in $(ls $java_temp/*.java); do
    # remove DOS-style line feeds and move to temp file
    cat $FILE | tr -d "\r" > $$.java
    # remove UTF-8 byte-order mark
    sed -i 's/^\xef\xbb\xbf//' $$.java
    # add package declaration
    echo "package org.glob3.mobile.generated;" > $FILE
    cat $$.java >> $FILE
    rm $$.java
done

# Los ficheros de la forma GlobalMembers_x son incorrectos y se eliminan
rm $java_temp/GlobalMembers_*.java

javac -Xstdout compile_errors.txt $java_temp/*.java

set zoom constraint

Hello!

Thank you very much for you framework and for helping me. Now I have one more question. Is it possible to set zoom range or constraint for max/min zooming? If it's impossible at the moment, can you tell me where I can find code that makes touch/zoom works?

set transparent background

Hello!

I want to set background a repeating video, using VideView. But when I set on builder background transparent color, it doesn't works and background is black.

CompositeElevationDataProvider NPE

when trying to use CompositeElevationDataProvider like this:

CompositeElevationDataProvider dem = new CompositeElevationDataProvider();

dem.addElevationDataProvider(...);

it will throw a NullPointerException, becaue here:

 public final void addElevationDataProvider(ElevationDataProvider edp)
  {
    _providers.add(edp);
    if (_context != null)
    {
      edp.initialize(_context);
    }

    edp.setChangedListener(_changedListener); //Setting Changed Listener on child

    onChanged();
  }

_changedListener is null, and onChanged() is defined as follows in ElevationDataProvider:

public final void onChanged()
  {
    _changedListener.changed();
  }

it might make sense to add a null-check for _changedListener into onChanged()

please add renderTileMeshes option to PlanetRenderer

so that one can enable / disable mesh rendering not just when building the planet renderer, but after it has been built as well

thank you

(sorry for not sending a patch - I haven't set up C++ -> Java translation yet)

AltitudeMode

Hi,

I am creating BoxShape on a SphericalPlanet using a DEM.
We set AltitudeMode.RELATIVE_TO_GROUND on the constructor of the BoxShape but boxes are under the floor on montainous areas.

Is it normal ?
Is there an other way to set them relative to the DEM's floor ?

Thanks !

ability to change the camera field of view?

I wonder how would one change the camera field of view, so that a wider angle camera view is made possible?

I'm looking at Camera::calculateFrustumData(), and it seems the _tanHalfFieldOfView value would specify this angle, which is a burned-in constant. if I change this I seem to get expected results.

can you please confirm that indeed this is the way of changing the field of view

would you be open to change the API so that this value can be changed from outside of the library, through a public method?

release Android resources

Hi.

I realized a mechanism for downloading textures from assets. I use globe in a fragment, which I set visible/invisible, and destroy when go to other fragment. I noticed that my heap grows after recreating globe fragment. I think it's copies of textures, that recreates after new fragment creating. How can I release it when calls onDestroy() in fragment? I set there g3mWidget.getG3MWidget().dispose();
builder.dispose();
but it has no effect. Where did textures store and how to clear them?

catch 22: G3MWidget.initSingletons() and G3MBuilder setup

I bumped into a catch-22 like situation.

one has to set up G3MBuilder before creating a G3MWidget on Android, which might need some of the singletons created in G3MWidget.initSingletons() - for example, the StringBuilder, used by G3M's URL class. but these singletons are not initialized before G3MBuilder.createWidget() is called.

moreover, one can't postpone this setup to after .createWidget(), as the possibility is not there to change some of the aspects of the widget after build (for example the ElevationDataProvider cannot be changed afterwards)

I wonder what the proper solution to this problem is

Custom Texture

Hi I need to load a custom texture for my globe, there is the ability to load textures from PNG files? I read in one of the previous posts that you can go any load texture loading them know a local server, how can this be done?

Adding decorations (meshes? symbols?) to globle after initialization

Hi,
All examples that I could find decorate the globe during widget initialization phase. In my application, users should be able to initiate adding various decorations (lines, markers, etc.) to the globe. How is that done?
A snippet of example code would be very helpful, too.

Change opacity in Android application based on g3m

When we display a WMS layer on top of another one, by default the opacity is 1, so the user only see the top layer. Is it possible to change this opacity so users can see the base layer in transparency ?

The multiThread problem?

hi, i have gotten the iOS demo ,but i can not understand the construction of this Demo,
especially about how the threads work, could you give me some advices,
besides, what is your method that update the C++ files' data via the Object-c's function of NSOperationQueue.

Download Layer in Android Application

Hi,

In my application i have to add many WMSLayer in some time.
For exemple i have OpenStreetMap Layer and i want to add temperature Layer.But, when temperature Layer is not in cash and i have to download it. and when downloading I want to save globe and Open Street Map Layer avaliable for user.

So, Downloading layer in Background (Without black screen for user and save globe state ) and when finish add layer in globe.

Solution to do this?

thanks

setPlanet builder Android

Hi,

How can i modif Planet for builder without renit it:

builder.setPlanet(Planet.createSphericalEarth());

to

builder.setPlanet(Planet.createFlatEarth());

without renit

suggestion: add access to G3MWidget's effects scheduler

I'm trying to create my own camera movement effect, which is based on the CameraGoToPositionEffect class. I'd like to use it the same way, but I can't add it to G3MWidget._effectsScheduler, as there is no accessor function for this member of G3MWidget.

is this by design?

if so, how would one create & regularly update his own effect scheduler (as done in the render() function of G3MWidget)?

of not, then I'd suggest adding a getter function to the EffectsScheduler instance, so that users of G3MWidget can add effects to it

enabling / disabling elevation data causes crash

I'm trying to dynamically enable / disable the display of elevation data by calling:

    g3mWidget.getG3MWidget().getPlanetRenderer().setElevationDataProvider(
                                        elevationMap ? dem : null, false);

where dem is a CompositeElevationDataProvider holding SingleBillElevationDataProvider objects, and elevationMap is a boolean value holding the preference if the elevation data should be shown. this seems to work for enabling elevation data (setting dem), and then disabling (setting null). but setting / resetting eventually results in the following exception:

12-20 10:31:33.495: E/AndroidRuntime(26498): FATAL EXCEPTION: GLThread 118043
12-20 10:31:33.495: E/AndroidRuntime(26498): java.lang.ClassCastException: org.glob3.mobile.generated.IndexedGeometryMesh cannot be cast to org.glob3.mobile.generated.MeshHolder
12-20 10:31:33.495: E/AndroidRuntime(26498):    at org.glob3.mobile.generated.Tile.getTessellatorMesh(Tile.java:171)
12-20 10:31:33.495: E/AndroidRuntime(26498):    at org.glob3.mobile.generated.Tile.rawRender(Tile.java:325)
12-20 10:31:33.495: E/AndroidRuntime(26498):    at org.glob3.mobile.generated.Tile.render(Tile.java:743)
12-20 10:31:33.495: E/AndroidRuntime(26498):    at org.glob3.mobile.generated.PlanetRenderer.render(PlanetRenderer.java:484)
12-20 10:31:33.495: E/AndroidRuntime(26498):    at org.glob3.mobile.generated.CompositeRenderer.render(CompositeRenderer.java:128)
12-20 10:31:33.495: E/AndroidRuntime(26498):    at org.glob3.mobile.generated.G3MWidget.render(G3MWidget.java:234)
12-20 10:31:33.495: E/AndroidRuntime(26498):    at org.glob3.mobile.specific.ES2Renderer.onDrawFrame(ES2Renderer.java:64)
12-20 10:31:33.495: E/AndroidRuntime(26498):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
12-20 10:31:33.495: E/AndroidRuntime(26498):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

Camera.setGeodeticPosition() 'look-down issue'

I've encountered a strange issue: when setting the camera position & angle & pitch frequently, the camera view starts to 'flicker'. after investigating the issue, my conclusion is that this is caused by Camera.setGeodeticPosition() setting a setPitch(Angle.zero()); and the re-setting both heading & pitch to the 'old value'

the easiest way to reproduce this is to call setGeodeticPosition() paralelly in an asnyc manner

but even when this is called sequentially (say via a synchronized function only), it will still display this effect, if these setters are called frequently enough.

can provide source code if needed for verification

3D Polygon

Hi

Is there a way to draw 3D polygon on a planet ?

I've found BoxShape and QuadShape but it's a 3D square or a flat 2D rectangle.
I would like to draw a 2D Polygon and give him a low height and a high height to make volume.

Thanks !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.