DJ's questions.

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.
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

DJ's questions.

Post by DJLinux »

I'm little bit confuse about SAnimtedMesh and the interface/class IAnimatedMesh atm.

From 1.7.3 API doc you can read IAnimatedMesh->getAnimationSpeed() (why are [url] disabled ?)
but in real IAnimtedMesh doesn't have getAnimationSpeed() but SAnimatedMesh.

How i can retrieve SAnimatedMesh from loaded IAnimatedMesh ?
Or must i create SAmintedMesh explicitly ?

thank you

DJ
Last edited by DJLinux on Wed Apr 25, 2012 7:30 am, edited 1 time in total.
(Sorry about my bad English)
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: SAnimatedMesh from IAnimatedMesh ?

Post by CuteAlien »

IAnimatedMesh has no getAnimationSpeed, that is IAnimatedMeshSceneNode.
Try links again in a new post, so we can see what you are referring to (they are only disabled in your first post because of spammers).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

Re: SAnimatedMesh from IAnimatedMesh ?

Post by DJLinux »

hello CuteAlien
thank you for your fast response.

I get allways "You cannot use certain BBCodes: [url].

here are the url
http://irrlicht.sourceforge.net/docutem ... c167417435

virtual f32 irr::scene::IAnimatedMesh::getAnimationSpeed()

Implemented in irr::scene::SAnimatedMesh.

DJ
(Sorry about my bad English)
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: SAnimatedMesh from IAnimatedMesh ?

Post by CuteAlien »

edit: OK, forget everything I posted first. I had an old version checked out right now for tests.
This function seems to have gotten added in svn trunk, not yet in 1.7 I guess.
Will be in 1.8, for 1.7 stay with the official documentation: http://irrlicht.sourceforge.net/docu/
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

Re: SAnimatedMesh from IAnimatedMesh ?

Post by DJLinux »

The doc's i found looks modern and clean and has a seach function (on top right)
may be it's under dev. for Irrlicht 1.8/1.9 ?

back to my question how i get SAnimtedMesh from IAnimtedMesh ?

Thank you

DJ
(Sorry about my bad English)
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: SAnimatedMesh from IAnimatedMesh ?

Post by CuteAlien »

yeah, sorry, I edited last post. Was deep in testing and had an old version.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

Re: SAnimatedMesh from IAnimatedMesh ?

Post by DJLinux »

from 1.8 doc SMaterial has a member BlendOperation where are the curent blending mode are stored.

Where i can set/get the blending mode of the material in Irrlicht 1.7.3 ?

edit:
You can get a boolean via SMaterial.getFlag(EMF_BLEND_OPERATION ) if an mode other than EBO_NONE are active
but how i get/set the current active material blending mode ?

thank you

DJ
(Sorry about my bad English)
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: DJ's questions.

Post by CuteAlien »

If you start a project now you might consider just using trunk (1.8) - it's already feature complete and all we're working on now is getting it ready for release (meaning fixing all open bugs). So if you switch to svn-trunk now it should be mostly identical the 1.8 release.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

Re: DJ's questions.

Post by DJLinux »

I'm talkng about Irrlicht 1.7.3

Does anyone can give me a right answer please

how i can retrieve SAnimatedMesh from IAnimatedMesh or must i create it self ?
how i can get or set the curent blendingmode of SMaterial ?

Thank you

DJ.
(Sorry about my bad English)
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: DJ's questions.

Post by smso »

The proper way of getting the specific animated mesh from scene::IAnimatedMesh is to find the mesh type first and then cast it to the specific one.

Code: Select all

scene::IAnimatedMesh* amesh = ...
 
scene::SAnimatedMesh* mesh = 0;
scene::E_ANIMATED_MESH_TYPE type = amesh->getMeshType();
if ((type == scene::EAMT_3DS) || ...)
{
    mesh = static_cast<scene::SAnimatedMesh*>(amesh);
}

Regards
smso
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

Re: DJ's questions.

Post by DJLinux »

smso thank you

DJ.
(Sorry about my bad English)
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: DJ's questions.

Post by CuteAlien »

Yes, I did see you talked about 1.7.3, but as you already had seen the E_BLEND_OPERATION only got added in 1.8, so if you want to set that you have to use 1.8. So I just wanted to ensure you that using svn trunk already is rather safe as it's 99% there to 1.8 already (a few minor bugfixes left, but those are also not in 1.7, so 1.8. will likely be even more stable). And it's probably easier to switch Irrlicht versions than hunting for days for workarounds.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

Re: DJ's questions.

Post by DJLinux »

hello CuteAlien
in my own 1.7.3 build i fixed ~20 bugs

if i get all working with 1.7.3 i will switch to 1.8 end of this year
with "all" i mean a language binding of all classes and interfaces near ~12,000 lines of code you know. :wink:

here one point from the list of new fundamental bugs in 1.8.0
wchar_t on windows are 2 bytes and on linux 4
so this compare is out of range (c >= 0x10000 && c <= 0xEFFFF) on windows.

The Irrlicht dev team should give the latest version of gcc a try.
(gcc will find and show you many bugs)

Here are what i got so far with ~4,000 lines of code from ~12,000: Irrlicht featured by Basic4GL
You can see there are no class/interface casting and must be done explicit
ISceneNode = SceneNode(IAnimatedMeshScene)
get base class ISceneNode from any other I_XYZ_SceneNode.
...
(Sorry about my bad English)
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: DJ's questions.

Post by CuteAlien »

Ok thanks for the comparison bug (I can't check that file in right now as I have a few more fixes in the colllada-writer already and I'm not certain yet for some if they are correct).

Any bugreports are also welcome - we certainly prefer fixing them before release...

And it's probably been a while since I compiled gcc-mingw, will do that again soon (I have another open bug for that combo anyway).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

Re: DJ's questions.

Post by DJLinux »

with some of:
#if IRRLICHT_VERSION_MINOR >= 8
...
#else
...
#endif
in my current language binding i got it working with 1.8.0-alpha
good job so far.

Where are the official 1.8.0 API doc ?
I mean with added new things like IGUIElement.setName(), IGUIElement.getName() ...

DJ.
(Sorry about my bad English)
Post Reply