From 4a4f2479146aa33e235ed57cde311efda68d3c8f Mon Sep 17 00:00:00 2001 From: Hubert Jarosz Date: Wed, 9 Mar 2016 00:00:52 +0100 Subject: remove trailing whitespace --- bin/tests/test_physics.cpp | 60 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'bin/tests/test_physics.cpp') diff --git a/bin/tests/test_physics.cpp b/bin/tests/test_physics.cpp index ce96f37f3f..ecd90a13d4 100644 --- a/bin/tests/test_physics.cpp +++ b/bin/tests/test_physics.cpp @@ -47,7 +47,7 @@ class TestPhysicsMainLoop : public MainLoop { }; RID test_cube; - + RID plane; RID sphere; RID light; @@ -74,13 +74,13 @@ class TestPhysicsMainLoop : public MainLoop { //t.basis.scale( Vector3(1.0,0.5,0.2) ); vs->instance_set_transform(p_visual_instance,t); } - + bool quit; - + protected: static void _bind_methods() { - + ObjectTypeDB::bind_method("body_changed_transform",&TestPhysicsMainLoop::body_changed_transform); } @@ -90,11 +90,11 @@ protected: PhysicsServer * ps = PhysicsServer::get_singleton(); RID mesh_instance = vs->instance_create2(type_mesh_map[p_shape],scenario); - RID body = ps->body_create(p_body,!p_active_default); + RID body = ps->body_create(p_body,!p_active_default); ps->body_set_space(body,space); ps->body_set_param(body,PhysicsServer::BODY_PARAM_BOUNCE,0.0); //todo set space - ps->body_add_shape(body,type_shape_map[p_shape]); + ps->body_add_shape(body,type_shape_map[p_shape]); ps->body_set_force_integration_callback(body,this,"body_changed_transform",mesh_instance); ps->body_set_state( body, PhysicsServer::BODY_STATE_TRANSFORM,p_location); @@ -289,7 +289,7 @@ protected: public: virtual void input_event(const InputEvent& p_event) { - + if (p_event.type==InputEvent::MOUSE_MOTION && p_event.mouse_motion.button_mask&4) { ofs_y-=p_event.mouse_motion.relative_y/200.0; @@ -329,7 +329,7 @@ public: } virtual void request_quit() { - + quit=true; } virtual void init() { @@ -388,53 +388,53 @@ public: /* Make Trimesh */ quit=false; return; - + #if 0 #define GRID_SIZE 5 - + float grid[GRID_SIZE][GRID_SIZE]; - + for (int i=0;i faces; - + for (int i=1;ishape_create(); ps->shape_set_data(trimesh_shape, PhysicsServer::SHAPE_CONCAVE_POLYGON,faces); faces=ps->shape_get_shape(trimesh_shape, 0); Vector normals; // for drawing for (int i=0;ifixed_material_create(); vs->material_generate( trimesh_mat, Color(1.0,0.5,0.3) ); vs->mesh_surface_set_material( trimesh_mesh, 0, trimesh_mat ); - + RID triins = vs->instance_create2(trimesh_mesh); - - - + + + RID tribody = ps->body_create( PhysicsServer::BODY_MODE_STATIC, trimesh_shape); Transform tritrans = Transform( Matrix3(), Vector3(0,0,-2) ); ps->body_set_state( tribody, PhysicsServer::BODY_STATE_TRANSFORM, tritrans ); @@ -483,7 +483,7 @@ public: return quit; } virtual void finish() { - + } void test_joint() { @@ -599,7 +599,7 @@ public: PhysicsServer::ShapeType type=shape_idx[i%4]; //type=PhysicsServer::SHAPE_CONVEX_POLYGON; - Transform t; + Transform t; t.origin=Vector3(0.0*i,3.5+1.1*i,0.7+0.0*i); //t.origin=Vector3(-0.7+0.0*i,0.5+4.1*i,0); -- cgit v1.2.3