My GeometryBatch class on the Wiki is broken!

I wrote this a while ago and I was rather proud, despite its simplicity. Now it doesn't compile at all so I'll have to spend some time fixing it! Bugger!  :x :smiley:

/home/mike/Development/Java/Terrain1/src/ getVertexBuffer(int) in com.jme.scene.Geometry cannot be applied to ()

        FloatBuffer vertices = BufferUtils.clone(mesh.getVertexBuffer());

        int total = this.getIndexBuffer().capacity() + mesh.getIndexBuffer().capacity();

/home/mike/Development/Java/Terrain1/src/ incompatible types

found  : java.lang.String

required: int

        int total = this.getIndexBuffer().capacity() + mesh.getIndexBuffer().capacity();

/home/mike/Development/Java/Terrain1/src/ getIndexBuffer(int) in com.jme.scene.TriMesh cannot be applied to ()

Hopefully it won't be too painful. I don't think anyone else has used my class so there's no rush…

You have to specify the batch (jME style batch) get*Buffer. If there's only 1 it's always 0. so getIndexBuffer(0)/

And you have to rename your class. Really :slight_smile: it's too confusing.

Is the name confusing because of the GeomBatch class in JME?

I personally think so, yes. As you know I helped you a bit with this class but when I saw the topic I had to squint my eyes a bit before I remembered that this isn't about batches (ok, it was early too).

What about GeometryMerger or something? I acually think it's a more accurate description.

Ok, I personally think it's ok, but to help clear things up for others I'll try to find something more appropriate.

Thanks!  :smiley: