mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 21:28:54 +02:00
construct Bullet shapes for new shape types
This commit is contained in:
parent
33d732c446
commit
97fc5ac3b8
1 changed files with 4 additions and 2 deletions
|
@ -204,7 +204,7 @@ btTriangleIndexVertexArray* createStaticMeshArray(const ShapeInfo& info) {
|
||||||
if (numIndices < INT16_MAX) {
|
if (numIndices < INT16_MAX) {
|
||||||
int16_t* indices = static_cast<int16_t*>((void*)(mesh.m_triangleIndexBase));
|
int16_t* indices = static_cast<int16_t*>((void*)(mesh.m_triangleIndexBase));
|
||||||
for (int32_t i = 0; i < numIndices; ++i) {
|
for (int32_t i = 0; i < numIndices; ++i) {
|
||||||
indices[i] = triangleIndices[i];
|
indices[i] = (int16_t)triangleIndices[i];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int32_t* indices = static_cast<int32_t*>((void*)(mesh.m_triangleIndexBase));
|
int32_t* indices = static_cast<int32_t*>((void*)(mesh.m_triangleIndexBase));
|
||||||
|
@ -257,7 +257,9 @@ btCollisionShape* ShapeFactory::createShapeFromInfo(const ShapeInfo& info) {
|
||||||
shape = new btCapsuleShape(radius, height);
|
shape = new btCapsuleShape(radius, height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SHAPE_TYPE_COMPOUND: {
|
case SHAPE_TYPE_COMPOUND:
|
||||||
|
case SHAPE_TYPE_SIMPLE_HULL:
|
||||||
|
case SHAPE_TYPE_SIMPLE_COMPOUND: {
|
||||||
const ShapeInfo::PointCollection& pointCollection = info.getPointCollection();
|
const ShapeInfo::PointCollection& pointCollection = info.getPointCollection();
|
||||||
uint32_t numSubShapes = info.getNumSubShapes();
|
uint32_t numSubShapes = info.getNumSubShapes();
|
||||||
if (numSubShapes == 1) {
|
if (numSubShapes == 1) {
|
||||||
|
|
Loading…
Reference in a new issue