diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-06 01:51:18 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-06 01:51:18 +0400 |
commit | 83b8cbeab1584581b0601941e2b0581a209bb88b (patch) | |
tree | ef890b42da8539345e54c62d4b715e6a6327a9ea | |
parent | aa02ca126b327c701d5f019d61f00398bcd6c932 (diff) |
rigidbody: Code cleanup
Stupid oversight, don't use floats for indices.
-rw-r--r-- | intern/rigidbody/RBI_api.h | 8 | ||||
-rw-r--r-- | intern/rigidbody/rb_bullet_api.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/intern/rigidbody/RBI_api.h b/intern/rigidbody/RBI_api.h index ee5006f2838..9dde2cc3049 100644 --- a/intern/rigidbody/RBI_api.h +++ b/intern/rigidbody/RBI_api.h @@ -284,12 +284,12 @@ extern void RB_constraint_set_enabled(rbConstraint *con, int enabled); extern void RB_constraint_set_limits_hinge(rbConstraint *con, float lower, float upper); extern void RB_constraint_set_limits_slider(rbConstraint *con, float lower, float upper); extern void RB_constraint_set_limits_piston(rbConstraint *con, float lin_lower, float lin_upper, float ang_lower, float ang_upper); -extern void RB_constraint_set_limits_6dof(rbConstraint *con, float axis, float lower, float upper); +extern void RB_constraint_set_limits_6dof(rbConstraint *con, int axis, float lower, float upper); /* 6dof spring specific */ -extern void RB_constraint_set_stiffness_6dof_spring(rbConstraint *con, float axis, float stiffness); -extern void RB_constraint_set_damping_6dof_spring(rbConstraint *con, float axis, float damping); -extern void RB_constraint_set_spring_6dof_spring(rbConstraint *con, float axis, int enable); +extern void RB_constraint_set_stiffness_6dof_spring(rbConstraint *con, int axis, float stiffness); +extern void RB_constraint_set_damping_6dof_spring(rbConstraint *con, int axis, float damping); +extern void RB_constraint_set_spring_6dof_spring(rbConstraint *con, int axis, int enable); extern void RB_constraint_set_equilibrium_6dof_spring(rbConstraint *con); /* Set number of constraint solver iterations made per step, this overrided world setting diff --git a/intern/rigidbody/rb_bullet_api.cpp b/intern/rigidbody/rb_bullet_api.cpp index 4a3367ad768..58345d4e08c 100644 --- a/intern/rigidbody/rb_bullet_api.cpp +++ b/intern/rigidbody/rb_bullet_api.cpp @@ -897,21 +897,21 @@ void RB_constraint_set_limits_piston(rbConstraint *con, float lin_lower, float l constraint->setUpperAngLimit(ang_upper); } -void RB_constraint_set_limits_6dof(rbConstraint *con, float axis, float lower, float upper) +void RB_constraint_set_limits_6dof(rbConstraint *con, int axis, float lower, float upper) { btGeneric6DofConstraint *constraint = reinterpret_cast<btGeneric6DofConstraint*>(con); constraint->setLimit(axis, lower, upper); } -void RB_constraint_set_stiffness_6dof_spring(rbConstraint *con, float axis, float stiffness) +void RB_constraint_set_stiffness_6dof_spring(rbConstraint *con, int axis, float stiffness) { btGeneric6DofSpringConstraint *constraint = reinterpret_cast<btGeneric6DofSpringConstraint*>(con); constraint->setStiffness(axis, stiffness); } -void RB_constraint_set_damping_6dof_spring(rbConstraint *con, float axis, float damping) +void RB_constraint_set_damping_6dof_spring(rbConstraint *con, int axis, float damping) { btGeneric6DofSpringConstraint *constraint = reinterpret_cast<btGeneric6DofSpringConstraint*>(con); @@ -919,7 +919,7 @@ void RB_constraint_set_damping_6dof_spring(rbConstraint *con, float axis, float constraint->setDamping(axis, 1.0f - damping); } -void RB_constraint_set_spring_6dof_spring(rbConstraint *con, float axis, int enable) +void RB_constraint_set_spring_6dof_spring(rbConstraint *con, int axis, int enable) { btGeneric6DofSpringConstraint *constraint = reinterpret_cast<btGeneric6DofSpringConstraint*>(con); |