How to tell is a shape is being rendered

I have several animated objects in a scene, particles etc. How do i determine if the object, or some portion of it, is currently a renderable item. i don’t want to update something that is not in view.

A second question involves lights. is there any penalty for having numerous lights as long as only a portion of them may be affecting a scene at any one time??

I think you should implement NodeUpdater interface instead, because of Xith3D core anyway knows if object is visible, so if you want to update some attributes (Color, for ex.), you can do this using NodeUpdater.

Yuri

This odes not …seem to work. I can’t find anywhere within xith that NodeUpdater is used

If I extend Node and implement NodeUpdater I get the error below. If I extend a Leaf another error occurs in the view NodeUpdate.preRender call

I think I don’t know how to extend a node in xith…arrrrrggg!.

So I how do I extend something that can go in a BG and have the node update happen. In particular I have a particle stream of N Shapes that i would like to

com.xith3d.scenegraph.SceneGraphRuntimeException: SceneGraphObject.makeLive(): An unknown node type was passed as the argument.
at com.xith3d.scenegraph.SceneGraphObject.makeLive(SceneGraphObject.java:231)
at com.xith3d.scenegraph.SceneGraphObject.setLive(SceneGraphObject.java:102)
at com.xith3d.scenegraph.Node.setParent(Node.java:272)
at com.xith3d.scenegraph.Group.addChild(Group.java:96)
at hawk.factory.SceneFactory.createScene(SceneFactory.java:105)

I believe it only works for extending Shape3D.

Kev

not according to view.java

`[b]

// if this node implements NodeUpdater then let it recalculate itself. Handle this feature
// seperately below for Shape3D
if ((node instanceof NodeUpdater) && !(node instanceof Shape3D)) {
if (!((NodeUpdater)node).preRender(getTransform(),frustum,node.getTransformGroup().getTransform(),currentFrameStartTime)) return;
}
`[/b]