I have a custom Node subclass for type 2 objects. In it's onDraw() method it checks it's square distance to display.getRenderer().getCamera()'s location and just returns if that is greater than a specified threshold value. Would that work for you?
- Is it enough to overwrite only the onDraw method (and add my special feature)? Is there something important to know about it?
As I said, for me it works exactly like that. If there are any major pitfalls to that method, they have slipped my mind.
fugedi.zsolt said:
- How can I get the bounding volume of a node? ()
Node.getWorldBound()
fugedi.zsolt said:
- How can I get the distance of a bounding volume from a location?
I think you'd have to compute that yourself. In my approach I describe above, I don't care for bounding volumes of faraway (type 2) objects, i just use their model origin coordinates for distance calculation.
For in-depth information about any of the above and beyond try the tutorials and guides on the wiki, and have a look at the classes in jmetest - about every feature of jME is documented in at least one simple test class there. jME's javadoc is also very up to date and quite comprehensive.