Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

BPointCloud.h
1 //
2 // Copyright (c) 2000 by Tech Soft 3D, LLC.
3 // The information contained herein is confidential and proprietary to
4 // Tech Soft 3D, LLC., and considered a trade secret as defined under
5 // civil and criminal statutes. Tech Soft 3D shall pursue its civil
6 // and criminal remedies in the event of unauthorized use or misappropriation
7 // of its trade secrets. Use of this information by anyone other than
8 // authorized employees of Tech Soft 3D, LLC. is granted only under a
9 // written non-disclosure agreement, expressly prescribing the scope and
10 // manner of such use.
11 //
12 // $Id: 9e6ec1a70f376a57c27f5c4875b6dab701dabeac $
13 //
14 
15 #ifndef BBINFILETK_BPOINTCLOUD
16 #define BBINFILETK_BPOINTCLOUD
17 #include "BStreamFileToolkit.h"
18 
19 
20 #ifndef DOXYGEN_SHOULD_SKIP_THIS
21 
26 class BPointCloud {
27  private:
28  class BKDTree *m_kd; //private helper class defined in BPointCloud.cpp
29  class BStreamFileToolkit *m_tk;
30  int m_resolution; //total bits per vertex, i.e. 3 * bits_per_sample
31  int m_max_val; //(1 << bits_per_sample) - 1
32  float m_bbox[6];
33  float m_cell_size[3]; //bbox size / m_max_val
34  int m_original_point_count; //the number of points in the original shell (and hence the point map length)
35  int m_point_count; //the number of unique points (possibly less than original shell)
36  float *m_points; //points list, stored in the order intrinsic to the kd tree, not the original shell
37  int *m_point_map;
38  int m_next_id;
39  unsigned char m_scheme; //format identifier
40 
41  void put( class BKDTree *kd, class BPack *pack, int num_bits );
42  TK_Status get( class BKDTree *b, class BPack *pack, int num_bits, int i, int j, int k, int span );
43 
44 
45  public:
47  BPointCloud( class BStreamFileToolkit *tk );
48  ~BPointCloud();
49 
51  enum scheme {
52  TKPC_Explicit = 0x0001
53  };
54 
55  //write time functions
56  TK_Status InitWrite( int resolution, const float *bbox, int original_point_count, const float *points );
57  int GetSizeUpperBound() const;
58  void Generate( unsigned char *buffer, int bytes_allocated, int *bytes_used );
59 
60  //read time functions
61  TK_Status InitRead( int resolution, const float *bbox, int original_point_count );
62  TK_Status Parse( const unsigned char *buffer, int size );
63  TK_Status GetPoints( float *points );
64 
65 };
66 
67 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68 #endif /* BBINFILETK_BPOINTCLOUD */
69 
70 
The BStreamFileToolkit class provides support for importing/exporting HOOPS Stream File information...
Definition: BStreamFileToolkit.h:328
TK_Status
Codes which can be either passed to various toolkit functions, or indicate the result of a toolkit fu...
Definition: BStream.h:237