First, all of coordinates should be in the same coordinate space. This means that you have to use Virtual World bounds instead of local Bounds. You can obtain Virtual World bounds for shape by call to getVWorldBounds() and passing them to the classifier.
Next, you have to adjust classifier volume for current location of your viewing region (aka camera location, aka view frustum). The easiest way to do this is to let Xith3D core to construct Classifier object for you by calling view.extractFrustum(Frustum, Canvas3D) and passing new frustum object and your Canvas3D of interest. This will give you a frustum which describes currently visible volume. If you need another classification shape (sphere etc.) you should construct it yourself basing on View projection and transform matices.
Then you do actual classification:
1 2 3 4 5
| Classifier.Classification classify = frustum.classify(node.getVworldBounds()); if (classify == Classifier.INSIDE) { ...do my code... } |
For more details, take a look for View.java in Xith3D source tree - it performs frustum culling to avoid rendering of definitely invisible objects.
Yuri