Пример #1
0
void ShapeManagerTests::addCylinderShape() {
    ShapeInfo info;
    float radius = 1.23f;
    float height = 4.56f;
    info.setCylinder(radius, height);

    ShapeManager shapeManager;
    btCollisionShape* shape = shapeManager.getShape(info);

    ShapeInfo otherInfo;
    ShapeInfoUtil::collectInfoFromShape(shape, otherInfo);

    btCollisionShape* otherShape = shapeManager.getShape(otherInfo);
    if (shape != otherShape) {
        std::cout << __FILE__ << ":" << __LINE__
            << " ERROR: Cylinder ShapeInfo --> shape --> ShapeInfo --> shape did not work" << std::endl;
    }
}