Code: Select all
int main( void ){
HillTerrain terrain(); // you can also specify terrain params here
terrain.Generate();
for( int x = 0; x < terrain.GetSize(); ++x ){
for( int y = 0; y < terrain.GetSize(); ++y ){
float z = terrain.GetCell( x, y );
// do whatever with the z values here to draw your terrain
}
}
return 0;
}I understand the error, but I'm confused as to why I'm getting it. "HillTerrain" is a class and terrain is a declared variable otherwise, I'd be getting "terrain is undeclared identifier", which I'm not.
Ideas??