|
From: julien r. <jul...@us...> - 2004-11-10 21:02:24
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28528 Modified Files: boundingbox.cc glrenderer.cc Log Message: fixe dans les collisions Index: glrenderer.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/glrenderer.cc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** glrenderer.cc 9 Nov 2004 18:19:04 -0000 1.15 --- glrenderer.cc 10 Nov 2004 21:02:04 -0000 1.16 *************** *** 1070,1079 **** Vector3 fwd, rgt, up; //mesh->GetRotation().ToAngleVectors(fwd, rgt, up); ! //fwd = mesh->GetRotation().GetXAxis(); ! //rgt = mesh->GetRotation().GetZAxis(); ! //up = mesh->GetRotation().GetYAxis(); ! fwd = mesh->GetRotation().Rotate(Vector3::UNIT_X); ! rgt = mesh->GetRotation().Rotate(Vector3::UNIT_Z); ! up = mesh->GetRotation().Rotate(Vector3::UNIT_Y); fwd *= 10; rgt *= 10; --- 1070,1079 ---- Vector3 fwd, rgt, up; //mesh->GetRotation().ToAngleVectors(fwd, rgt, up); ! fwd = mesh->GetRotation().GetXAxis(); ! rgt = mesh->GetRotation().GetZAxis(); ! up = mesh->GetRotation().GetYAxis(); ! //fwd = mesh->GetRotation().Rotate(Vector3::UNIT_X); ! //rgt = mesh->GetRotation().Rotate(Vector3::UNIT_Z); ! //up = mesh->GetRotation().Rotate(Vector3::UNIT_Y); fwd *= 10; rgt *= 10; *************** *** 1095,1099 **** } #endif ! _RotateNode(mesh); --- 1095,1100 ---- } #endif ! //les axes sont inverses dans les trucs ID ! glRotatef(-90, 1, 0, 0); _RotateNode(mesh); *************** *** 1872,1876 **** glEnd (); ! glPushMatrix(); Vector3 vb = b->vWorldOrigin + b->vBSCenter; --- 1873,1877 ---- glEnd (); ! //BSphere glPushMatrix(); Vector3 vb = b->vWorldOrigin + b->vBSCenter; Index: boundingbox.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/boundingbox.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** boundingbox.cc 9 Nov 2004 18:19:04 -0000 1.4 --- boundingbox.cc 10 Nov 2004 21:02:04 -0000 1.5 *************** *** 122,129 **** bool BoundingBox::TraceSphereRay (Vector3 begin, Vector3 end, Vector3& colPoint) ! { ! ! //calcul de l'intersection ! Vector3 D = end.Normalize(); Vector3 EO = (vWorldOrigin+vBSCenter) - begin; float v = EO*D; --- 122,127 ---- bool BoundingBox::TraceSphereRay (Vector3 begin, Vector3 end, Vector3& colPoint) ! { ! Vector3 D = (end-begin).Normalize(); Vector3 EO = (vWorldOrigin+vBSCenter) - begin; float v = EO*D; |