diff options
Diffstat (limited to 'servers/physics_server_3d.h')
-rw-r--r-- | servers/physics_server_3d.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index f830c95b58..4811f7a039 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -33,6 +33,9 @@ #include "core/io/resource.h" #include "core/object/class_db.h" +#include "core/object/gdvirtual.gen.inc" +#include "core/object/script_language.h" +#include "core/variant/native_ptr.h" class PhysicsDirectSpaceState3D; @@ -202,13 +205,21 @@ public: PhysicsDirectSpaceState3D(); }; -class RenderingServerHandler { +class PhysicsServer3DRenderingServerHandler : public Object { + GDCLASS(PhysicsServer3DRenderingServerHandler, Object) +protected: + GDVIRTUAL2(_set_vertex, int, GDNativeConstPtr<void>) + GDVIRTUAL2(_set_normal, int, GDNativeConstPtr<void>) + GDVIRTUAL1(_set_aabb, const AABB &) + + static void _bind_methods(); + public: - virtual void set_vertex(int p_vertex_id, const void *p_vector3) = 0; - virtual void set_normal(int p_vertex_id, const void *p_vector3) = 0; - virtual void set_aabb(const AABB &p_aabb) = 0; + virtual void set_vertex(int p_vertex_id, const void *p_vector3); + virtual void set_normal(int p_vertex_id, const void *p_vector3); + virtual void set_aabb(const AABB &p_aabb); - virtual ~RenderingServerHandler() {} + virtual ~PhysicsServer3DRenderingServerHandler() {} }; class PhysicsTestMotionParameters3D; @@ -552,7 +563,7 @@ public: virtual RID soft_body_create() = 0; - virtual void soft_body_update_rendering_server(RID p_body, RenderingServerHandler *p_rendering_server_handler) = 0; + virtual void soft_body_update_rendering_server(RID p_body, PhysicsServer3DRenderingServerHandler *p_rendering_server_handler) = 0; virtual void soft_body_set_space(RID p_body, RID p_space) = 0; virtual RID soft_body_get_space(RID p_body) const = 0; @@ -624,7 +635,7 @@ public: virtual void joint_set_solver_priority(RID p_joint, int p_priority) = 0; virtual int joint_get_solver_priority(RID p_joint) const = 0; - virtual void joint_disable_collisions_between_bodies(RID p_joint, const bool p_disable) = 0; + virtual void joint_disable_collisions_between_bodies(RID p_joint, bool p_disable) = 0; virtual bool joint_is_disabled_collisions_between_bodies(RID p_joint) const = 0; virtual void joint_make_pin(RID p_joint, RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) = 0; |