How to modify trees?


11-04-2008 12:29:28

Hello, at first i must say, that i am wery happy that there is paged geometry for Ogre. I am now trying to include it in my projet in Mogre/c#, so i am making a wrapper for it. I want to make editor for the trees too, but i have problem to find some nice way to modify existing trees. The best way i found so far is to delete modified tree and add it back with new parameters.

Is there some way to modify the parameters of trees and then call the PagedGeometry.reloadGeometry()? I can find the tree with TreeIterator, but it has only get methods...


11-04-2008 18:33:51

The TreeLoader2D and TreeLoader3D classes don't allow trees to be modified (repositioned, etc.), so deleting and re-adding is the correct way to do it. You could technically add modification functions, but due to the way PagedGeometry works, deleting and re-adding is just as fast, if not faster.

Jules Robichaud Gagnon

07-06-2008 16:05:55

The overhead is to reload the whole batch to see the changes and not necessarily add, delete or modify.

If you plan to make a tool to pick up a tree in the page, move it around and place it somewhere, you rather delete it in the batch, move it around as a regular entity and the add it again in the batch geometry when you decided where to put it. Otherwise the performances will drop dramatically since it will recreate the batches every frame.