The compressed geometry object is used to store geometry in a compressed format. Using compressed geometry may increase the speed objects can be sent over the network. Note that the geometry will be decompressed in memory, so the application will not see any memory savings.
Compressed geometry may be passed to this CompressedGeometry object in one of two ways: by copying the data into this object using the existing constructor, or by passing a reference to the data.
- By Copying: The existing CompressedGeometry constructor copies the buffer of compressed geometry data into this CompressedGeometry object. This is appropriate for many applications, and allows Java 3D to verify the data once and then not worry about it again.
- By Reference: A new constructor and set of methods in Java 3D version 1.2 allows compressed geometry data to be accessed by reference, directly from the user's array. To use this feature, you need to construct a CompressedGeometry object with the
byReference
flag set to true
. In this mode, a reference to the input data is saved, but the data itself is not necessarily copied. Note that the compressed geometry header is still copied into this compressed geometry object. Data referenced by a CompressedGeometry object must not be modified after the CompressedGeometry object is constructed. Applications must exercise care not to violate this rule. If any referenced compressed geometry data is modified after construction, the results are undefined.
@deprecated As of Java 3D version 1.4.