Developer Documentation

SplatCloudExtensions.hh
1 #ifndef SPLATCLOUD_EXTENSIONS_HH
2 #define SPLATCLOUD_EXTENSIONS_HH
3
4
5 #include <ObjectTypes/SplatCloud/SplatCloud.hh>
6
7 #include <OpenFlipper/common/Types.hh>
8
9 #include <string>
10 #include <vector>
11 #include <bitset>
12
13
14 class SplatCloud_Projection
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
31 class SplatCloud_Camera
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
43 class SplatCloud_Surface
44 {
45 public:
46 SplatCloud_Surface() : firstSplatIdx_( -1 ), numSplats_( 0 ) { }
47 public:
48 int firstSplatIdx_;
49 unsigned int numSplats_;
50 };
51
52
53 class SplatCloud_Quad
54 {
55 public:
56 SplatCloud_Quad()
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
68 class SplatCloud_Cluster
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
83 class SplatCloud_CameraManager
84 {
85 public:
86 SplatCloud_CameraManager() : cameras_() { }
87 public:
88 SplatCloud_Cameras cameras_;
89 };
90
91
92 class SplatCloud_ClusterManager
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
103 class SplatCloud_GeneralManager
104 {
105 public:
106 SplatCloud_GeneralManager() : flags_( 0 ) { }
107 public:
108 SplatCloud_Flags flags_;
109 };
110
111
112 typedef SplatCloud::CloudPropertyT<SplatCloud_CameraManager> SplatCloud_CameraManagerProperty;
113 typedef SplatCloud::CloudPropertyT<SplatCloud_ClusterManager> SplatCloud_ClusterManagerProperty;
114 typedef SplatCloud::CloudPropertyT<SplatCloud_GeneralManager> SplatCloud_GeneralManagerProperty;
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
SplatCloud::PropertyHandleT
Definition: SplatCloud.hh:283
SplatCloud_Cluster
Definition: SplatCloudExtensions.hh:68
SplatCloud_Camera
Definition: SplatCloudExtensions.hh:31
SplatCloud_ClusterManager
Definition: SplatCloudExtensions.hh:92
SplatCloud::CloudPropertyT
Definition: SplatCloud.hh:324
ACG::Vec3d
VectorT< double, 3 > Vec3d
Definition: VectorT.hh:121
SplatCloud.hh
SplatCloud_Quad
Definition: SplatCloudExtensions.hh:53
SplatCloud_Projection
Definition: SplatCloudExtensions.hh:14
Types.hh
SplatCloud_CameraManager
Definition: SplatCloudExtensions.hh:83
SplatCloud_Surface
Definition: SplatCloudExtensions.hh:43
OpenMesh::VectorT
Definition: Vector11T.hh:83
SplatCloud_GeneralManager
Definition: SplatCloudExtensions.hh:103