Beginner question about heightfield

karnalta

24-09-2009 13:15:05

Hello,

This is probably a "stupid" question but I really can't figure it out ...

I am trying to use a heightfield in a simple NxOgre sample, I am referring to this code to do it. A note say "terrain is a pointer to the istance of Ogre::Terrain" but what is Ogre::Terrain ?? I am looking in the Ogre API since 2 hours now, and I can't find any namespace called so, I can't even find any class containing method like getHeightData() or so.

So what is exactly the terrain variable in this sample ??

Thank in advance for help.

Illidanz

24-09-2009 13:28:08

As it's stated in the beginning of that wiki page the code is meant to work with the new Terrain component that comes with Ogre 1.7 (Cthuga).

You can't use it with the old "setWorldGeometry" terrain.

If you're using the old terrain see this thread: viewtopic.php?f=6&t=10524

karnalta

24-09-2009 13:49:23

Hmm yes, you are right I didn't noticed that the actual Ogre version is 1.6.3 ...

Sorry, so I suppose I have to do it with Flour to convert *.raw to *.hxf at the moment if I want to create heightfield ?

betajaen

24-09-2009 13:54:25

Yep.