How to load a terrainSceneNode from a function

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
CondeNostaw
Posts: 20
Joined: Sun Jan 04, 2009 2:47 pm
Location: Brazil

How to load a terrainSceneNode from a function

Post by CondeNostaw »

Is there any way to load a TerrainSceneNode in a procedural way? Like retrieving the heightmap from a function or an array, instead of an image file?

I have found this function
http://irrlicht.sourceforge.net/docu/cl ... 9fe795f062

but don't understand how to use it.
Obey.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, yeah, you could implement an IReadFile returning your calculated values upon read(). The terrain node reads one "pixel" per read
CondeNostaw
Posts: 20
Joined: Sun Jan 04, 2009 2:47 pm
Location: Brazil

Post by CondeNostaw »

Nice. Will the mesh read it once or every tick?
Obey.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Once.
Post Reply