coeng

diff src/test.cc @ 7:af24cfbdf9b6

adding collision detection
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Feb 2015 10:08:00 +0200
parents 2f872a179914
children 8cce82794f90
line diff
     1.1 --- a/src/test.cc	Sat Feb 14 07:27:12 2015 +0200
     1.2 +++ b/src/test.cc	Sat Feb 14 10:08:00 2015 +0200
     1.3 @@ -37,7 +37,7 @@
     1.4  	glutCreateWindow("component system test");
     1.5  
     1.6  	glutDisplayFunc(display);
     1.7 -	//glutIdleFunc(idle);
     1.8 +	glutIdleFunc(idle);
     1.9  	glutReshapeFunc(reshape);
    1.10  	glutKeyboardFunc(keyb);
    1.11  	glutMouseFunc(mouse);
    1.12 @@ -67,8 +67,9 @@
    1.13  	obj->add_component(new CoXForm);
    1.14  	obj->add_component(new CoPRS);
    1.15  	obj->add_component(new CoRigid);
    1.16 -	COCAST(CoPRS, obj->get_component("prs"))->pos = Vector3(5, 1, 0);
    1.17 +	COCAST(CoPRS, obj->get_component("prs"))->pos = Vector3(5, 2, 0);
    1.18  	objects.push_back(obj);
    1.19 +	simworld.add_object(obj);
    1.20  
    1.21  	obj = new GObject;
    1.22  	obj->add_component(new CoSphereVis);