LWJGL Forum

Programming => General Java Game Development => Topic started by: zzzzrrr on August 27, 2009, 14:31:25

Title: Polygon Triangulation
Post by: zzzzrrr on August 27, 2009, 14:31:25
Hello,

Please correct me if I'm wrong, but I noticed that LWJGL lacks the GLUtesselator. It just so happens that I've created a small 2d polygon triangulation library in Scala consisting of the the following methods:

- Constrained Delaunay Triangulation w/ support for holes
- Seidel's Triangulation Algorithm

Porting to Java or C++ should be fairly easy.... Any volunteers?  :)

http://code.google.com/p/poly2tri/ (http://code.google.com/p/poly2tri/)
Title: Re: Polygon Triangulation
Post by: pd_ on August 28, 2009, 07:18:08
http://lwjgl.org/forum/index.php?topic=2866.0
http://lwjgl.org/forum/index.php/topic,1568.msg9947.html#msg9947

The request has been up for quite a while it seems.
I hate making requests (I know how awful library development can be), but I can only agree that there should be some focus on implementing this, it is a pretty fundamental feature if you ask me.

Right now people have to import JOGL just for a few GLU features (tesselation NURBS too, if I'm not mistaken here) and that is not a preferable way at all.

Of course I am not sure how this project is organized and all, but looking at the sources it seems that the better part of the GL bindings are simply native methods that call the actual OpenGL library.
Would it not be the same kind of work here (admittedly with some jobject hocus pocus as the GLUTesselator would be an object)?
Title: Re: Polygon Triangulation
Post by: Ciardhubh on August 28, 2009, 09:49:14
Hello,

Please correct me if I'm wrong, but I noticed that LWJGL lacks the GLUtesselator. It just so happens that I've created a small 2d polygon triangulation library in Scala consisting of the the following methods:

- Constrained Delaunay Triangulation w/ support for holes
- Seidel's Triangulation Algorithm

Porting to Java or C++ should be fairly easy.... Any volunteers?  :)

http://code.google.com/p/poly2tri/ (http://code.google.com/p/poly2tri/)

Since Scala compiles to Java-bytecode, could you simply use the compiled classes without porting the source? GLU tesselation is 3D, though.

I always thought LWJGL lacks tesselation however there's something new in LWJGL 2.2.0 (http://www.newdawnsoftware.com/hudson/view/LWJGL/) in org.lwjgl.util.glu.tessellation.*. Does that actually work?
Title: Re: Polygon Triangulation
Post by: pd_ on August 28, 2009, 17:30:08
Ow!
Well, since the latest release is 2.1.0, maybe it's a planned feature for 2.2.0, which would be great!

In that case, sorry for bugging and thanks!