> Date: Fri, 18 Jan 2002 00:46:06 +0800 > From: � - - �n +���ng� - - � <[EMAIL PROTECTED]> > > how can you create a CompressedGeometry from a Primitive? > my problem is that i wanted to save a shape created by > the user from primitives to a file. i found that > CompressionStream can accept Shape3D and output a > CompressedGeometry but as i understand, only the material > diffuse colors are kept (if there is). all other appearance > attributes are ignored.
That's correct. The material diffuse color is the only Java 3D appearance attribute that can actually be encoded into a CompressedGeometry object. The compressed geometry format is independent of Java 3D and encodes only positions, colors, normals, and connectivity information. It's essentially a geometry resource, with material attributes left to be applied by the renderer. > i figured that CompressedGeometry can keep all appearance > attribute since it can output CompressedGeometryHeader > which can reproduce the same appearance attribute done > to the Shape3D... or does it? It doesn't. The header just supplies some information to the renderer about what types of vertex components are present, how the vertices are connected, where the compressed data is in the buffer, and geometric bounds information if available. However, the header is not a part of the compressed geometry format, so it doesn't seem unreasonable for the Java 3D GeometryCompressor to put the original material attributes there. If this is important to you, let me know and I'll submit an RFE (Request For Enhancement) on your behalf so that the Java 3D team can consider it. -- 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".
