How to use math classes without a game?

I am trying to use jME's Node class in some initial tests where there is no "game" per se, but merely some computation occurring in 3space.

Is this not really possible? 

for instance, If I try

Node node1 = new Node();
Node node2 = new Node();

I notice node1.attachChild(node2) fails on a null pointer


empty constructor for scene classes are internal use only (as specified in the javadoc)  Please use the contructor with a String arg.

Not sure if this is the case with Node, but with most jME objects you need to init the display before you can instantiate the objects as they reference the static display.  An easy way to handle this in a situation where you don't want a graphical display is to use DummyDisplaySystem.


Actually if you are referring to Geometry's use of textureUnits, that was changed a while ago in cvs (and didn't affect Node.)

In theory yes…  It should now just use 1 for number of tex slots if no display is present.  I'd assume you don't care about tex coord slots in what you are doing.  There may be other gotcha areas that hit later after that roadblock though…  :slight_smile:


So I can create spatials now without initiatlizing the DisplaySystem?  If so, can I also run an entire scene without initializing the DummyDisplaySystem?  When I first started writing my physics networking API the DummyDisplaySystem was necessary for the server component because it would throw a NullPointerException if it wasn't there.  I'll try to verify this over the weekend.  It would be neat if I didn't need a display configured for a non-visual scene.