Best way to pass "something" to an Application

Hi to everyone,

in first place, thanks for the awesome work you have made in developing jMonkey.

Actually I’m using your engine in order to port my university teacher’s graphic language (which it’s called pyplasm) into Clojure (a functional language based on JMV).

In pyplasm, you can do this:




This instruction display (i.e render) a 1x1x1 cube. As you can see you can pass a geometry object to the VIEW function and have it displayed on screen. CUBE(n) is a function that returns a nxnxn cube, of course.

Again, check this instruction in pyplasm:




This instruction merge together two cubes (into a single geometry object) and display it on the screen (as before).

I’m writing all this stuff in order to ask you:

  1. Is it possibile to merge together two (or more) Geometry object into a single one?
  2. If the answer to the first question is yes, then I can write my Application class passing from outside only a single Geometry object, otherwise can you suggest me the best way to pass from outside Geometry objects and display ALL of them to the screen?

    I hope to have been clear (after all, English is not my native language, as you can guess by my nickname ::slight_smile: )



Use GeometryBatchFactory to combine geometry.

Thanks for the quick reply, I will take a look GeometryBatchFactory.

For now, I’ve decided to put all the Geometries I want to display into a geomsNode and attach this node to the rootNode of my Application.

Thanks again,


oO If that solution was not apparent to you you should really do the tutorials.

No no it’s just straightforward, I mean… I know how a scenegraph engine is made, but for a minute I’ve forgot about the possibility to attach a node to another hahaha :stuck_out_tongue:

The tutorials teach you more about jME than the headlines suggest. If you’re really good you can just omit doing the real code and solve the questions in your head but I strongly suggest actually reading them through.

I will :slight_smile:

Thanks again,

see u.