libcod
gsc_astar.hpp
Go to the documentation of this file.
1 #ifndef _GSC_ASTAR_HPP_
2 #define _GSC_ASTAR_HPP_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 /* default stuff */
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <string.h>
12 
13 /* gsc functions */
14 #include "gsc.hpp"
15 
16 
17 #if COMPILE_ASTAR == 1
18 
19 // LOOOOOOOOOOOOOL
20 // i can leave this away and it compiles!
21 // BUT THEN EVERYTHING IS INTEGER!!!!
22 // SEARCHED SO LONG THE PROBLEM WHY FLOATES ARE MESSED UP
23 extern int GRAPH_new(); // 8
24 extern int GRAPH_add_edge(int graph, int first, int second); // 9
25 extern int GRAPH_add_vertex(int graph, float x, float y, float z); // 10
26 extern int GRAPH_delete(int graph); // 11
27 extern int GRAPH_build(int graph); // 12
28 extern int GRAPH_do_astar(int graph, int from, int to, int **outRet, int *outLen, float *outCost); // 13
29 extern int GRAPH_getNearestEdge(int graph, float *pos, int *out_wp1, int *out_wp2, float **out_pos); // number 15
30 extern int MATH_nearest_point_on_linesegment(float *from, float *to, float *toPoint, float *out_point);
31 
32 #endif
33 
34 int gsc_graph_new();
35 int gsc_graph_add_edge();
37 int gsc_graph_delete();
38 int gsc_graph_build();
39 int gsc_graph_do_astar();
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif
int gsc_graph_add_edge()
Definition: gsc_astar.cpp:12
int gsc_graph_build()
Definition: gsc_astar.cpp:65
int GRAPH_add_vertex(int graph, float x, float y, float z)
int gsc_graph_do_astar()
Definition: gsc_astar.cpp:80
int MATH_nearest_point_on_linesegment(float *from, float *to, float *toPoint, float *out_point)
int GRAPH_build(int graph)
int GRAPH_add_edge(int graph, int first, int second)
int GRAPH_do_astar(int graph, int from, int to, int **outRet, int *outLen, float *outCost)
int GRAPH_getNearestEdge(int graph, float *pos, int *out_wp1, int *out_wp2, float **out_pos)
int GRAPH_delete(int graph)
int gsc_graph_delete()
Definition: gsc_astar.cpp:50
int gsc_graph_add_vertex()
Definition: gsc_astar.cpp:31
int gsc_graph_get_nearest_edge()
Definition: gsc_astar.cpp:161
int GRAPH_new()
int gsc_graph_new()
Definition: gsc_astar.cpp:5