summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp16
-rw-r--r--servers/physics_2d/joints_2d_sw.h4
-rw-r--r--servers/physics_2d/physics_server_2d_sw.cpp4
-rw-r--r--servers/physics_2d/physics_server_2d_sw.h4
-rw-r--r--servers/physics_2d/physics_server_2d_wrap_mt.h4
5 files changed, 16 insertions, 16 deletions
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index eda0b923a2..81e961e90d 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -390,29 +390,29 @@ void DampedSpringJoint2DSW::solve(real_t p_step) {
B->apply_impulse(rB, j);
}
-void DampedSpringJoint2DSW::set_param(PhysicsServer2D::DampedStringParam p_param, real_t p_value) {
+void DampedSpringJoint2DSW::set_param(PhysicsServer2D::DampedSpringParam p_param, real_t p_value) {
switch (p_param) {
- case PhysicsServer2D::DAMPED_STRING_REST_LENGTH: {
+ case PhysicsServer2D::DAMPED_SPRING_REST_LENGTH: {
rest_length = p_value;
} break;
- case PhysicsServer2D::DAMPED_STRING_DAMPING: {
+ case PhysicsServer2D::DAMPED_SPRING_DAMPING: {
damping = p_value;
} break;
- case PhysicsServer2D::DAMPED_STRING_STIFFNESS: {
+ case PhysicsServer2D::DAMPED_SPRING_STIFFNESS: {
stiffness = p_value;
} break;
}
}
-real_t DampedSpringJoint2DSW::get_param(PhysicsServer2D::DampedStringParam p_param) const {
+real_t DampedSpringJoint2DSW::get_param(PhysicsServer2D::DampedSpringParam p_param) const {
switch (p_param) {
- case PhysicsServer2D::DAMPED_STRING_REST_LENGTH: {
+ case PhysicsServer2D::DAMPED_SPRING_REST_LENGTH: {
return rest_length;
} break;
- case PhysicsServer2D::DAMPED_STRING_DAMPING: {
+ case PhysicsServer2D::DAMPED_SPRING_DAMPING: {
return damping;
} break;
- case PhysicsServer2D::DAMPED_STRING_STIFFNESS: {
+ case PhysicsServer2D::DAMPED_SPRING_STIFFNESS: {
return stiffness;
} break;
}
diff --git a/servers/physics_2d/joints_2d_sw.h b/servers/physics_2d/joints_2d_sw.h
index 87556ccea1..3c8aab77c8 100644
--- a/servers/physics_2d/joints_2d_sw.h
+++ b/servers/physics_2d/joints_2d_sw.h
@@ -151,8 +151,8 @@ public:
virtual bool setup(real_t p_step);
virtual void solve(real_t p_step);
- void set_param(PhysicsServer2D::DampedStringParam p_param, real_t p_value);
- real_t get_param(PhysicsServer2D::DampedStringParam p_param) const;
+ void set_param(PhysicsServer2D::DampedSpringParam p_param, real_t p_value);
+ real_t get_param(PhysicsServer2D::DampedSpringParam p_param) const;
DampedSpringJoint2DSW(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, Body2DSW *p_body_a, Body2DSW *p_body_b);
~DampedSpringJoint2DSW();
diff --git a/servers/physics_2d/physics_server_2d_sw.cpp b/servers/physics_2d/physics_server_2d_sw.cpp
index a686903763..6983225668 100644
--- a/servers/physics_2d/physics_server_2d_sw.cpp
+++ b/servers/physics_2d/physics_server_2d_sw.cpp
@@ -1113,7 +1113,7 @@ real_t PhysicsServer2DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param
return pin_joint->get_param(p_param);
}
-void PhysicsServer2DSW::damped_string_joint_set_param(RID p_joint, DampedStringParam p_param, real_t p_value) {
+void PhysicsServer2DSW::damped_spring_joint_set_param(RID p_joint, DampedSpringParam p_param, real_t p_value) {
Joint2DSW *j = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!j);
ERR_FAIL_COND(j->get_type() != JOINT_DAMPED_SPRING);
@@ -1122,7 +1122,7 @@ void PhysicsServer2DSW::damped_string_joint_set_param(RID p_joint, DampedStringP
dsj->set_param(p_param, p_value);
}
-real_t PhysicsServer2DSW::damped_string_joint_get_param(RID p_joint, DampedStringParam p_param) const {
+real_t PhysicsServer2DSW::damped_spring_joint_get_param(RID p_joint, DampedSpringParam p_param) const {
Joint2DSW *j = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!j, 0);
ERR_FAIL_COND_V(j->get_type() != JOINT_DAMPED_SPRING, 0);
diff --git a/servers/physics_2d/physics_server_2d_sw.h b/servers/physics_2d/physics_server_2d_sw.h
index f9b0bc716c..093c775cb5 100644
--- a/servers/physics_2d/physics_server_2d_sw.h
+++ b/servers/physics_2d/physics_server_2d_sw.h
@@ -266,8 +266,8 @@ public:
virtual RID damped_spring_joint_create(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b = RID());
virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value);
virtual real_t pin_joint_get_param(RID p_joint, PinJointParam p_param) const;
- virtual void damped_string_joint_set_param(RID p_joint, DampedStringParam p_param, real_t p_value);
- virtual real_t damped_string_joint_get_param(RID p_joint, DampedStringParam p_param) const;
+ virtual void damped_spring_joint_set_param(RID p_joint, DampedSpringParam p_param, real_t p_value);
+ virtual real_t damped_spring_joint_get_param(RID p_joint, DampedSpringParam p_param) const;
virtual JointType joint_get_type(RID p_joint) const;
diff --git a/servers/physics_2d/physics_server_2d_wrap_mt.h b/servers/physics_2d/physics_server_2d_wrap_mt.h
index c2ae288f95..bc918b20f4 100644
--- a/servers/physics_2d/physics_server_2d_wrap_mt.h
+++ b/servers/physics_2d/physics_server_2d_wrap_mt.h
@@ -287,8 +287,8 @@ public:
FUNC3(pin_joint_set_param, RID, PinJointParam, real_t);
FUNC2RC(real_t, pin_joint_get_param, RID, PinJointParam);
- FUNC3(damped_string_joint_set_param, RID, DampedStringParam, real_t);
- FUNC2RC(real_t, damped_string_joint_get_param, RID, DampedStringParam);
+ FUNC3(damped_spring_joint_set_param, RID, DampedSpringParam, real_t);
+ FUNC2RC(real_t, damped_spring_joint_get_param, RID, DampedSpringParam);
FUNC1RC(JointType, joint_get_type, RID);