Geometry disappears after updateData()

Hello everyone,

From J3D Tutorial:
Keep in mind that while an application could modify BY_REFERENCE geometry data without using a GeometryUpdater object this, should be avoided as the results of doing so are neither predictable nor portable.

I know I should not update BY_REFERENCE geometry outside a GeometryUpdater’s updateData method, but the design of my system makes using a GeometryUpdater like that almost impossible (rather awkward actually). So, what I’ve done goes like this: Within a Behavior’s processStimulus, I update geometry data (coords and normals) “my way”, then go to all the Geometries that I “touch” and call updateData() in each one of them. As a parameter I pass a GeometryUpdater with an empty updateData(Geometry geometry) {}. This way I inform J3D that my geometry changed, so that it can compute the new bounds and whatever else it needs to do. Or so I thought.

I use this technique with two kinds of geometries. One is an IndexedQuadArray and the other a TriangleStripArray. There are a series of Shape3Ds and each uses one of these two kinds of geometries. The problem is that it works fine with the IndexedQuadArrays (they update correctly) but when I try the same on a TriangleStripArray, the geometry just disappears :-/. I run some tests and after the updates, Shape3Ds are in place, coordinates are in place, normals are correctly calculated, the geometry is just “there”. But somehow it “dissapears” after calling the updateData(). Even the frame rate goes significantly up, as if I had removed the Shape3Ds completely.

Any thoughts of why such a thing happens? All necessary capabilities are set, no exception is thrown. Shouldn’t it work, since I call updateData anyway? ???

P.S.: I don’t update the Geometries within updateData, because I need to update many different Geometries at once. It would be a mess if I had to split the whole update procedure into each Geometry.

Actually, the geometry disappears even if I don’t mess with it in any way. Just calling updateData(updater) and it goes away! The updater does nothing, I don’t change anything out of it and it still disappears. I even tried to put some code in the GeometryUpdater’s updateData(Geometry geometry), with no luck.

I cannot find a way to work it out, or even understand why such a behavior occurs. It happens only when I try to update a TriangleStripArray. I’m on JDK 1.4.1_01, Java3D 1.3 OpenGL, GeForce2, WinXP. Could this be a bug in the J3D APIs? Has anyone experienced such a problem before?