Is it possible to merge two TriMeshes using the jmonkey engine v2?
For example if I have two cubes and merge them, I would like to get a rectangular parallelepiped.
Yeah, not a problem… Just get the float buffers for each, drop the 8 adjoining vertices, and build it into a single buffer. You shouldn’t even need to change the faces
Yeah, not a problem... Just get the float buffers for each, drop the 8 adjoining vertices, and build it into a single buffer. You shouldn't even need to change the faces :)
Thanks for your respnse.
How would I do that in more complex cases? For example if the boxes overlap? Or have different heights or stuff?
I'm kind of new to jme and was really hoping for a easy way to do this? Something along the lines of [java]initialmesh.merge(anotherMesh)[/java] :)?
If you’re new to jME then there’s really no reason for you to be working with jME2. Jump ship immediately and get on jME3!
That said, no that’s not something that’s built in. If you’re interesting in these sorts of operations then you’ll want to look at boolean and union operations on meshes. This is something that normally falls under the auspices of Blender, but is 100% possible in jME provided you’re willing to expend some effort
The problem is that I’m new to jme, but the project I’m working is not… It has a lot of stuff written for jme2, so I’m stuck with it
Thanks for your help.