Spatial.getType() jME - > jME 2 conversion?

Can't find any notes in the conversion guide about the getType function being canned, but its not showing up in my jME2 that I just grabbed this week.

If someone could point me towards the new method of testing spatial types?


getType was a method of SceneElement, which was canned as a whole. As far as i can see there is no substitution for it. That should go into the conversion wiki.

Normally, at least in my case, you want to know if a Spatial is a Node or a Geometry. For that you can use the java operator instanceof:

if(spat instanceof Node {
  // do node stuff
} else if (spat instanceof Geometry {
  // do geom stuff
} // if

Thanks for the quick reply!

Yes its hard to know the entire list of items that were effected by SceneElement, especially if your not a jME "power user".  Perhaps a listing of the SceneElement methods and all the items that used to extend SceneElement would make it easier to figure out.