Simple Question - read below

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
oppositescopez
Posts: 14
Joined: Wed Sep 11, 2013 3:00 pm
Contact:

Simple Question - read below

Post by oppositescopez »

ok, so im working on stuff.. ive got pretty much everything figured out.. but im having issues managing where objects go and stuff. i cant pay for any type of license (thats why i use irrlicht) and i would like to have (pretty much) all rights to what i make. i know in windows they have editors (that 14 day trial) and stuff. never found anything in linux. and really just dont know how to approach it. i mean i COULD just get coordinates of the camera and write down where i am and put those coords to an obj over and over. but that seems tedious. (and a bit unorthadox) so does any one know what i should do here? as i said earlier im in linux. i mean im fine with doing it that way if need be to not have to pay but was just wondering what other irrlicht users do about this.


sorry i really couldn't think of a title.
Gnasty Gnork
Posts: 18
Joined: Fri Jun 20, 2014 12:12 pm

Re: Simple Question - read below

Post by Gnasty Gnork »

This is what i use for camera and basic info:

Code: Select all

showDevData(ICameraSceneNode* camera, IGUIEnvironment* guienv, IVideoDriver* driver, IrrlichtDevice* device)
{ 
    then = device->getTimer()->getTime();
    timer = device->getTimer();
    const u32 now = device->getTimer()->getTime();
    const f32 frameDeltaTime = (f32)(now - then) / 1000.f;
    then = now;
    int camX, camY, camZ;
    camX= camera->getAbsolutePosition().X;
    camY= camera->getAbsolutePosition().Y;
    camZ= camera->getAbsolutePosition().Z;
 
    int frames_per_second = driver->getFPS();
    IGUIFont *font = guienv->getBuiltInFont();
    font->draw(stringw (L"FPS ") + stringw(frames_per_second).c_str(),rect<s32>(10,10,40,10),SColor(100,250,0,0));
    font->draw(stringw (L"Position") + stringw(L" X: ") + stringw(camX) + stringw(L" Y: ") + stringw(camY) + stringw(L" Z: ") + stringw(camZ),rect<s32>(10,30,50,10),SColor(100,250,0,0));
    font->draw(stringw (L"Time Elapsed: ") + stringw(timer->getTime()/1000).c_str() + stringw(L" seconds") ,rect<s32>(10,20,40,10),SColor(100,250,0,0));
}
And i guess by using an array of scene nodes you could implement something along the lines of what i posted above for every scene node.

You do something like:

Code: Select all

 
int selected = 0;
ISceneNode* node[];
 
ISceneNode* node[0] = smgr->addAnimatedMeshSceneNode(.....);
ISceneNode* node[1] = smgr->addMeshSceneNode(...);
 
 
while(device->run())
{
     if (is.pressed(ARROWUP)) { selected = selected + 1;}
       if (is.pressed(ARROWDOWN)&& selected >=1) { selected = selected - 1;}
 
node[selected].showPosition();
 
if (is.pressed(KEY_W)) { node[selected]->setPosition(node[selected]->getPosition() + vector3df(0,10,0)); node[selected]->updateAbsolutePosition(); }
 
 
and so on
 
}
But im a noob so all i said could be bullshit.


What i know for sure is that IrrEdit has full and unlimited (timewise) functionality regarding exporting to .irr and all the stuff related to irrlicht.
oppositescopez
Posts: 14
Joined: Wed Sep 11, 2013 3:00 pm
Contact:

Re: Simple Question - read below

Post by oppositescopez »

but i thought it was a part of copper cube thats only a 14 day trial?
Gnasty Gnork
Posts: 18
Joined: Fri Jun 20, 2014 12:12 pm

Re: Simple Question - read below

Post by Gnasty Gnork »

oppositescopez wrote:but i thought it was a part of copper cube thats only a 14 day trial?
Irrlicht functionality keeps working even after the trial ends.
Post Reply