BPolyPoly.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/BPolyPoly.h#1 $
00013 //
00014 
00015 #ifndef BPOLYPOLY
00016 #define BPOLYPOLY
00017 
00021 
00022 #ifndef BBINFILETK_TOOLKIT
00023     #include "dwf/w3dtk/BStreamFileToolkit.h"
00024 #endif
00025 
00027 
00046 class BBINFILETK_API TK_PolyPolypoint : public BBaseOpcodeHandler {
00047     private:
00048         TK_PolyPolypoint(const TK_PolyPolypoint&);
00049         TK_PolyPolypoint& operator=(const TK_PolyPolypoint&);
00050 
00051 
00052     protected:
00053         int             m_point_count;          
00054         int             m_points_allocated;     
00055         float *         m_points;               
00056         int             m_points_num_floats;    
00057         int             m_points_num_dimensions;
00058         int             m_primitive_count;      
00059         int             m_lengths_allocated;    
00060         int *           m_lengths;              
00061         float           m_bbox[6];              
00062         int             m_templen;              
00063         float           m_temprange[2];         
00064         unsigned short  m_subop;                
00065         unsigned char   m_compression_scheme;   
00066         unsigned char * m_workspace;            
00067         int             m_workspace_used;       
00068         int             m_workspace_allocated;  
00069         int             m_bits_per_sample;      
00070         int             m_substage;             
00071         int             m_progress;             
00072 
00075         TK_Status analyze_dimensionality( BStreamFileToolkit & tk ) alter;
00078         TK_Status figure_num_floats (BStreamFileToolkit & tk) alter;
00081         TK_Status validate_primitive_count (BStreamFileToolkit & tk) alter;
00084         TK_Status expand_lengths (BStreamFileToolkit & tk) alter;
00087         TK_Status mangle (BStreamFileToolkit & tk) alter;
00090         TK_Status unmangle (BStreamFileToolkit & tk) alter;
00093         TK_Status compute_trivial_points (BStreamFileToolkit & tk) alter;
00096         TK_Status process_trivial_points (BStreamFileToolkit & tk) alter;
00099         TK_Status compute_line_extend_points (BStreamFileToolkit & tk) alter;
00102         TK_Status process_line_extend_points (BStreamFileToolkit & tk) alter;
00105         TK_Status write_compressed_points (BStreamFileToolkit & tk) alter;
00108         TK_Status read_compressed_points (BStreamFileToolkit & tk) alter;
00111         TK_Status write_trivial_leftovers (BStreamFileToolkit & tk) alter;
00114         TK_Status read_trivial_leftovers (BStreamFileToolkit & tk) alter;
00115 
00116     public:
00118         TK_PolyPolypoint (unsigned char opcode);
00119         ~TK_PolyPolypoint ();
00120 
00121         TK_Status   Read (BStreamFileToolkit & tk) alter;
00122         TK_Status   Write (BStreamFileToolkit & tk) alter;
00123                 TK_Status   Clone (BStreamFileToolkit & tk, BBaseOpcodeHandler **handler) const;
00124 
00125                 TK_Status   ReadAscii (BStreamFileToolkit & tk) alter;
00126         TK_Status   WriteAscii (BStreamFileToolkit & tk) alter;
00127 
00128                 TK_Status   Execute (BStreamFileToolkit & tk) alter;    /* non-default for tag processing */
00129         void        Reset (void) alter;
00130 
00136         TK_Status   SetPoints (int point_count, float const * points = 0) alter;
00144         TK_Status   SetLengths (int primitive_count, int const * lengths = 0) alter;
00145 
00148         enum Suboptions {
00149             TKPP_COMPRESSED                     = 0x0001,
00150             TKPP_HAS_EXPLICIT_PRIMITIVE_COUNT   = 0x0002,
00151             TKPP_ONE_PRIMITIVE_ONLY             = 0x0004,
00152             TKPP_GLOBAL_QUANTIZATION            = 0x0008,
00153             //break in sequence
00154             TKPP_ZERO_X                         = 0x0100,
00155             TKPP_SAME_X                         = 0x0200,
00156             TKPP_PER_PRIMITIVE_X                = 0x0300, //multibit
00157             TKPP_ZERO_Y                         = 0x0400,
00158             TKPP_SAME_Y                         = 0x0800,
00159             TKPP_PER_PRIMITIVE_Y                = 0x0C00, //multibit
00160             TKPP_ZERO_Z                         = 0x1000,
00161             TKPP_SAME_Z                         = 0x2000,
00162             TKPP_PER_PRIMITIVE_Z                = 0x3000, //multibit
00163             TKPP_EXPANDED                       = 0x8000  //reserved for future use
00164         };
00165         #define TKPP_X_2D_MASK 0x0300
00166         #define TKPP_Y_2D_MASK 0x0C00
00167         #define TKPP_Z_2D_MASK 0x3000
00168         #define TKPP_ANY_2D_MASK 0x3F00
00169         #define TKPP_EXPLICIT_PRIMITIVE_MASK 0x0006
00170 };
00171 
00172 #endif //BPOLYPOLY
00173 

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