diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-15 01:23:10 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-07-15 08:32:34 -0300 |
commit | 2e73be99d8d86d9dad7bcb99518a4d3cbb5c373c (patch) | |
tree | d863db50852afe5d4b0bc15b8452054498004cb1 /scene/3d/collision_polygon.h | |
parent | e64b82ebfcc3475c7a7d2a9196bfe20d6c9e3614 (diff) | |
download | redot-engine-2e73be99d8d86d9dad7bcb99518a4d3cbb5c373c.tar.gz |
Lots of work on Audio & Physics engine:
-Added new 3D stream player node
-Added ability for Area to capture sound from streams
-Added small features in physics to be able to properly guess distance to areas for sound
-Fixed 3D CollisionObject so shapes are added the same as in 2D, directly from children
-Fixed KinematicBody API to make it the same as 2D.
Diffstat (limited to 'scene/3d/collision_polygon.h')
-rw-r--r-- | scene/3d/collision_polygon.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/scene/3d/collision_polygon.h b/scene/3d/collision_polygon.h index d45b4738ae..beefae182c 100644 --- a/scene/3d/collision_polygon.h +++ b/scene/3d/collision_polygon.h @@ -33,55 +33,42 @@ #include "scene/3d/spatial.h" #include "scene/resources/shape.h" +class CollisionObject; class CollisionPolygon : public Spatial { GDCLASS(CollisionPolygon, Spatial); -public: - enum BuildMode { - BUILD_SOLIDS, - BUILD_TRIANGLES, - }; - protected: float depth; Rect3 aabb; - BuildMode build_mode; Vector<Point2> polygon; - void _add_to_collision_object(Object *p_obj); - void _update_parent(); + uint32_t owner_id; + CollisionObject *parent; - bool can_update_body; - int shape_from; - int shape_to; + bool disabled; - void _set_shape_range(const Vector2 &p_range); - Vector2 _get_shape_range() const; + void _build_polygon(); protected: void _notification(int p_what); static void _bind_methods(); public: - void set_build_mode(BuildMode p_mode); - BuildMode get_build_mode() const; - void set_depth(float p_depth); float get_depth() const; void set_polygon(const Vector<Point2> &p_polygon); Vector<Point2> get_polygon() const; - virtual Rect3 get_item_rect() const; + void set_disabled(bool p_disabled); + bool is_disabled() const; - int get_collision_object_first_shape() const { return shape_from; } - int get_collision_object_last_shape() const { return shape_to; } + virtual Rect3 get_item_rect() const; String get_configuration_warning() const; CollisionPolygon(); }; -VARIANT_ENUM_CAST(CollisionPolygon::BuildMode); #endif // COLLISION_POLYGON_H |