Polyline Rendering

Forums:

If I want to draw polyline between points, what would be the best approach? I don't think this feature is available yet in the current framework, but I do need this feature in my project.

So for example, if I wanna draw a route (like in Google Maps) connecting POIs.

Beyondar's picture

If you want to do it with the google maps, you can access the marker created by the googlemapmodule and draw you lines on the googleap as usual

pablo.espantoso's picture

So it's something like bird's fly path thingy.

pablo.espantoso's picture

No. I want to do it on the AR view (camera overlay). Is it possible?

Beyondar's picture

For now there is no such a feature, but it is possible to do that if you extend the ARRenderer and mak e a custom one just to iterate the objects. If you do that fork the project from github and I will help you with the development :)  https://github.com/BeyondAR/beyondar

pablo.espantoso's picture

The fork is here: https://github.com/8armed-monkey/beyondar

I spent sometimes reading your codes, and I have some questions:

1. I am thinking of adding the following classes: CubeRenderable (for the POI), SphereRenderable (for the POI), BeyondarPolyline (because I don't think we could simply do it with BeyondarObject?), BeyondarPolylineList (same reasoning). And then extending the following classes: World (I wanna add a method: addPolyline), ARRenderer (for the actual rendering of the polyline).

2. I read something about polyline rendering here: http://www.codeproject.com/Articles/226569/Drawing-polylines-by-tessella...... is it possible to use this (because I think we could specify the polygon width) or should we use simple GL_LINES?

3. I am not sure how modules are used, could you explain the concept / how the framework uses them?

Beyondar's picture

Awesome contribution!

I think that you are right with thesphere and cube, but for the lines we could use a module. For now the module will not allow you to do that, but I'm refractoring (and documenting) the module part (see https://github.com/BeyondAR/beyondar/tree/feat/modules) I will also add the posibility to create modules for the OpenGL part, so we can take advantage of that and draw the lines, so you don't need to extend the World, what do you think?

pablo.espantoso's picture

Sure, I agree. Especially since it would be consistent with the rest of the framework. I'll read the modules documentation and see if I could start on something. So the polyline, is it going to be drawn 2D or 3D?

Beyondar's picture

It could be 3D or 2D, that's not a problem (in theory )

Hi,

Is there any progress on this feature? I could also get involved.

Regards,