CCameraSceneNode Inheretence

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
ceisnaugle

CCameraSceneNode Inheretence

Post by ceisnaugle »

I decided to start fooling around with this some more and maybe beign sick is making me not thin properly but for some reason every time I try

using namespace irr;

class ccamera : public scene::CCameraSceneNode
{

.. standard constructor etc ..

};

All this is fine and the constructor passes appropraite info to the CCameraSceneNode constructer ala

CCamera::CCamera(scene::ISceneNode* parent, scene::ISceneManager*mgr, s32 id) : CameraSceneNode(parent, mgr, id)
{

}

this all seems fine, but when it gets to the link process I get a ton of LNK2001 unresolved external errors complaining about a ton of functions like OnEvent, OnPostRender and on and on (basically all the methods in CCameraSceneNode it seems. Im either just missing something or didnt set things up properly (namespaces im not as familiar with as I would like to be).

Any ideas why this is going on?

Chris
rt
Posts: 150
Joined: Sun Nov 30, 2003 6:54 am
Location: canada
Contact:

Re: CCameraSceneNode Inheretence

Post by rt »

ceisnaugle wrote: Any ideas why this is going on?
copy CCameraSceneNode.h and .cpp to your project folder and include them in your project, then your class derived from CCameraSceneNode should work.. or at least it worked for me :D
Of course you don't have to copy over those files, but since they implement a basic working camera they are a good class to use as your base class for your camera. You could just build you own camera from scratch by inheriting from ICamerSceneNode, but why do extra work?
Post Reply