From 53ebfcc5ad5554b67d2287f8b02c22ec8405af0f Mon Sep 17 00:00:00 2001 From: kcr Date: Wed, 9 Jun 2004 03:28:13 +0000 Subject: Initial creation of j3d-examples sources in CVS repository --- src/GeometryCompression/ObjectFileCompressor.html | 437 ++++++++++++++++++++++ 1 file changed, 437 insertions(+) create mode 100644 src/GeometryCompression/ObjectFileCompressor.html (limited to 'src/GeometryCompression/ObjectFileCompressor.html') diff --git a/src/GeometryCompression/ObjectFileCompressor.html b/src/GeometryCompression/ObjectFileCompressor.html new file mode 100644 index 0000000..7540a8f --- /dev/null +++ b/src/GeometryCompression/ObjectFileCompressor.html @@ -0,0 +1,437 @@ + + + + + + +: Class ObjectFileCompressor + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +

+Class ObjectFileCompressor

+
+java.lang.Object
+  |
+  +--com.sun.j3d.loaders.objectfile.ObjectFile
+        |
+        +--ObjectFileCompressor
+
+
+
+
public class ObjectFileCompressor
extends com.sun.j3d.loaders.objectfile.ObjectFile
+ +

+This extension of ObjectFile provides the methods setQuantization() and + compress() to compress Wavefront .obj files into the format described by + appendix B of the Java 3D specification. +

+


+ +

+ + + + + + + + + + + + + +
Fields inherited from class com.sun.j3d.loaders.objectfile.ObjectFile
RESIZE, +REVERSE, +STRIPIFY, +TRIANGULATE
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
ObjectFileCompressor() + +
+           
ObjectFileCompressor(int flags) + +
+           
ObjectFileCompressor(int flags, + float radians) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ javax.media.j3d.CompressedGeometrycompress(java.io.Reader reader) + +
+          Compress the specified .obj file into a CompressedGeometry node + component.
+ voidcompress(java.io.Reader reader, + com.sun.j3d.utils.compression.CompressedGeometryFile file) + +
+          Compress the specified .obj file and add it to the end of an open + compressed geometry file.
+ javax.media.j3d.CompressedGeometrycompress(java.lang.String objFileName) + +
+          Compress the specified .obj file into a CompressedGeometry node + component.
+ voidcompress(java.lang.String objFileName, + com.sun.j3d.utils.compression.CompressedGeometryFile file) + +
+          Compress the specified .obj file and add it to the end of an open + compressed geometry file.
+ javax.media.j3d.CompressedGeometrycompress(java.net.URL url) + +
+          Compress the specified .obj file into a CompressedGeometry node + component.
+ voidcompress(java.net.URL url, + com.sun.j3d.utils.compression.CompressedGeometryFile file) + +
+          Compress the specified .obj file and add it to the end of an open + compressed geometry file.
+ voidsetFlags(int flags) + +
+           
+ voidsetQuantization(int positionQuant, + int colorQuant, + int normalQuant) + +
+          Set the position, normal, and color quantization values for compression.
+ + + + + + + +
Methods inherited from class com.sun.j3d.loaders.objectfile.ObjectFile
getBasePath, +getBaseUrl, +getFlags, +load, +load, +load, +setBasePath, +setBaseUrl
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, +equals, +finalize, +getClass, +hashCode, +notify, +notifyAll, +toString, +wait, +wait, +wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+ObjectFileCompressor

+
+public ObjectFileCompressor()
+
+
+
+ +

+ObjectFileCompressor

+
+public ObjectFileCompressor(int flags)
+
+
+
+ +

+ObjectFileCompressor

+
+public ObjectFileCompressor(int flags,
+                            float radians)
+
+
+ + + + + + + + +
+Method Detail
+ +

+setFlags

+
+public void setFlags(int flags)
+
+
+
Overrides:
setFlags in class com.sun.j3d.loaders.objectfile.ObjectFile
+
+
+
+ +

+setQuantization

+
+public void setQuantization(int positionQuant,
+                            int colorQuant,
+                            int normalQuant)
+
+
Set the position, normal, and color quantization values for compression.
+
Parameters:
positionQuant - number of bits to quantize each position's X, Y, + and Z components, ranging from 1 to 16 with a default of 10
colorQuant - number of bits to quantize each color's R, G, B, and + alpha components, ranging from 2 to 16 with a default of 8
normalQuant - number of bits for quantizing each normal's U and V + components, ranging from 0 to 6 with a default of 3
+
+
+
+ +

+compress

+
+public javax.media.j3d.CompressedGeometry compress(java.lang.String objFileName)
+
+
Compress the specified .obj file into a CompressedGeometry node + component.
+
Parameters:
objFileName - String object representing the path to a .obj file
Returns:
a CompressedGeometry node component
+
+
+
+ +

+compress

+
+public void compress(java.lang.String objFileName,
+                     com.sun.j3d.utils.compression.CompressedGeometryFile file)
+              throws java.io.IOException
+
+
Compress the specified .obj file and add it to the end of an open + compressed geometry file.
+
Parameters:
objFileName - String object representing the path to a .obj file
file - a currently open CompressedGeometryFile object
Throws:
java.io.IOException - - if write fails
+
+
+
+ +

+compress

+
+public javax.media.j3d.CompressedGeometry compress(java.io.Reader reader)
+
+
Compress the specified .obj file into a CompressedGeometry node + component.
+
Parameters:
reader - an open .obj file
Returns:
a CompressedGeometry node component
+
+
+
+ +

+compress

+
+public void compress(java.io.Reader reader,
+                     com.sun.j3d.utils.compression.CompressedGeometryFile file)
+              throws java.io.IOException
+
+
Compress the specified .obj file and add it to the end of an open + compressed geometry file.
+
Parameters:
reader - an open .obj file
file - an open CompressedGeometryFile object
Throws:
java.io.IOException - - if write fails
+
+
+
+ +

+compress

+
+public javax.media.j3d.CompressedGeometry compress(java.net.URL url)
+
+
Compress the specified .obj file into a CompressedGeometry node + component.
+
Parameters:
url - Uniform Resource Locator for the .obj file
Returns:
a CompressedGeometry node component
+
+
+
+ +

+compress

+
+public void compress(java.net.URL url,
+                     com.sun.j3d.utils.compression.CompressedGeometryFile file)
+              throws java.io.IOException
+
+
Compress the specified .obj file and add it to the end of an open + compressed geometry file.
+
Parameters:
url - Uniform Resource Locator for the .obj file
file - a currently open CompressedGeometryFile object
Throws:
java.io.IOException - - if write fails
+
+
+ +
+ + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + -- cgit v1.2.3