Sign in to follow this  
Rhaal

Problems with deriving a class

Recommended Posts

Rhaal    754
I would ask this on the Irrlicht forum, but then I'd be waiting 2 days for an answer, and the answer would be "search the forum noob". Besides, I highly doubt my problem is with the engine itself(http://irrlicht.sourceforge.net/). I've gotten the engine up and running, and am able to render scenes. So, I know my environment is properly set up. However, when I get to input handling, there's a problem. Here is my EventHandler.h:
#ifndef LX_EVENTRECEIVER_H
#define LX_EVENTRECEIVER_H
#include <irrlicht.h>

class LoriumEventReceiver : public irr::IEventReceiver
{
 public:
    virtual bool OnEvent(SEvent event)
    {
      if (node != 0 && event.EventType == irr::EET_KEY_INPUT_EVENT &&
        !event.KeyInput.PressedDown)
        {return true;}
    }
};
#endif

If I make a source file like this:
#include "EventReceiver.h"
LoriumEventReceiver* pEventReceiver;
I get: C:\projects\lorium\main.cpp In file included from main.cpp C:\projects\lorium\EventReceiver.h expected `;' before '(' token C:\projects\lorium\EventReceiver.h expected `;' before '(' token I feel like 'virtual' shouldn't be there because irr::IEventReceiver declares this as virtual, and I'm supposed to define it. However, Every tutorial and example on irrlicht's site does it this way.

Share this post


Link to post
Share on other sites
Rhaal    754
Thanks guys, you were right :) SEvent is in the irr namespace. I'm noticing a lot of problems with irrlicht tutorials, most of which are small typos - but they are everywhere!

Their documentation needs some serious help. Thanks again :)

Share this post


Link to post
Share on other sites
TDragon    679
The documentation admittedly could use some work, but I wouldn't be too harsh; it's developed by one person, whose native language isn't even English.

Share this post


Link to post
Share on other sites
Rhaal    754
Quote:
Original post by TDragon
The documentation admittedly could use some work, but I wouldn't be too harsh; it's developed by one person, whose native language isn't even English.


Well I'm really impressed by the engine. As much as I love OOP, I just can't get used to OGRE3D. Irrlicht seems to work more like DirectX, which is what I find comfortable :)

If the author's native language isn't English, then I'm impressed with the documentation. Actually, now that I think about it, my only confusion has come from documentation on the wiki by others.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this