CSceneManager::postEventFromUser

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
clarks
Posts: 35
Joined: Sat Jul 28, 2012 5:23 am

CSceneManager::postEventFromUser

Post by clarks »

Code: Select all

 
bool CSceneManager::postEventFromUser(const SEvent& event)
{
    bool ret = false;
    ICameraSceneNode* cam = getActiveCamera();
    if (cam)
        ret = cam->OnEvent(event);
 
    _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
    return ret;
}
 
This only allows cameras to receive events when they are sent to the scene-manager. I understand that if this was enabled for all nodes it would degrade performance. But it just makes sense that it should.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: CSceneManager::postEventFromUser

Post by Mel »

It is a method exposed for utility reasons only. Normally you don't use that method to post user events. Use the IrrlichtDevice->postEventFromUser instead.

http://irrlicht.sourceforge.net/docu/cl ... 31e48e01df

This reaches properly your eventManager, making it posible for you to handle your nodes as you wish.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
clarks
Posts: 35
Joined: Sat Jul 28, 2012 5:23 am

Re: CSceneManager::postEventFromUser

Post by clarks »

It is a method exposed for utility reasons only.
This is understood. But the point that I am making is that this function can only post to the active camera.
Normally you don't use that method to post user events.
I never do this. All events come through the device. I am just taking a look at some of irrlicht api design.
Post Reply