BPointCloud.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/BPointCloud.h#1 $
00013 //
00014 
00018 
00019 #ifndef BBINFILETK_BPOINTCLOUD
00020 #define BBINFILETK_BPOINTCLOUD
00021 #include "dwf/w3dtk/BStreamFileToolkit.h"
00022 
00023 
00024 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00025 
00030 class BPointCloud {
00031   private:
00032     class BKDTree *m_kd;            //private helper class defined in BPointCloud.cpp
00033     class BStreamFileToolkit *m_tk;
00034     int m_resolution;               //total bits per vertex, i.e. 3 * bits_per_sample
00035     int m_max_val;                  //(1 << bits_per_sample) - 1
00036     float m_bbox[6];
00037     float m_cell_size[3];           //bbox size / m_max_val
00038     int m_original_point_count;     //the number of points in the original shell (and hence the point map length)
00039     int m_point_count;              //the number of unique points (possibly less than original shell)
00040     float *m_points;                //points list, stored in the order intrinsic to the kd tree, not the original shell
00041     int *m_point_map;
00042     int m_next_id;
00043     unsigned char m_scheme;         //format identifier
00044 
00045     void put( class BKDTree *kd, class BPack *pack, int num_bits );
00046     TK_Status get( class BKDTree *b, class BPack *pack, int num_bits, int i, int j, int k, int span ); 
00047 
00048 
00049   public:
00051     BPointCloud( class BStreamFileToolkit *tk );
00052     ~BPointCloud();
00053 
00055     enum scheme {                   
00056         TKPC_Explicit       = 0x0001
00057     };    
00058 
00059     //write time functions
00060     TK_Status InitWrite( int resolution, const float *bbox, int original_point_count, const float *points );
00061     int GetSizeUpperBound() const;
00062     void Generate( unsigned char *buffer, int bytes_allocated, int *bytes_used );
00063 
00064     //read time functions
00065     TK_Status InitRead( int resolution, const float *bbox, int original_point_count );
00066     TK_Status Parse( const unsigned char *buffer, int size );
00067     TK_Status GetPoints( float *points );
00068 
00069 };
00070 
00071 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00072 #endif /* BBINFILETK_BPOINTCLOUD */
00073 
00074 

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