1 #ifndef NAVIGATION_2D_H 2 #define NAVIGATION_2D_H 4 #include "scene/2d/node_2d.h" 5 #include "scene/2d/navigation_polygon.h" 20 bool operator<(
const Point& p_key)
const {
return key < p_key.key; }
29 bool operator<(
const EdgeKey& p_key)
const {
30 return (a.key==p_key.a.key)?(b.key<p_key.b.key):(a.key<p_key.a.key);
33 EdgeKey(
const Point& p_a=Point(),
const Point& p_b=Point()) {
46 struct ConnectionPending {
59 Edge() { C=NULL; C_edge=-1; P=NULL; }
85 Connection() { A=NULL; B=NULL; A_edge=-1; B_edge=-1;}
103 _FORCE_INLINE_ Point _get_point(
const Vector2& p_pos)
const {
105 int x = int(Math::floor(p_pos.x/cell_size));
106 int y = int(Math::floor(p_pos.y/cell_size));
116 _FORCE_INLINE_
Vector2 _get_vertex(
const Point& p_point)
const {
118 return Vector2(p_point.x,p_point.y)*cell_size;
123 void _navpoly_link(
int p_id);
124 void _navpoly_unlink(
int p_id);
134 static void _bind_methods();
140 void navpoly_set_transform(
int p_id,
const Matrix32& p_xform);
141 void navpoly_remove(
int p_id);
151 #endif // Navigation2D2D_H
Definition: navigation2d.h:7
Definition: navigation2d.h:54
Definition: math_2d.h:554