Dibalo
29-11-2006 19:40:05
Hi Folks!
I have tried to play with PLSM2 about two weeks now. My opinion is that this is a wonderful and powerful plugin. Now I´m searching for change to attach some static geometry objects (trees, houses...) to maps. I have understood that PSML uses a few different methods to optimize the map rendering. These methods are (found from demo app):
- Terrain Ready
- pagePreloaded
- pageLoaded
- pageUnloaded
- pagePostunloaded
- PageDeformed
- pageShow
- pageHide
- tileLoaded
- tileUnloaded
- tileDeformed
- tileShow
- tileHide
I have also undestood that I can do some things I want, triggered by those methods (for ex. mySceneMgr->setOption( "addTerrainListener", myFunction ); . The problem is, that I have no clue, what those methods will do and when the renderer calls them. That´s why I´d be very happy, if you could explain more about those methods.
My goal is that my "object renderer" splits the object-areas into the tiles (equals to the terrain tiles), and shows or hides them at the same time as the PLSM. Because I´d like to save performance, I´m planning to preload all object-including-tiles to the memory when map is loaded. When map is deleted, the object-tiles will be deleted too. So: which method I have to use to trigger my own object-loading function? And which to trigger my deleting function? Object hiding? Showing?
I have also an additional question. If I know the point from the world (for ex. (2143, 0, -535)), how could I get to know what are the page numbers and the tile numbers, where that point lies?
I have tried to play with PLSM2 about two weeks now. My opinion is that this is a wonderful and powerful plugin. Now I´m searching for change to attach some static geometry objects (trees, houses...) to maps. I have understood that PSML uses a few different methods to optimize the map rendering. These methods are (found from demo app):
- Terrain Ready
- pagePreloaded
- pageLoaded
- pageUnloaded
- pagePostunloaded
- PageDeformed
- pageShow
- pageHide
- tileLoaded
- tileUnloaded
- tileDeformed
- tileShow
- tileHide
I have also undestood that I can do some things I want, triggered by those methods (for ex. mySceneMgr->setOption( "addTerrainListener", myFunction ); . The problem is, that I have no clue, what those methods will do and when the renderer calls them. That´s why I´d be very happy, if you could explain more about those methods.
My goal is that my "object renderer" splits the object-areas into the tiles (equals to the terrain tiles), and shows or hides them at the same time as the PLSM. Because I´d like to save performance, I´m planning to preload all object-including-tiles to the memory when map is loaded. When map is deleted, the object-tiles will be deleted too. So: which method I have to use to trigger my own object-loading function? And which to trigger my deleting function? Object hiding? Showing?
I have also an additional question. If I know the point from the world (for ex. (2143, 0, -535)), how could I get to know what are the page numbers and the tile numbers, where that point lies?