source: subversion/applications/rendering/gosmore/jni/openglespolygon.h @ 29350

Last change on this file since 29350 was 27325, checked in by nic, 8 years ago

Fix link errors with gcc-4.6 / Ubuntu-11.10.
Fix HEADLESS compile
Provide for larger planet

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#if !defined(OPENGLESPOLYGON_H) && !defined(HEADLESS)
2#define OPENGLESPOLYGON_H
3#include <vector>
4#if !defined(ANDROID_NDK) && !defined(NOGTK)
5#include <gdk/gdk.h> 
6#endif
7
8struct FixedPoint {
9  int x, y;
10};
11
12struct PolygonEdge {
13  int isLeft : 1;
14  int delta : 2; // Either -1 or 1
15  int continues : 1; // It's a polygon stored in an array and this edge wraps
16                     // over. We should continue at this+1 when cnt runs out.
17  int cnt : 20;
18  FixedPoint *pt, prev;
19  PolygonEdge *opp;
20/* I tried to make PolygonEdge a node in a tree by using a set<>. It failed
21   and I'm not sure how to fix it (add an iterator here ?).
22  set<PolygonEdge *, edgeCmp>::iterator itr;
23
24   So instead I copied and pasted my own AA tree code here:
25*/
26  PolygonEdge *parent, *left, *right;
27  int level;
28};
29
30#if defined(ANDROID_NDK) || defined(NOGTK)
31struct GdkPoint {
32  short x, y;
33};
34
35void Fill (std::vector<PolygonEdge> &d,int hasSea);
36#else
37void Fill (std::vector<PolygonEdge> &d,int hasSea, GdkWindow *w, GdkGC *gc);
38#endif
39void AddPolygon (std::vector<PolygonEdge> &d, FixedPoint *p, int cnt);
40void AddClockwise (std::vector<PolygonEdge> &d, FixedPoint *p, int cnt);
41
42#endif
Note: See TracBrowser for help on using the repository browser.