diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-20 21:45:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 21:45:20 +0100 |
commit | fa681d04b7434c3db8c556d5fc046b702c731d98 (patch) | |
tree | a39079990bae6c4227cc16d90db274ffe1119c87 /scene/3d/soft_body_3d.h | |
parent | 793000c6a90211a32b478fb550d82221e2817da0 (diff) | |
parent | d5ea4acd2dddfe13ad7989aa54d9cb5739e678d5 (diff) |
Merge pull request #46937 from nekomatata/soft-body-support
SoftBody support in GodotPhysics 3D
Diffstat (limited to 'scene/3d/soft_body_3d.h')
-rw-r--r-- | scene/3d/soft_body_3d.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/scene/3d/soft_body_3d.h b/scene/3d/soft_body_3d.h index 6e24a530bd..f98df39209 100644 --- a/scene/3d/soft_body_3d.h +++ b/scene/3d/soft_body_3d.h @@ -32,10 +32,11 @@ #define SOFT_PHYSICS_BODY_H #include "scene/3d/mesh_instance_3d.h" +#include "servers/physics_server_3d.h" class SoftBody3D; -class SoftBodyRenderingServerHandler { +class SoftBodyRenderingServerHandler : public RenderingServerHandler { friend class SoftBody3D; RID mesh; @@ -57,9 +58,9 @@ private: void commit_changes(); public: - void set_vertex(int p_vertex_id, const void *p_vector3); - void set_normal(int p_vertex_id, const void *p_vector3); - void set_aabb(const AABB &p_aabb); + void set_vertex(int p_vertex_id, const void *p_vector3) override; + void set_normal(int p_vertex_id, const void *p_vector3) override; + void set_aabb(const AABB &p_aabb) override; }; class SoftBody3D : public MeshInstance3D { @@ -122,6 +123,8 @@ public: void prepare_physics_server(); void become_mesh_owner(); + RID get_physics_rid() const { return physics_rid; } + void set_collision_mask(uint32_t p_mask); uint32_t get_collision_mask() const; @@ -149,18 +152,9 @@ public: void set_linear_stiffness(real_t p_linear_stiffness); real_t get_linear_stiffness(); - void set_angular_stiffness(real_t p_angular_stiffness); - real_t get_angular_stiffness(); - - void set_volume_stiffness(real_t p_volume_stiffness); - real_t get_volume_stiffness(); - void set_pressure_coefficient(real_t p_pressure_coefficient); real_t get_pressure_coefficient(); - void set_pose_matching_coefficient(real_t p_pose_matching_coefficient); - real_t get_pose_matching_coefficient(); - void set_damping_coefficient(real_t p_damping_coefficient); real_t get_damping_coefficient(); |