Page 1 of 1

How to compare the scene node type?

Posted: Fri Aug 29, 2008 10:43 pm
by johnrico2000
Hi everyone

This is my second day taking a closer look on Jirr and it really fascinates me. It's preety cool so far.

Unfortunately I have come to a point that got me stuck.

I have been loading an irredit scene from an .irr file and would like to set camera collision processing on the loaded meshes now.
I'm orienting myself on the code seen in this thread (http://irrlicht3d.de/forum2/viewtopic.php?f=1&t=724) to recursivly add collision handlers for the meshes of the loaded irredit scene.

My problem is that there a several spots in the C++ code I cannot transfer into the Jirr Java world.

In the code you find things like these:

Code: Select all

if (node->getType() == scene::ESNT_MESH) {...}
or

Code: Select all

if (node->getType() == scene::ESNT_ANIMATED_MESH) {...}
or

Code: Select all

if (node->getType() == scene::ESNT_TERRAIN) {...}
to check the type of a scene node. Depending on that type you possibly have to define different collision handlers on that node.
I have tried really hard, but haven't found a way to transfer the displayed if-statements into Jirr Java code (with Jirr Enumerations for example).

Could someone please advice what to do in order to achieve the semantics of the condinitional expressions above. I would be really grateful for replies and I'm sure this is interesting not only for me.

Regards
Frank

Posted: Thu Sep 04, 2008 8:06 pm
by jirr
Hi Frank,
currently node.getType() returns a swig-pointer instead of an usable java object. Will have a look at this for jirr 1.4.

Big sorry for the meantime.

By the way: a workaround for the moment would be managing the node types within java structures if possible (e.g. using a Hashtable etc.).

Posted: Thu Sep 04, 2008 10:15 pm
by jirr
Just to let you know my current results:

Fixed it by patching irrlicht includes. So as far as I can say I could release a new version shortly after the release of irrlicht 1.4.2+. Due to the opengl bug in irrlicht at least on ati cards there will be no new jirr version before that one will be released since I own and test on ati cards only.

Thank you for your appreciation.

Posted: Fri Sep 05, 2008 6:12 am
by johnrico2000
Hi

Thank you very much for your support!

I'm looking forward to the new Jirr release. But maybe due to lack of patience I will try your ingenious suggestion concerning using Hashmaps!

Regards
Frank

Posted: Sun Oct 05, 2008 11:32 am
by jirr
For your information: current release of jirr 1.4.2 is planned for the end of this month.