summaryrefslogtreecommitdiff
path: root/bin/tests/test_detailer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tests/test_detailer.cpp')
-rw-r--r--bin/tests/test_detailer.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/bin/tests/test_detailer.cpp b/bin/tests/test_detailer.cpp
index 616356077e..5dba7c3f72 100644
--- a/bin/tests/test_detailer.cpp
+++ b/bin/tests/test_detailer.cpp
@@ -44,7 +44,7 @@ class TestMainLoop : public MainLoop {
RID light;
RID mesh;
RID scenario;
-
+
#define MULTIMESH_COUNT 1500
float ofs_x,ofs_y;
@@ -122,9 +122,9 @@ public:
}
virtual void input_event(const InputEvent& p_event) {
-
+
if (p_event.type==InputEvent::MOUSE_MOTION && p_event.mouse_motion.button_mask&4) {
-
+
ofs_x+=p_event.mouse_motion.relative_y/200.0;
ofs_y+=p_event.mouse_motion.relative_x/200.0;
}
@@ -142,16 +142,16 @@ public:
}
-
+
virtual void request_quit() {
-
+
quit=true;
}
virtual void init() {
-
+
VisualServer *vs=VisualServer::get_singleton();
@@ -163,13 +163,13 @@ public:
_update_qh();
instance = vs->instance_create2(mesh,scenario);
-
+
camera = vs->camera_create();
-
+
vs->camera_set_perspective( camera, 60.0,0.1, 100.0 );
viewport = vs->viewport_create();
- vs->viewport_attach_camera( viewport, camera );
+ vs->viewport_attach_camera( viewport, camera );
vs->viewport_attach_to_screen(viewport);
vs->viewport_set_scenario( viewport, scenario );
@@ -179,7 +179,7 @@ public:
//vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.3,0.3,0.3) );
light = vs->instance_create2( lightaux,scenario );
vs->instance_set_transform(light,Transform(Matrix3(Vector3(0.1,0.4,0.7).normalized(),0.9)));
-
+
ofs_x=0;
ofs_y=0;
quit=false;
@@ -190,20 +190,20 @@ public:
}
virtual bool iteration(float p_time) {
-
+
VisualServer *vs=VisualServer::get_singleton();
-
+
Transform tr_camera;
tr_camera.rotate( Vector3(0,1,0), ofs_y );
tr_camera.rotate( Vector3(1,0,0),ofs_x );
tr_camera.translate(0,0,10);
-
+
vs->camera_set_transform( camera, tr_camera );
-
+
return quit;
}
virtual void finish() {
-
+
}
};