Loading Raw Terrain Heightmap Data manually

P51D_Ace

24-09-2008 06:25:43

I currently have heightmap raw files that have meta data headers in them. I open the file and parse out the header and read the height map data into memory. The heightmap data is 32-bit floating point.
Is there a way to give this heightmap data that I loaded into memory to the SceneManager directly without having to use the setWorldGeometry method?

For example some psudo code would be:

for(int i; i<nRows; i++)
{
for(int j; j<nCols; j++)
{
float height = data[j + i*nCols];
mSceneMgr->SetHeight(i,j, height);
}
}


The only other way I can do this is if I write my own plugin, which I have started to do, but would like to use the paging scene manager instead.

Any thoughts?