summaryrefslogtreecommitdiff
path: root/scene/3d/collision_polygon.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-09-20 13:03:46 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-09-20 13:03:46 -0300
commit83d9a692be648668b5b363f2424c619e15639843 (patch)
tree387b30810994b282c795fdd011f53f0b7eb93ace /scene/3d/collision_polygon.h
parent3f9e5afe68df1e3b4bcf34a21468ed55a57a7973 (diff)
parent889d21e0049a0e84d6d44db9b80193f93fd62f17 (diff)
Ability to visually debug geometry visually:
-Visible 2D and 3D Shapes, Polygons, Tile collisions, etc. -Visible Navmesh and Navpoly -Visible collision contacts for 2D and 3D as a red point -Customizable colors in project settings
Diffstat (limited to 'scene/3d/collision_polygon.h')
-rw-r--r--scene/3d/collision_polygon.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/3d/collision_polygon.h b/scene/3d/collision_polygon.h
index efb3666778..9b9afea34f 100644
--- a/scene/3d/collision_polygon.h
+++ b/scene/3d/collision_polygon.h
@@ -24,9 +24,17 @@ protected:
BuildMode build_mode;
Vector<Point2> polygon;
+
void _add_to_collision_object(Object *p_obj);
void _update_parent();
+ bool can_update_body;
+ int shape_from;
+ int shape_to;
+
+ void _set_shape_range(const Vector2& p_range);
+ Vector2 _get_shape_range() const;
+
protected:
void _notification(int p_what);
@@ -43,6 +51,10 @@ public:
Vector<Point2> get_polygon() const;
virtual AABB get_item_rect() const;
+
+ int get_collision_object_first_shape() const { return shape_from; }
+ int get_collision_object_last_shape() const { return shape_to; }
+
CollisionPolygon();
};