export btHeightfieldTerrainShape to PyBullet. Note that tinyrenderer doesn't support rendering it (it would be too slow on CPU)
fix rare getKeyboardEvents threading issue change texture color to default plane.urdf blue
This commit is contained in:
@@ -15,6 +15,7 @@ subject to the following restrictions:
|
||||
|
||||
#include "btWorldImporter.h"
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
#include "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h"
|
||||
#ifdef USE_GIMPACT
|
||||
#include "BulletCollision/Gimpact/btGImpactShape.h"
|
||||
#endif
|
||||
@@ -1784,6 +1785,19 @@ btMultiSphereShape* btWorldImporter::createMultiSphereShape(const btVector3* pos
|
||||
return shape;
|
||||
}
|
||||
|
||||
class btHeightfieldTerrainShape* btWorldImporter::createHeightfieldShape(int heightStickWidth, int heightStickLength,
|
||||
const void* heightfieldData, btScalar heightScale,
|
||||
btScalar minHeight, btScalar maxHeight,
|
||||
int upAxis, int heightDataType,
|
||||
bool flipQuadEdges)
|
||||
{
|
||||
|
||||
btHeightfieldTerrainShape* shape = new btHeightfieldTerrainShape(heightStickWidth, heightStickLength,
|
||||
heightfieldData, heightScale, minHeight, maxHeight, upAxis, PHY_ScalarType(heightDataType), flipQuadEdges);
|
||||
m_allocatedCollisionShapes.push_back(shape);
|
||||
return shape;
|
||||
}
|
||||
|
||||
btRigidBody& btWorldImporter::getFixedBody()
|
||||
{
|
||||
static btRigidBody s_fixed(0, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user