-
Notifications
You must be signed in to change notification settings - Fork 1
/
starsmap.h
69 lines (52 loc) · 2.17 KB
/
starsmap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Exposit Copyright (C) 2009,2010 Cristelle Barillon & Jean-Daniel Pauget
* efficiently stacking astro pics
*
* exposit@disjunkt.com - http://exposit.disjunkt.com/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* you can also try the web at http://www.gnu.org/
*
*/
#ifndef STARSMAP_INCLUDED
#define STARSMAP_INCLUDED
#include <map>
#include "draw.h"
#include "vstar.h"
namespace exposit {
// JDJDJDJD this one is uggllily added here !!! some header cleanup is needed !
void putpixel(SDL_Surface &surface, int x, int y, int r, int g, int b);
using namespace std;
class StarsMap : public multimap <int,VStar> {
public:
int w, h; // the size of the source image
multimap <int,VStar*> xind; // x-coord sorted index of ourselves
StarsMap (void) {}
StarsMap (int w, int h) : multimap <int,VStar>(), w(w), h(h) {}
void full_update_xind (void);
void full_expunge (void);
int find_match (StarsMap const &ref_starmap, double rothint, int &dx, int &dy, double &da0, double &da0_b);
int find_tuned_match (StarsMap const &ref_starmap, double rothint, int &dx, int &dy, double &da0, double &da0_b);
void renderzoom (SDL_Surface &surface, int xoff, int yoff, int width, int height,
int xs, int ys, int ws, int hs,
int xc, int yc, // centre de rotation
double rothint, int dx, int dy, // angle rot, decalage
int r, int g, int b);
static int debug;
static void setdebug (int d);
};
} // namespace exposit
#endif // STARSMAP_INCLUDED