coll2d: added bounding spheres to all Shapes

This commit is contained in:
martin
2011-02-01 16:13:06 +01:00
parent dd9f2773f5
commit 95e709ce3f
2 changed files with 38 additions and 6 deletions
+5 -2
View File
@@ -23,6 +23,9 @@ TEST ( SphereCopyConstructer ) {
velocity_b = sphere_b.getVelocity ();
CHECK (velocity_a != velocity_b );
CHECK_EQUAL (123., sphere_a.getBoundingRadius());
CHECK_EQUAL (123., sphere_b.getBoundingRadius());
}
TEST ( PolygonCopyConstructer ) {
@@ -47,6 +50,8 @@ TEST ( PolygonCopyConstructer ) {
CHECK (vertice1 == polygon_b.getVertice (1));
CHECK (vertice2 == polygon_b.getVertice (2));
CHECK_CLOSE (sqrt (2.), polygon_a.getBoundingRadius(), 1.0e-7);
polygon_b.setVelocity (vector3d (0., 0., 0.));
velocity_a = polygon_a.getVelocity ();
velocity_b = polygon_b.getVelocity ();
@@ -280,5 +285,3 @@ TEST ( SphereSetGetRadius ) {
sphere.setRadius (456.);
CHECK_EQUAL (456, sphere.getRadius());
}