minor update manual
fix vehicle demo (heightfield is broken, when using very large scaling factor) add btConeShape serialization, see Issue 725 add btGearConstraint get/set, see Issue 685 and Issue 671
This commit is contained in:
@@ -199,6 +199,7 @@ btCollisionShape* btWorldImporter::convertCollisionShape( btCollisionShapeData*
|
||||
}
|
||||
|
||||
case CYLINDER_SHAPE_PROXYTYPE:
|
||||
case CONE_SHAPE_PROXYTYPE:
|
||||
case CAPSULE_SHAPE_PROXYTYPE:
|
||||
case BOX_SHAPE_PROXYTYPE:
|
||||
case SPHERE_SHAPE_PROXYTYPE:
|
||||
@@ -286,6 +287,38 @@ btCollisionShape* btWorldImporter::convertCollisionShape( btCollisionShapeData*
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case CONE_SHAPE_PROXYTYPE:
|
||||
{
|
||||
btConeShapeData* conData = (btConeShapeData*) shapeData;
|
||||
btVector3 halfExtents = implicitShapeDimensions;//+margin;
|
||||
switch (conData->m_upIndex)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
shape = createConeShapeX(halfExtents.getY(),halfExtents.getX());
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
shape = createConeShapeY(halfExtents.getX(),halfExtents.getY());
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
shape = createConeShapeZ(halfExtents.getX(),halfExtents.getZ());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
printf("unknown Cone up axis\n");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case MULTI_SPHERE_SHAPE_PROXYTYPE:
|
||||
@@ -1077,6 +1110,27 @@ btCollisionShape* btWorldImporter::createCylinderShapeZ(btScalar radius,btScalar
|
||||
return shape;
|
||||
}
|
||||
|
||||
btCollisionShape* btWorldImporter::createConeShapeX(btScalar radius,btScalar height)
|
||||
{
|
||||
btConeShapeX* shape = new btConeShapeX(radius,height);
|
||||
m_allocatedCollisionShapes.push_back(shape);
|
||||
return shape;
|
||||
}
|
||||
|
||||
btCollisionShape* btWorldImporter::createConeShapeY(btScalar radius,btScalar height)
|
||||
{
|
||||
btConeShape* shape = new btConeShape(radius,height);
|
||||
m_allocatedCollisionShapes.push_back(shape);
|
||||
return shape;
|
||||
}
|
||||
|
||||
btCollisionShape* btWorldImporter::createConeShapeZ(btScalar radius,btScalar height)
|
||||
{
|
||||
btConeShapeZ* shape = new btConeShapeZ(radius,height);
|
||||
m_allocatedCollisionShapes.push_back(shape);
|
||||
return shape;
|
||||
}
|
||||
|
||||
btTriangleIndexVertexArray* btWorldImporter::createTriangleMeshContainer()
|
||||
{
|
||||
btTriangleIndexVertexArray* in = new btTriangleIndexVertexArray();
|
||||
|
||||
Reference in New Issue
Block a user