coll2d: added bounding spheres to all Shapes
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user