Skip to main content

Geometryinfo with indexed & by reference geometryarray

No replies
Joined: 2009-06-19
Points: 0


I have a serious issue with Geometryinfo. I want to get coords and indices from any geometryarray so i wrote this code :

GeometryInfo info = new GeometryInfo(geomArray);
Point3f[] points = info.getCoordinates();
int[] facets = info.getCoordinateIndices();

I thought that would work but i tried it with and indexedgeometryarray (triangles i think) with "by reference" mode and that gave me that :

Exception in thread "main" java.lang.IllegalStateException: IndexedGeometryArray: cannot access indices directly in BY_REFERENCE_INDICES mode
at com.sun.j3d.utils.geometry.GeometryInfoGenerator.processIndexedArray(
at com.sun.j3d.utils.geometry.GeometryInfoGenerator.create(
at com.sun.j3d.utils.geometry.GeometryInfoGenerator.create(
at com.sun.j3d.utils.geometry.GeometryInfo.(

The fact is in the code og GeometryInfoGenerator, the method processGeometryArray() handle by reference mode whereas processIndexedArray() doesn't ...

Is it a bug ? Is there any workaround to get indices and coords from any geometry ?

Hope somebody has the answer :D