Deriving a class from ISceneNode
Posted: Mon Sep 17, 2007 9:41 am
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:
In C#, I'd like to do this:
But I get a compile error because the ISceneNode class has only this constructor:
and I can't use a pointer in C#.
How can I derive such a class?
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)
/* .. */
}
Code: Select all
public class CSampleSceneNode : ISceneNode
{
/* .. */
public CSampleSceneNode(ISceneNode parent) : base(parent)
/* .. */
}
Code: Select all
public ISceneNode(irr.scene.ISceneNode* realSceneNode);
How can I derive such a class?