kungfoomasta
04-11-2006 18:23:24
I'm trying to allow users to scale the terrain, but the set/get options don't match up.
To query for the terrain scale, I call:
But there is no setOption("Scale",...);
Instead, there is a "WorldDimension" option, but this takes a Vector2 object:
Can we make a setOption("Scale",...) option to match getOption("Scale",...), and make this function able to modify all 3 dimensions independantly? (WorldDimension only accepts a height and width, which I guess re-uses width for depth). Make sure this function calls the correct function to update the terrain dimensions, I guess this is "WorldDimensionChange(...)".
KungFooMasta
Also, setOption("Width",...) and setOption("Height",...) take unsigned int values.. shouldn't this be unsigned Real values?
To query for the terrain scale, I call:
// populate mTerainScale with original terrain dimensions
mSceneManager->getOption("Scale",&(mTerrainScale));
But there is no setOption("Scale",...);
Instead, there is a "WorldDimension" option, but this takes a Vector2 object:
if (strKey == "WorldDimension")
{
Vector2 dim = * static_cast < const Vector2 * > (pValue);
world_height = static_cast < unsigned int > (dim.x);
world_width = static_cast < unsigned int > (dim.y);
#ifndef _MAPSPLITTER
#ifndef _MAPEDITOR
assert (primaryCamera);
static_cast <PagingLandScapeSceneManager *> (primaryCamera->getSceneManager())->WorldDimensionChange();
#endif //_MAPEDITOR
#endif //_MAPSPLITTER
return true;
}
Can we make a setOption("Scale",...) option to match getOption("Scale",...), and make this function able to modify all 3 dimensions independantly? (WorldDimension only accepts a height and width, which I guess re-uses width for depth). Make sure this function calls the correct function to update the terrain dimensions, I guess this is "WorldDimensionChange(...)".
KungFooMasta
Also, setOption("Width",...) and setOption("Height",...) take unsigned int values.. shouldn't this be unsigned Real values?