Paging Landscape Scene Manager binding?

Srekel

16-07-2006 16:35:58

I'm asking this here because I guess if anyone has bound PLSM, it's probably someone here. :)

So.. has anyone tried this? I think Clay did it a year ago or something, but I don't know if his work is available somewhere, or if it even still works.

I'm interested in trying myself, but I don't really know how. Since it's a plugin, does that add any further complications? The particle system is actually a plugin too, right?

dermont

20-07-2006 19:20:04

There are no bindings for PLSM though the Plugin_PagingLandScapeSceneManager2 should work as is by simply adding it to plugings.cfg. Though I'm guessing you want you want to be access the additional setOption/getOption methods for PLSM.

The way I did this for DotSceneOctree was based on rastaman's dotnet dotsceneoctree implementation.

1) created a proxy class DotSceneOctreeHelper which accepted an instance of a scenemanager and wrapped the DotSceneOctree setOption/getOptions, e.g.

class DotSceneOctreeHelper
{
public:
DotSceneOctreeHelper(SceneManager *ScnMgr)
{
mSceneMgr=ScnMgr;
}
virtual ~DotSceneOctreeHelper() {}
..

virtual void setOctreeVisible( bool Visible )
{
if (mSceneMgr==0)
return;
mSceneMgr->setOption("OctreeVisible", &Visible);
}
...



2) created a new pyDotSceneOctree project with an interface file for dotsceneoctree.i with swig wrapper for DotSceneOctreeHelper.h and imported the necessary definitions from pyogre.

3) Running:

import pyogre.dotsceneoctree as dotsceneoctree
self.sceneManager = self.root.createSceneManager("DotSceneOctreeManager")
self.dotSceneManager = dotsceneoctree.DotSceneOctreeHelper(self.sceneManager)

self.dotSceneManager.setOctreeVisible(True)
etc..


I could have just added the dotsceneoctree.i to the current pyogre bindings but I thought it was cleaner this way, though I encountered quite a few problems with the import statements.

If you're trying to wrap the whole of the plugin then I think you may have to look at creating your own plugin loading mechanism.

I'll send you a copy of my DotSceneOctree project files if you want them. I've not released them since there's still a couple things need tidying up.

Edit: this was also in reply to an additional post after Srekels which appears to have been deleted.

viblo2

21-07-2006 18:20:39

Ah, sorry about the deleted post. :) I wrote the post but shortly afterwards got a sudden flash of insight (use setOption and so on) after looking at what the plsm2-dll exported, and since the post only had been posted a short time (and there usually isn't very quick responses here) thought I could delete it and instead write a new one after I had tried the correct way.

Anyway, thanks for your explanation, hadnt thought about a Helper-class before.

dermont

21-07-2006 21:09:04

No worries :lol: . Didn't check the time of your post. As you point out the responses times here are dire.