How do I derive and then initializate an abstract class?
I have this header file
Code: Select all
//classCTrack.h
class CTrack
{
public:
CTrack();
virtual ~CTrack();
void set_Track(stringc trackName,ISceneManager* levelMgr,IPhysicsManager* plevelMgr);
private:
IPhysicsNode* ptrackNode; //want to derive and initialize IPhyscsNode that is abstract, but how?
stringc meshName;
};
#endif
Code: Select all
//classCTrack.cpp
CTrack::CTrack()
{
meshName=NULL;
}
CTrack::~CTrack()
{
}
void CTrack::set_Track(stringc trackName,ISceneManager* levelMgr,IPhysicsManager* plevelMgr)
{
meshName=(trackName+".ms3d");
levelMgr->addMeshSceneNode(levelMgr->getMesh(meshName.c_str()),0,1);
ptrackNode = plevelMgr->addPhysicsLevelNode(levelMgr->getSceneNodeFromId(1,0),levelMgr->getMesh(meshName.c_str()));
//here the ptrackNode does not receive any value (the msvc debugger tells me that), since its abstract, I think.
}
I'd tried to search but I think that my question is the noobiest ever and the various topics subject names are too much generic like "help", "question", "problem here", "???"...