Developer Documentation
SplatCloudExtensions.hh
1 #ifndef SPLATCLOUD_EXTENSIONS_HH
2 #define SPLATCLOUD_EXTENSIONS_HH
3 
4 
6 
8 
9 #include <string>
10 #include <vector>
11 #include <bitset>
12 
13 
15 {
16 public:
17  SplatCloud_Projection() : f_( 0.0 ), k1_( 0.0 ), k2_( 0.0 )
18  {
19  r_[0][0] = 1.0; r_[0][1] = 0.0; r_[0][2] = 0.0;
20  r_[1][0] = 0.0; r_[1][1] = 1.0; r_[1][2] = 0.0;
21  r_[2][0] = 0.0; r_[2][1] = 0.0; r_[2][2] = 1.0;
22  t_ [0] = 0.0; t_ [1] = 0.0; t_ [2] = 0.0;
23  }
24 public:
25  double f_, k1_, k2_;
26  double r_[3][3];
27  double t_[3];
28 };
29 
30 
32 {
33 public:
34  SplatCloud_Camera() : objectId_( -1 ), projection_(), imagePath_( "" ), imageWidth_( 0 ), imageHeight_( 0 ) { }
35 public:
36  int objectId_;
37  SplatCloud_Projection projection_;
38  std::string imagePath_;
39  unsigned int imageWidth_, imageHeight_;
40 };
41 
42 
44 {
45 public:
46  SplatCloud_Surface() : firstSplatIdx_( -1 ), numSplats_( 0 ) { }
47 public:
48  int firstSplatIdx_;
49  unsigned int numSplats_;
50 };
51 
52 
54 {
55 public:
57  {
58  vertices_[0] = ACG::Vec3d( 0.0, 0.0, 0.0 );
59  vertices_[1] = ACG::Vec3d( 0.0, 0.0, 0.0 );
60  vertices_[2] = ACG::Vec3d( 0.0, 0.0, 0.0 );
61  vertices_[3] = ACG::Vec3d( 0.0, 0.0, 0.0 );
62  }
63 public:
64  ACG::Vec3d vertices_[4];
65 };
66 
67 
69 {
70 public:
71  SplatCloud_Cluster() : surface_(), quad_() { }
72 public:
73  SplatCloud_Surface surface_;
74  SplatCloud_Quad quad_;
75 };
76 
77 
78 typedef std::vector<SplatCloud_Camera> SplatCloud_Cameras;
79 typedef std::vector<SplatCloud_Cluster> SplatCloud_Clusters;
80 typedef std::bitset<8> SplatCloud_Flags;
81 
82 
84 {
85 public:
86  SplatCloud_CameraManager() : cameras_() { }
87 public:
88  SplatCloud_Cameras cameras_;
89 };
90 
91 
93 {
94 public:
95  SplatCloud_ClusterManager() : objectId_( -1 ), unclustered_(), clusters_() { }
96 public:
97  int objectId_;
98  SplatCloud_Surface unclustered_;
99  SplatCloud_Clusters clusters_;
100 };
101 
102 
104 {
105 public:
106  SplatCloud_GeneralManager() : flags_( 0 ) { }
107 public:
108  SplatCloud_Flags flags_;
109 };
110 
111 
115 
116 
117 static const SplatCloud::PropertyHandleT<SplatCloud_CameraManager> SPLATCLOUD_CAMERAMANAGER_HANDLE ( "CameraManager" );
118 static const SplatCloud::PropertyHandleT<SplatCloud_ClusterManager> SPLATCLOUD_CLUSTERMANAGER_HANDLE( "ClusterManager" );
119 static const SplatCloud::PropertyHandleT<SplatCloud_GeneralManager> SPLATCLOUD_GENERALMANAGER_HANDLE( "GeneralManager" );
120 
121 
122 static const unsigned int SPLATCLOUD_CAMERA_HAS_IMAGEPATH_FLAG = 0;
123 static const unsigned int SPLATCLOUD_CAMERA_HAS_IMAGERESOLUTION_FLAG = 1;
124 static const unsigned int SPLATCLOUD_SPLAT_VIEWLIST_HAS_FEATURE_INDICES_FLAG = 2;
125 static const unsigned int SPLATCLOUD_SPLAT_VIEWLIST_COORDS_NORMALIZED_FLAG = 3;
126 static const unsigned int SPLATCLOUD_CLUSTER_HAS_QUAD_FLAG = 4;
127 
128 
129 #endif // SPLATCLOUD_EXTENSIONS_HH
VectorT< double, 3 > Vec3d
Definition: VectorT.hh:121