aboutsummaryrefslogtreecommitdiff
path: root/bin/tests/test_detailer.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2016-03-09 00:14:08 +0100
committerRémi Verschelde2016-03-09 00:14:08 +0100
commite46e43d2aaa6339a1675eb989f41885e745bf5c3 (patch)
treecf91f2869ff8f058c6682569fb31e22e5ee736ad /bin/tests/test_detailer.cpp
parent1dad6eca812e5c2e313b54265114de8a1d73d999 (diff)
parent4a4f2479146aa33e235ed57cde311efda68d3c8f (diff)
downloadgodot-e46e43d2aaa6339a1675eb989f41885e745bf5c3.tar.gz
godot-e46e43d2aaa6339a1675eb989f41885e745bf5c3.tar.zst
godot-e46e43d2aaa6339a1675eb989f41885e745bf5c3.zip
Merge pull request #3928 from Marqin/whitespace
remove trailing whitespace - sorry for the broken PRs, please rebase :)
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 616356077..5dba7c3f7 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() {
-
+
}
};