maxwave
08-04-2006 11:31:54
I load terrain in my app. How I can get events from PLSM2, such as loadTile, loadPage, unload....showPage, hidePage .....etc? Which code I should use for it in my app? (I use ExampleFramework).
Communication with the PLSM2 is done via SceneManager::setOption, i.e.:mSceneManager->setOption("CurrentMap", &mTerrainMapName);
or
mSceneManager->setOption("addLoadTileListener", loadTerrainFunc);
Look in the PLSM2 Scene Manager and Options classes for a more complete list of functionality.
maxwave
09-04-2006 17:30:04
I want use OgreNewt with PLSM. Why when I use line
PagingLandScapePage* page=PagingLandScapePageManager::getSingleton().getPage(pageX, pageZ);
I get error, that getSingleton is not exist
(error C2039: 'getSingleton' : is not a member of 'Ogre::PagingLandScapePageManager'
)
OvermindDL1
10-04-2006 02:13:39
That is because it is not a singleton. It was in the old version, but changes to the Ogre SM setup demands that it is not since you could have multiple PLSM2 Scene's (or any others) running at the same time.
Seraph
10-04-2006 03:13:58
maxwave
10-04-2006 11:25:50
2Seraph
this line from this wiki, which is not correct because PLSM2 was changed. What I should to fix this problem?
tuan kuranes
10-04-2006 12:20:19
Does tile scenenode is absolutely necessary to newton ?
The line from wiki that does uses it seems the only reason fo trying to have access to page and tile object.
body->attachToNode(tile->getSceneNode());
Try wihtout this line and remove all tile and page object ptr in you code to test.
If it absolutely needed and cannot be faked with another scenenode at exact same place, then I'll find a way to modify PLSM2 so that you'll have access to it.
But as Tile is an "non-moveable", I really doubt the usefullness of having access to the real scenenode of tiles.
maxwave
10-04-2006 13:51:12
I don't understand, how I can use newton without tiles. How I can get geometry of tile without using it??? Or may be add getSingleton() code to source of PLSM and realize this function, or it would be not correct? Clearly one - wiki article must will be remaked.
tuan kuranes
10-04-2006 14:16:41
Check new page and correct/notifiy here if something wrong, but you'll get the Idea.