HeightfieldTerrainShape
我正在努力从 JBullet 物理库中找出如何使用。如我所见,有 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 的预期格式是什么?我假设这只是浮点数的字节缓冲区?