I'm struggling to find out how to use HeightfieldTerrainShape
from JBullet physics library. As I can see, there are 2 constructors available:
public HeightfieldTerrainShape(int heightStickWidth, int heightStickLength, byte[] heightfieldData,
float heightScale, float minHeight, float maxHeight, int upAxis, PHY_ScalarType heightDataType,
boolean flipQuadEdges)
and
public HeightfieldTerrainShape(int heightStickWidth, int heightStickLength, byte[] heightfieldData,
float maxHeight, int upAxis, boolean useFloatData, boolean flipQuadEdges)
heightScale
, minHeight
, maxHeight
and upAxis
are self explainatory. But what exactly is a "heightStick" ? And how do I determine it's width and length? What format is expected for heightfieldData? Im asuming this is just a byte buffer of floats?