Page 1 of 1

Deriving a class from ISceneNode

Posted: Mon Sep 17, 2007 9:41 am
by kin
Hi all!
I'm trying to create in C# my own scene node, as in the not-.NET example 03 (CustomSceneNode).
The C++ example is this:

Code: Select all

class CSampleSceneNode : public scene::ISceneNode
{

/* .. */

public:
	CSampleSceneNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id)
		: scene::ISceneNode(parent, mgr, id)

/* .. */

}
In C#, I'd like to do this:

Code: Select all

public class CSampleSceneNode : ISceneNode
{

/* .. */

public CSampleSceneNode(ISceneNode parent) : base(parent)

/* .. */

}
But I get a compile error because the ISceneNode class has only this constructor:

Code: Select all

public ISceneNode(irr.scene.ISceneNode* realSceneNode);
and I can't use a pointer in C#.
How can I derive such a class?

Posted: Mon Sep 17, 2007 1:12 pm
by lester
you can use IrrlichtNET CP instead, the ISceneNode class is pretty usable in there.

Posted: Mon Sep 17, 2007 1:30 pm
by bull

Posted: Mon Sep 17, 2007 2:59 pm
by kin
IrrilchtNET CP works fine.
Thanks.