diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /intern/rigidbody/RBI_api.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/rigidbody/RBI_api.h')
-rw-r--r-- | intern/rigidbody/RBI_api.h | 84 |
1 files changed, 62 insertions, 22 deletions
diff --git a/intern/rigidbody/RBI_api.h b/intern/rigidbody/RBI_api.h index 19ddc8467b6..9a7cbec6879 100644 --- a/intern/rigidbody/RBI_api.h +++ b/intern/rigidbody/RBI_api.h @@ -84,7 +84,10 @@ void RB_dworld_set_split_impulse(rbDynamicsWorld *world, int split_impulse); /* Simulation ----------------------- */ /* Step the simulation by the desired amount (in seconds) with extra controls on substep sizes and maximum substeps */ -void RB_dworld_step_simulation(rbDynamicsWorld *world, float timeStep, int maxSubSteps, float timeSubStep); +void RB_dworld_step_simulation(rbDynamicsWorld *world, + float timeStep, + int maxSubSteps, + float timeSubStep); /* Export -------------------------- */ @@ -104,10 +107,14 @@ void RB_dworld_remove_body(rbDynamicsWorld *world, rbRigidBody *body); /* Collision detection */ -void RB_world_convex_sweep_test( - rbDynamicsWorld *world, rbRigidBody *object, - const float loc_start[3], const float loc_end[3], - float v_location[3], float v_hitpoint[3], float v_normal[3], int *r_hit); +void RB_world_convex_sweep_test(rbDynamicsWorld *world, + rbRigidBody *object, + const float loc_start[3], + const float loc_end[3], + float v_location[3], + float v_hitpoint[3], + float v_normal[3], + int *r_hit); /* ............ */ @@ -180,7 +187,6 @@ void RB_body_set_activation_state(rbRigidBody *body, int use_deactivation); void RB_body_activate(rbRigidBody *body); void RB_body_deactivate(rbRigidBody *body); - /* Simulation ----------------------- */ /* Get current transform matrix of RigidBody to use in Blender (OpenGL format) */ @@ -215,21 +221,22 @@ rbCollisionShape *RB_shape_new_cylinder(float radius, float height); /* Setup (Convex Hull) ------------ */ -rbCollisionShape *RB_shape_new_convex_hull(float *verts, int stride, int count, float margin, bool *can_embed); +rbCollisionShape *RB_shape_new_convex_hull( + float *verts, int stride, int count, float margin, bool *can_embed); /* Setup (Triangle Mesh) ---------- */ /* 1 */ rbMeshData *RB_trimesh_data_new(int num_tris, int num_verts); void RB_trimesh_add_vertices(rbMeshData *mesh, float *vertices, int num_verts, int vert_stride); -void RB_trimesh_add_triangle_indices(rbMeshData *mesh, int num, int index0, int index1, int index2); +void RB_trimesh_add_triangle_indices( + rbMeshData *mesh, int num, int index0, int index1, int index2); void RB_trimesh_finish(rbMeshData *mesh); /* 2a - Triangle Meshes */ rbCollisionShape *RB_shape_new_trimesh(rbMeshData *mesh); /* 2b - GImpact Meshes */ rbCollisionShape *RB_shape_new_gimpact_mesh(rbMeshData *mesh); - /* Cleanup --------------------------- */ void RB_shape_delete(rbCollisionShape *shape); @@ -240,7 +247,12 @@ void RB_shape_delete(rbCollisionShape *shape); float RB_shape_get_margin(rbCollisionShape *shape); void RB_shape_set_margin(rbCollisionShape *shape, float value); -void RB_shape_trimesh_update(rbCollisionShape *shape, float *vertices, int num_verts, int vert_stride, float min[3], float max[3]); +void RB_shape_trimesh_update(rbCollisionShape *shape, + float *vertices, + int num_verts, + int vert_stride, + float min[3], + float max[3]); /* ********************************** */ /* Constraints */ @@ -254,14 +266,38 @@ void RB_dworld_add_constraint(rbDynamicsWorld *world, rbConstraint *con, int dis void RB_dworld_remove_constraint(rbDynamicsWorld *world, rbConstraint *con); rbConstraint *RB_constraint_new_point(float pivot[3], rbRigidBody *rb1, rbRigidBody *rb2); -rbConstraint *RB_constraint_new_fixed(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2); -rbConstraint *RB_constraint_new_hinge(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2); -rbConstraint *RB_constraint_new_slider(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2); -rbConstraint *RB_constraint_new_piston(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2); -rbConstraint *RB_constraint_new_6dof(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2); -rbConstraint *RB_constraint_new_6dof_spring(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2); -rbConstraint *RB_constraint_new_6dof_spring2(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2); -rbConstraint *RB_constraint_new_motor(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2); +rbConstraint *RB_constraint_new_fixed(float pivot[3], + float orn[4], + rbRigidBody *rb1, + rbRigidBody *rb2); +rbConstraint *RB_constraint_new_hinge(float pivot[3], + float orn[4], + rbRigidBody *rb1, + rbRigidBody *rb2); +rbConstraint *RB_constraint_new_slider(float pivot[3], + float orn[4], + rbRigidBody *rb1, + rbRigidBody *rb2); +rbConstraint *RB_constraint_new_piston(float pivot[3], + float orn[4], + rbRigidBody *rb1, + rbRigidBody *rb2); +rbConstraint *RB_constraint_new_6dof(float pivot[3], + float orn[4], + rbRigidBody *rb1, + rbRigidBody *rb2); +rbConstraint *RB_constraint_new_6dof_spring(float pivot[3], + float orn[4], + rbRigidBody *rb1, + rbRigidBody *rb2); +rbConstraint *RB_constraint_new_6dof_spring2(float pivot[3], + float orn[4], + rbRigidBody *rb1, + rbRigidBody *rb2); +rbConstraint *RB_constraint_new_motor(float pivot[3], + float orn[4], + rbRigidBody *rb1, + rbRigidBody *rb2); /* ............ */ @@ -288,7 +324,8 @@ void RB_constraint_set_enabled(rbConstraint *con, int enabled); */ void RB_constraint_set_limits_hinge(rbConstraint *con, float lower, float upper); void RB_constraint_set_limits_slider(rbConstraint *con, float lower, float upper); -void RB_constraint_set_limits_piston(rbConstraint *con, float lin_lower, float lin_upper, float ang_lower, float ang_upper); +void RB_constraint_set_limits_piston( + rbConstraint *con, float lin_lower, float lin_upper, float ang_lower, float ang_upper); void RB_constraint_set_limits_6dof(rbConstraint *con, int axis, float lower, float upper); /* 6dof spring specific */ @@ -306,8 +343,12 @@ void RB_constraint_set_equilibrium_6dof_spring2(rbConstraint *con); /* motors */ void RB_constraint_set_enable_motor(rbConstraint *con, int enable_lin, int enable_ang); -void RB_constraint_set_max_impulse_motor(rbConstraint *con, float max_impulse_lin, float max_impulse_ang); -void RB_constraint_set_target_velocity_motor(rbConstraint *con, float velocity_lin, float velocity_ang); +void RB_constraint_set_max_impulse_motor(rbConstraint *con, + float max_impulse_lin, + float max_impulse_ang); +void RB_constraint_set_target_velocity_motor(rbConstraint *con, + float velocity_lin, + float velocity_ang); /* Set number of constraint solver iterations made per step, this overrided world setting * To use default set it to -1 */ @@ -323,4 +364,3 @@ void RB_constraint_set_breaking_threshold(rbConstraint *con, float threshold); #endif #endif /* __RB_API_H__ */ - |