Hello-
 
I'm trying to use compressed geometry for J3d.  On some of the input, it works just find, and on some of it, it dies.  I have reduced the problem to the following piece of code:
 
save(GeometryInfo geomInfo)
{
    try
    {
        GeometryInfo[] geomInfos = new GeometryInfo[1];
        geomInfos[0] = geomInfo;
        CompressionStream cStream = new CompressionStream(positionQuant, colorQuant, normalQuant,geomInfos);
        GeometryCompressor comp = new GeometryCompressor();
        CompressedGeometry compGeom = comp.compress(cStream);
        /*immediately decompress to test it and I SOMETIMES get an exception*/
        compGeom.decompress();
        /*...*/
    }
 }
 
here is the Exception:
 java.lang.IllegalArgumentException: GeneralizedStrip: strip ended incompletely
 at javax.media.j3d.GeneralizedStrip.toStripsAndFans(GeneralizedStrip.java:277)
 at javax.media.j3d.GeneralizedStrip.toTriangleStrips(GeneralizedStrip.java:423)
 at javax.media.j3d.GeneralizedVertexList.toTriangleStripArray(GeneralizedVertexList.java:299)
 at javax.media.j3d.GeometryDecompressorShape3D.addShape3D(GeometryDecompressorShape3D.java:288)
 at javax.media.j3d.GeometryDecompressorShape3D.decompress(GeometryDecompressorShape3D.java:161)
 at javax.media.j3d.GeometryDecompressorShape3D.toTriangleStripArrays(GeometryDecompressorShape3D.java:97)
 at javax.media.j3d.CompressedGeometry.decompress(CompressedGeometry.java:290)
Does anybody have a clue?  Is this a bug?

Reply via email to