Plsm2 and TSM have their own listeners but they need explicit lib linking to make it work, as generic scene manager does'nt have one.
Perhaps we should have a generic listener implementation.
I don't know exactly how to achieve this properly... (all that I can think of results in a big ugly switch in a generic event listening in sm and client side...)
Generic Scene Manager Listener System
- tuan kuranes
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
- Contact:
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
-
- Halfling
- Posts: 81
- Joined: Sat Mar 29, 2003 7:29 pm
- Location: Florida, USA
- Contact:
Hmm, I want to look into this. The current solution forces me to put the lib files in the /usr/local/lib directory and then create a symlink in the plugins folder since it is run as a plugin. Does this sound like the correct solution? Alternatively I could add the /usr/local/lib/OGRE directory to the path, though I don't like that any better. Maybe there is something that can be done on the paging landscape side to make this solution better, guess I'll have to get familiar with the code...
- :wumpus:
- OGRE Retired Team Member
- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1
I suggest adding a virtual function to the LandscapeSceneManager class, which returns a pure virtual interface you can use for "landscape specific" things like registering listeners.lgoss007 wrote:Hmm, I want to look into this. The current solution forces me to put the lib files in the /usr/local/lib directory and then create a symlink in the plugins folder since it is run as a plugin. Does this sound like the correct solution? Alternatively I could add the /usr/local/lib/OGRE directory to the path, though I don't like that any better. Maybe there is something that can be done on the paging landscape side to make this solution better, guess I'll have to get familiar with the code...
This still needs a static cast, but is most portable and prevents linking against any plugins directly.
ie,
Code: Select all
ApplicationInterface *ai = static_cast<LandscapeSceneManager*>(mSceneMgr)->getApplicationInterface();
ai->registerLandscapeListener(myfunnyclass);
ai->setSomeParameter(42);
Vector3 *loc = ai->getInitialSpawnPoint("evilrobot");
...
- tuan kuranes
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
- Contact:
-
- Halfling
- Posts: 81
- Joined: Sat Mar 29, 2003 7:29 pm
- Location: Florida, USA
- Contact: