> Date: Sat, 2 Feb 2002 22:35:12 -0500
> From: Maung Min <[EMAIL PROTECTED]>
>
> Does anybody can run "obj2cg.java" program, which comes with java3d demo?? I
> run with the following command line
> (java obj2cg galleon.obj galleon.cg) and I get the exception like this.
>
> Exception in thread "main" java.lang.IllegalStateException: GeometryArray:
> cannot directly access data in BY_REFERENCE mode
This is bug 4524591:
Geometry Compression utilities do not support by-reference mode
It is fixed in the upcoming J3D 1.3 beta 2 release. The ObjectFile utility was
updated in J3D 1.3 beta 1 to return GeometryArrays with by-reference access
semantics, but GeometryCompressor was not updated for this change until the
problem was discovered after the 1.3 beta 1 release.
Unfortunately there is no convenient workaround. One alternative is to use the
current J3D 1.2.1_03 release.
Or, since you've downloaded the SDK for Java 3D 1.3 beta 1, you should have the
source code for the Java 3D utilities in java3d-utils-src.jar. You can make a
1-line change to com/sun/j3d/loaders/objectfile/ObjectFile.java at line 1221 in
the makeScene() method: change
shape.setGeometry(gi.getGeometryArray(true, true, false));
to
shape.setGeometry(gi.getGeometryArray(false, false, false));
Recompile ObjectFile.java and replace ObjectFile.class in j3dutils.jar. This
will cause ObjectFile to return GeometryArrays created with by-copy access,
which GeometryCompressor will be able to handle.
Hope that helps,
Mark Hood
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".