StaticGeometry problems


31-05-2007 07:41:06

I have just switched from Axiom to MOGRE because Axiom doesn't yet support static geometry. I am trying to implement something similar to the code in the OGRE Grass Demo, and whilst attempting to port sections of that code to MOGRE I get a compilation error.

StaticGeometry.MaterialBucket.GeometryIterator geomit = mat.GetGeometryIterator();

error CS0426: The type name 'GeometryIterator' does not exist in the type 'Mogre.StaticGeometry.MaterialBucket'

Does anyone have any ideas?


19-07-2007 12:25:48

I guess no one has had any thoughts???


20-07-2007 15:42:30

Really strange...

Here I dont even have the GetGeometryIterator() method. Must be something in the Mogre build configuration. From what I know, there is no reason for this call and iterator to be missing. Also the GeometryBucket class is missing pretty much everything.

I've been using Mogre for 6 month, doing all kinds of strange stuff, and this is the first time I come across a missing call. I guess you are unlucky.

There is definatly something wrong with the whole static geometry thing. We need a bug tracking system now!



26-07-2007 12:27:15

Glad it's not just me.

Thanks for taking the time to look.


26-07-2007 16:40:04

I search in the Mogre.dll 0.2.2 and I can´t find GeometryIterator class. I think is not implemented in Mogre.

Maybe some maintainer can add it for the next release . :)


26-07-2007 20:16:37


But the problem is that we dont have a bug list or something. Can one of the admins enable the bug tracking on sourceforge ?

Otherwise this problem will never get solved if we dont keep track of it.



28-07-2007 07:29:34

As far as I can see the bugtracker on sourceforge is enabled.

I don't really have much experience using the SF bugtracker, so feel free to suggest any settings or stuff to improve it.



05-02-2008 15:57:35

Is there any news on why this is missing? Cause apparently it still is.


19-08-2008 16:58:36

Before i start re-writing my code... does StaticGeometry work in Mogre?


19-08-2008 17:15:32

Yes it does. :)

Some code:

StaticGeometry sg = sceneManager.CreateStaticGeometry("level");
sg.RegionDimensions = new Vector3(100, 100, 100);

Entity entity = sceneManager.CreateEntity("static_level_entity", "level.mesh");
sg.AddEntity(entity, Vector3.ZERO, Quaternion.IDENTITY, Vector3.UNIT_SCALE);



19-08-2008 17:27:29

That's great thanks for the quick response! With example code!! Bonus!

Couple of quick questions:

Do you need to add the static geometry to a scene node?

Can you have multiple static geometry objects at the same time? Or do you add all the entities to the same object?


19-08-2008 18:03:07

Do you need to add the static geometry to a scene node?
No, but you can pass position, orientation and scale when you add the entity to the StaticGeometry

Can you have multiple static geometry objects at the same time? Or do you add all the entities to the same object?
You can do both, AFAIK. So far I've always added all entities into one StaticGeometry object, which is probably a bit more efficient.

You can destroy the entity after adding it to the StaticGeometry BTW.


19-08-2008 18:25:49

Also pay attention to and mess with the regionDimensions. It breaks up the static geometry into zones that are culled and occluded separately. Using that along with draw distance well can often eliminate the need to break up the static geometry.