Hi,
 In sun's java3D demo GeometryCompression, the following method is OK:
    private CompressionStream getStream(Scene scene) {
       Hashtable objs = scene.getNamedObjects() ;
       Shape3D shapes[] = new Shape3D[objs.size()] ;
       objs.values().toArray(shapes) ;
       return new CompressionStream(positionQuant,lorQuant,
                                     normalQuant, shapes) ;
    }
that program compresses an .obj file.
 
   And now , i want to compress an .flt file or an .wrl file(the scene is obtained through flt loader or vrml loader), but neither can be successful. the exception message is:
 
java.lang.ArrayIndexOutOfBoundsException: 0
 at com.sun.j3d.utils.compression.CompressionStream.<init> (CompressionStream.java:1233)
 at FltFileCompressor.getStream(FltFileCompressor.java:67)
 at FltFileCompressor.compressScene(FltFileCompressor.java:59)
 at FltFileCompressor.compress(FltFileCompressor.java:54)
 at Flt2dog.main(Flt2dog.java:22)
Can anyone tell me the reason or give some suggestion about comressing .flt file or .wrl file?
Is there any example of compressing .flt file or .wrl file using sun's tools?
Thanks very much.
    Yours. Qian Xueping
 

Reply via email to