我很难理解如何使用JBullet物理库中的
HeightfieldTerrainShape
。看起来有2个可用的构造函数:
public HeightfieldTerrainShape(int heightStickWidth, int heightStickLength, byte[] heightfieldData,
float heightScale, float minHeight, float maxHeight, int upAxis, PHY_ScalarType heightDataType,
boolean flipQuadEdges)
并且
public HeightfieldTerrainShape(int heightStickWidth, int heightStickLength, byte[] heightfieldData,
float maxHeight, int upAxis, boolean useFloatData, boolean flipQuadEdges)
heightScale
、minHeight
、maxHeight
和upAxis
都很明显,但是什么是“heightStick”?我该如何确定它的宽度和长度?heightfieldData
期望的格式是什么?我假设这只是一个浮点数的字节缓冲区?