summaryrefslogtreecommitdiff
path: root/main/tests/test_physics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/tests/test_physics.cpp')
-rw-r--r--main/tests/test_physics.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp
index b1a7af8dad..ea5b1cae85 100644
--- a/main/tests/test_physics.cpp
+++ b/main/tests/test_physics.cpp
@@ -351,7 +351,7 @@ public:
vs->viewport_set_scenario( viewport, scenario );
vs->camera_set_perspective(camera,60,0.1,40.0);
- vs->camera_set_transform(camera,Transform( Matrix3(), Vector3(0,9,12)));
+ vs->camera_set_transform(camera,Transform( Basis(), Vector3(0,9,12)));
//vs->scenario_set_debug(scenario,VS::SCENARIO_DEBUG_WIREFRAME);
Transform gxf;
@@ -441,7 +441,7 @@ public:
RID tribody = ps->body_create( PhysicsServer::BODY_MODE_STATIC, trimesh_shape);
- Transform tritrans = Transform( Matrix3(), Vector3(0,0,-2) );
+ Transform tritrans = Transform( Basis(), Vector3(0,0,-2) );
ps->body_set_state( tribody, PhysicsServer::BODY_STATE_TRANSFORM, tritrans );
vs->instance_set_transform( triins, tritrans );
RID trimesh_material = vs->fixed_material_create();
@@ -477,7 +477,7 @@ public:
#if 0
PhysicsServer * ps = PhysicsServer::get_singleton();
- mover = create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,Transform(Matrix3(),Vector3(0,0,-24)));
+ mover = create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,Transform(Basis(),Vector3(0,0,-24)));
RID b = create_body(PhysicsServer::SHAPE_CAPSULE,PhysicsServer::BODY_MODE_RIGID,Transform());
ps->joint_create_double_pin(b,Vector3(0,0,1.0),mover,Vector3(0,0,0));
@@ -508,17 +508,17 @@ public:
PhysicsServer * ps = PhysicsServer::get_singleton();
- mover = create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,Transform(Matrix3(),Vector3(0,0,-24)));
+ mover = create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,Transform(Basis(),Vector3(0,0,-24)));
RID b = create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_RIGID,Transform());
- ps->joint_create_double_hinge(b,Transform(Matrix3(),Vector3(1,1,1.0)),mover,Transform(Matrix3(),Vector3(0,0,0)));
+ ps->joint_create_double_hinge(b,Transform(Basis(),Vector3(1,1,1.0)),mover,Transform(Basis(),Vector3(0,0,0)));
ps->body_add_collision_exception(mover,b);
/*
for(int i=0;i<20;i++) {
RID c = create_body(PhysicsServer::SHAPE_CAPSULE,PhysicsServer::BODY_MODE_RIGID,Transform());
- ps->joint_create_double_hinge(b,Transform(Matrix3(),Vector3(0,0,-0.7)),c,Transform(Matrix3(),Vector3(0,0,0.7)));
+ ps->joint_create_double_hinge(b,Transform(Basis(),Vector3(0,0,-0.7)),c,Transform(Basis(),Vector3(0,0,0.7)));
ps->body_add_collision_exception(c,b);
b=c;
}
@@ -560,7 +560,7 @@ public:
ps->body_set_force_integration_callback(character,this,"body_changed_transform",mesh_instance);
- ps->body_set_state( character, PhysicsServer::BODY_STATE_TRANSFORM,Transform(Matrix3(),Vector3(-2,5,-2)));
+ ps->body_set_state( character, PhysicsServer::BODY_STATE_TRANSFORM,Transform(Basis(),Vector3(-2,5,-2)));
bodies.push_back(character);
@@ -611,8 +611,8 @@ public:
void test_activate() {
- create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_RIGID,Transform(Matrix3(),Vector3(0,2,0)),true);
- //create_body(PhysicsServer::SHAPE_SPHERE,PhysicsServer::BODY_MODE_RIGID,Transform(Matrix3(),Vector3(0,6,0)),true);
+ create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_RIGID,Transform(Basis(),Vector3(0,2,0)),true);
+ //create_body(PhysicsServer::SHAPE_SPHERE,PhysicsServer::BODY_MODE_RIGID,Transform(Basis(),Vector3(0,6,0)),true);
create_static_plane( Plane( Vector3(0,1,0), -1) );
}