summaryrefslogtreecommitdiff
path: root/scene/3d/physics_joint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/physics_joint.cpp')
-rw-r--r--scene/3d/physics_joint.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp
index 61d496935b..55007c6dc6 100644
--- a/scene/3d/physics_joint.cpp
+++ b/scene/3d/physics_joint.cpp
@@ -188,9 +188,9 @@ void PinJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP);
- BIND_CONSTANT(PARAM_BIAS);
- BIND_CONSTANT(PARAM_DAMPING);
- BIND_CONSTANT(PARAM_IMPULSE_CLAMP);
+ BIND_ENUM_CONSTANT(PARAM_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_IMPULSE_CLAMP);
}
void PinJoint::set_param(Param p_param, float p_value) {
@@ -282,19 +282,19 @@ void HingeJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/target_velocity", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/max_impulse", PROPERTY_HINT_RANGE, "0.01,1024,0.01"), "set_param", "get_param", PARAM_MOTOR_MAX_IMPULSE);
- BIND_CONSTANT(PARAM_BIAS);
- BIND_CONSTANT(PARAM_LIMIT_UPPER);
- BIND_CONSTANT(PARAM_LIMIT_LOWER);
- BIND_CONSTANT(PARAM_LIMIT_BIAS);
- BIND_CONSTANT(PARAM_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_LIMIT_RELAXATION);
- BIND_CONSTANT(PARAM_MOTOR_TARGET_VELOCITY);
- BIND_CONSTANT(PARAM_MOTOR_MAX_IMPULSE);
- BIND_CONSTANT(PARAM_MAX);
+ BIND_ENUM_CONSTANT(PARAM_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_RELAXATION);
+ BIND_ENUM_CONSTANT(PARAM_MOTOR_TARGET_VELOCITY);
+ BIND_ENUM_CONSTANT(PARAM_MOTOR_MAX_IMPULSE);
+ BIND_ENUM_CONSTANT(PARAM_MAX);
- BIND_CONSTANT(FLAG_USE_LIMIT);
- BIND_CONSTANT(FLAG_ENABLE_MOTOR);
- BIND_CONSTANT(FLAG_MAX);
+ BIND_ENUM_CONSTANT(FLAG_USE_LIMIT);
+ BIND_ENUM_CONSTANT(FLAG_ENABLE_MOTOR);
+ BIND_ENUM_CONSTANT(FLAG_MAX);
}
void HingeJoint::set_param(Param p_param, float p_value) {
@@ -428,31 +428,31 @@ void SliderJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_UPPER);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_LOWER);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_RESTITUTION);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_DAMPING);
- BIND_CONSTANT(PARAM_LINEAR_MOTION_SOFTNESS);
- BIND_CONSTANT(PARAM_LINEAR_MOTION_RESTITUTION);
- BIND_CONSTANT(PARAM_LINEAR_MOTION_DAMPING);
- BIND_CONSTANT(PARAM_LINEAR_ORTHOGONAL_SOFTNESS);
- BIND_CONSTANT(PARAM_LINEAR_ORTHOGONAL_RESTITUTION);
- BIND_CONSTANT(PARAM_LINEAR_ORTHOGONAL_DAMPING);
-
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_UPPER);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_LOWER);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_RESTITUTION);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_DAMPING);
- BIND_CONSTANT(PARAM_ANGULAR_MOTION_SOFTNESS);
- BIND_CONSTANT(PARAM_ANGULAR_MOTION_RESTITUTION);
- BIND_CONSTANT(PARAM_ANGULAR_MOTION_DAMPING);
- BIND_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_SOFTNESS);
- BIND_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
- BIND_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_DAMPING);
-
- BIND_CONSTANT(PARAM_MAX);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_MOTION_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_MOTION_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_MOTION_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_ORTHOGONAL_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_ORTHOGONAL_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_ORTHOGONAL_DAMPING);
+
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTION_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTION_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTION_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_DAMPING);
+
+ BIND_ENUM_CONSTANT(PARAM_MAX);
}
void SliderJoint::set_param(Param p_param, float p_value) {
@@ -560,12 +560,12 @@ void ConeTwistJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION);
- BIND_CONSTANT(PARAM_SWING_SPAN);
- BIND_CONSTANT(PARAM_TWIST_SPAN);
- BIND_CONSTANT(PARAM_BIAS);
- BIND_CONSTANT(PARAM_SOFTNESS);
- BIND_CONSTANT(PARAM_RELAXATION);
- BIND_CONSTANT(PARAM_MAX);
+ BIND_ENUM_CONSTANT(PARAM_SWING_SPAN);
+ BIND_ENUM_CONSTANT(PARAM_TWIST_SPAN);
+ BIND_ENUM_CONSTANT(PARAM_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_RELAXATION);
+ BIND_ENUM_CONSTANT(PARAM_MAX);
}
void ConeTwistJoint::set_param(Param p_param, float p_value) {
@@ -773,26 +773,26 @@ void Generic6DOFJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
- BIND_CONSTANT(PARAM_LINEAR_LOWER_LIMIT);
- BIND_CONSTANT(PARAM_LINEAR_UPPER_LIMIT);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_LINEAR_RESTITUTION);
- BIND_CONSTANT(PARAM_LINEAR_DAMPING);
- BIND_CONSTANT(PARAM_ANGULAR_LOWER_LIMIT);
- BIND_CONSTANT(PARAM_ANGULAR_UPPER_LIMIT);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_ANGULAR_DAMPING);
- BIND_CONSTANT(PARAM_ANGULAR_RESTITUTION);
- BIND_CONSTANT(PARAM_ANGULAR_FORCE_LIMIT);
- BIND_CONSTANT(PARAM_ANGULAR_ERP);
- BIND_CONSTANT(PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- BIND_CONSTANT(PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
- BIND_CONSTANT(PARAM_MAX);
-
- BIND_CONSTANT(FLAG_ENABLE_LINEAR_LIMIT);
- BIND_CONSTANT(FLAG_ENABLE_ANGULAR_LIMIT);
- BIND_CONSTANT(FLAG_ENABLE_MOTOR);
- BIND_CONSTANT(FLAG_MAX);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LOWER_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_UPPER_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LOWER_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_UPPER_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_FORCE_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_ERP);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_MAX);
+
+ BIND_ENUM_CONSTANT(FLAG_ENABLE_LINEAR_LIMIT);
+ BIND_ENUM_CONSTANT(FLAG_ENABLE_ANGULAR_LIMIT);
+ BIND_ENUM_CONSTANT(FLAG_ENABLE_MOTOR);
+ BIND_ENUM_CONSTANT(FLAG_MAX);
}
void Generic6DOFJoint::set_param_x(Param p_param, float p_value) {