double HL_center_y(int cantor);
int HL_hexcenter(int cantor, double *x, double *y);
+/* find a point based on a unit hex, given angle and distance from center,
+ * where a distance of 1 is on the hex side. probably not useful
+ * for points outside the hex, that is, distance should almost certainly
+ * be less than or equal to 1.0
+ */
+double HL_polar(double angle, double distance, double *x, double *y);
+
/* how far is it on the hex grid */
int HL_distance(int from_cantor, int to_cantor);
int x,y; /* hmm. would be nice to be able to just point to a generic */
};
+struct hl_point {
+ double x, y;
+};
+
/*
* Pathfinding
*/
double (*heuristic)(int,int);
int (*neighbor)(int,int);
int nodes, allocated;
- struct HL_astar_hex *sets;
struct HL_astar_hex *open;
struct HL_astar_hex *closed;
struct HL_astar_hex *from, *to;
struct HL_astar *HL_astar_init(struct HL_astar *s);
void HL_vertices(int cantor, double *vc);
+extern double HL_vertexv[12];
extern double HL_fand[16];
extern float HL_fanf[16];
extern double HL_hfand[16]; /* horizontal grids */