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