BCompress.h

Go to the documentation of this file.
00001 //
00002 // Copyright (c) 2000 by Tech Soft 3D, LLC.
00003 // The information contained herein is confidential and proprietary to
00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under
00005 // civil and criminal statutes.  Tech Soft 3D shall pursue its civil
00006 // and criminal remedies in the event of unauthorized use or misappropriation
00007 // of its trade secrets.  Use of this information by anyone other than
00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a
00009 // written non-disclosure agreement, expressly prescribing the scope and
00010 // manner of such use.
00011 //
00012 // $Header: //DWF/Working_Area/Willie.Zhu/w3dtk/BCompress.h#1 $
00013 //
00014 // This file declares all of the external symbols (functions and lookup tables)
00015 // used in the various compression algorithms in HOOPS/stream
00016 //
00017 
00021 
00022 #include "dwf/w3dtk/BStream.h"
00023 #include "dwf/w3dtk/BPolyhedron.h"
00024 #include "dwf/w3dtk/BEdgeBreaker.h"
00025         
00026 
00027 #define CS_INVALID                      0
00028 #define CS_TRIVIAL                      1
00029 #define CS_TRIVIAL_IMPLICIT             2
00030 #define CS_REPULSE                      3
00031 #define CS_NONE                         4
00032 #define CS_EDGEBREAKER                  5
00033 #define CS_LINE_EXTEND                  6
00034 #define CS_TRIVIAL_POLAR                7
00035 
00036 extern TK_Status quantize_and_pack_floats ( 
00037         BStreamFileToolkit & tk,
00038         int count_in,
00039         int size_in,
00040         float const *floats_in, 
00041         float const *bounding_in,
00042         unsigned int *exists_in,
00043         unsigned int mask_in,
00044         unsigned int bits_per_sample_in,
00045         float *bounding_out,
00046         int *workspace_len_in_out,
00047         int *workspace_used_out,
00048         unsigned char **workspace_in_out );
00049 
00050 
00051 extern TK_Status quantize_and_pack_floats ( 
00052         BStreamFileToolkit & tk,
00053         int count_in,
00054         int size_in,
00055         float const *floats_in, 
00056         float const *bounding_in,
00057         unsigned int bits_per_sample_in,
00058         float *bounding_out,
00059         int *workspace_len_in_out,
00060         int *workspace_used_out,
00061         unsigned char **workspace_in_out );
00062 
00063 extern TK_Status unquantize_and_unpack_floats ( 
00064         BStreamFileToolkit & tk,
00065         int count_in,
00066         int size_in,
00067         unsigned int bits_per_sample_in,
00068         float const *bounding_in,
00069         unsigned char *buf_in,
00070         float **floats_out );
00071 
00072 extern TK_Status trivial_compress_points ( 
00073         BStreamFileToolkit & tk,
00074         int point_count,
00075         float const *points, 
00076         float const *bounding_in,
00077         unsigned int *exists,
00078         unsigned int mask,
00079         int *workspace_len_in_out,
00080         int *workspace_used_out,
00081         unsigned char **workspace_in_out,
00082         float * bounding_out);
00083 extern TK_Status trivial_decompress_points ( 
00084         BStreamFileToolkit & tk,
00085         int pointcount,
00086         void const *buf_in,
00087         float **points_out,
00088         float const * bounding );
00089 
00090 #define MAXU10 128
00091 #define MAXV10 64
00092 #define MAXU8 64
00093 #define MAXV8 32
00094 extern float normal_vectors10[1024][3];
00095 extern unsigned short closest_points10[MAXU10][MAXV10];
00096 extern float normal_vectors8[256][3];
00097 extern unsigned char closest_points8[MAXU8][MAXV8];
00098 
00099 
00100 extern const int bounding_faces[30];
00101 extern const int bounding_tristrips[19];
00102 extern const float color_cube[6];
00103 extern const float normal_cube[6];
00104 extern const float polar_bounds[4];
00105 
00106 
00107 
00108 

Generated on Tue Jan 6 22:41:34 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5