Octree SceneManager SetOption: how to set SIZE (AABB)

cyanity

29-09-2009 00:33:44

How do i pass a AABB into SceneManager.SetOption? Specifically, the 'default' octree has that miniscule "20k" max size, and I need it larger (especially since raytest still returns a bogus 'null' for all objects outside that initial 20k distance).

In Ogre, you would call SceneManager.SetOption("Size", (void*)aaBox);//aaBox is a AxisAlignedBox;

In Mogre, for setting "ShowOctree", its works to do:
String key = "ShowOctree";
bool value = true;
Boolean bStatus = false;
GCHandle gchValue = GCHandle.Alloc( value );// gchValue: Alloc/Free
bStatus = m_SceneMgr.SetOption( key, (void*)GCHandle.ToIntPtr( gchValue ) );
gchValue.Free();// gchValue: Alloc/Free

But when I try to do similar for passing an AABox:
String key = "Size";
float dim = 200000;
AxisAlignedBox value= new AxisAlignedBox( -dim, -dim, -dim, dim, dim, dim );
Boolean bStatus = false;
GCHandle gchValue = GCHandle.Alloc( value);// gchValue : Alloc/Free
bStatus = m_SceneMgr.SetOption( key, (void*)GCHandle.ToIntPtr( gchValue ) );
gchValue .Free();// gchValue : Alloc/Free

Ogre gets all upset that the AABox is 'xmin>xmax' or some such. So apparently I'm passing the wrong pointer/ using the wrong structure/wrapper.

So, what's the proper Mogre way of passing a new AABB into SceneManager.SetOption?

thanks.