Statistics
| Branch: | Revision:

root / rgbdslam / gicp / scan.h @ 9240aaa3

History | View | Annotate | Download (2.63 KB)

1
/*************************************************************
2
  Generalized-ICP Copyright (c) 2009 Aleksandr Segal.
3
  All rights reserved.
4

5
  Redistribution and use in source and binary forms, with 
6
  or without modification, are permitted provided that the 
7
  following conditions are met:
8

9
* Redistributions of source code must retain the above 
10
  copyright notice, this list of conditions and the 
11
  following disclaimer.
12
* Redistributions in binary form must reproduce the above
13
  copyright notice, this list of conditions and the 
14
  following disclaimer in the documentation and/or other
15
  materials provided with the distribution.
16
* The names of the contributors may not be used to endorse
17
  or promote products derived from this software
18
  without specific prior written permission.
19

20
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21
  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
22
  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24
  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
26
  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
27
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
28
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29
  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
31
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
32
  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
34
  DAMAGE.
35
*************************************************************/
36

    
37

    
38

    
39
#ifndef __SCAN_H
40
#define __SCAN_H
41

    
42
#include <vector>
43

    
44
typedef struct {
45
  double mat[3][3]; // 36 bytes, row major
46
  int transpose;   // 4
47
  int symmetric;   // 4
48
  int diagonal;    // 4
49
} dgc_matrix3d_t;  // = 48 bytes per matrix      
50

    
51
typedef struct {
52
  double vec[3];    // 12 bytes
53
} dgc_vector3d_c_t;  // 16 bytes per vector                                                                                                                                                                       
54

    
55
typedef struct {
56
  double vec[3];    // 12 bytes
57
} dgc_vector3d_r_t;  // 16 bytes per vector
58

    
59
typedef struct {
60
  double                    x;
61
  double                    y;
62
  double                    z;
63
  double                    roll;
64
  double                    pitch;
65
  double                    yaw;
66
} dgc_pose_t, * dgc_pose_p;
67

    
68
class dgc_scan_t {
69
 public:
70
  std::vector<dgc_vector3d_c_t> points;
71
  std::vector<dgc_vector3d_c_t> norms;
72
  dgc_pose_t pose;
73
  
74
  int save(const char* filename);
75
  int load(const char *filename);
76
};
77

    
78

    
79

    
80
#endif