Advertisement

Bullet Physics - Two Question about btHeightfieldTerrainShape

Started by June 30, 2021 09:02 AM
1 comment, last by cgrant 3 years, 7 months ago

first, I've searched about btHeightfieldTerrainShape, and then i realized that constructor doesn't need any normal data. is it compute normal itself by terrain height - index data?

second, is there any kind of form about parameter void* heightfieldData? I know that must be heightDataType - array, but there must be x - z coordinates or something, but only it gets are just array. is there any formula for this?

No experience with Bullet, but I've use Nvidia's PhysX and they too have a height field shape. Don't know if you are over-complicating the issue, but in PhysX and even if one was to write some form of height field shape, all that would be required is some quantized form of the height field/elevation data. The height field is just a array of height/elevation values arranged on a grid, with a certain grid post/spacing…Ex 10 m between each sample in the height field in say the x-z plane.

This topic is closed to new replies.

Advertisement