Code: Select all
//======================================================================
//Main.cpp
//======================================================================
CMngr = new CreationManager();
scene::ISceneNode* myNode = Smgr->addCubeSceneNode(1);
CMyCustomClass* myCustomNode = CMngr->createCustNode(myNode);
//======================================================================
//CMyCustomClass.h
//======================================================================
class CMyCustomClass
{
public:
CMyCustomClass(scene::ISceneNode* node);
~CMyCustomClass();
void update();
private:
scene::ISceneNode* irr_Node;
};
//======================================================================
//CreationManager.cpp
//======================================================================
CMyCustomClass* CreationManager:: createCustNode(scene::ISceneNode* node)
{
CMyCustomClass* cn = new CMyCustomClass(node);
return cn;
}
//=====================================================================================================
which should be done either from within the "update();" from the CMyCustomClass ot from the CreationManager class- doesn`t really matter.
Should I create a function (in my CMyCustomClass) like: "removeCustNode();" and later call "myCustomNode->removeCustNode();" and what will it contain?
I spend some time searching the forum and found that code:
Code: Select all
if (node)
{
//Smgr->addToDeletionQueue(node);
//node->drop();
node->remove();
node = NULL;
}
Thanks in advance.