Deriving a class from ISceneNode

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
kin
Posts: 2
Joined: Mon Sep 17, 2007 9:15 am

Deriving a class from ISceneNode

Post 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?
lester
Posts: 86
Joined: Mon Jan 29, 2007 3:33 pm

Post by lester »

you can use IrrlichtNET CP instead, the ISceneNode class is pretty usable in there.
bull
Posts: 36
Joined: Wed Sep 12, 2007 8:49 am
Location: s1Ng4p0R3

Post by bull »

kin
Posts: 2
Joined: Mon Sep 17, 2007 9:15 am

Post by kin »

IrrilchtNET CP works fine.
Thanks.
Locked