Some feature requests

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
jimbo
Posts: 5
Joined: Thu Nov 08, 2007 8:27 am

Some feature requests

Post by jimbo »

Hi, here are some feature requests:

1. Have the logger enable logging of most Irrlicht classes, so:

Code: Select all

irr::core::vector3df vel(1.0f,2.0f,3.0f);
device->getLogger()->log(vel);
which will dump something like:

vector3d<f32>{ 1.0, 2.0, 3.0 }

2. Have methods like addAnimator() return the animator pointer instead of void, so you can do:

Code: Select all

camera->addAnimator(camAnim)->drop();
3. IMesh *mesh = animatedmeshnode->getMesh()->getMesh(0); seems a bit weird.

4. Let CCubeSceneNode use the standard meshbuffers, so it's easy to add shadows etc.

5. Methods that do not work for a subclass should assert or be virtual, for example:

irr::scene::ITerrainSceneNode *terrainnode = (irr::scene::ITerrainSceneNode*)node;

node->getAbsoluteTransformation(); << ASSERT!

6. All methods which accept text should be irr::core::string enabled f.e:

Code: Select all

irr::core::stringw foo("hello");
gui->addStaticText(foo, ...);
node->setName(foo);
perhaps get rid of char * entirely for all functions (except string intialisation :))

7. This may be a bit more fundamental, but using RTTI instead of getType() enumerations might make some things a bit less complex.

That's all for now ;) Perhaps some are already available somewhere, but have a nice day!
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: Some feature requests

Post by rogerborg »

jimbo wrote:Hi, here are some feature requests:
Eh, the best way to get features implemented is to provide an implementation. ;)
jimbo wrote:1. Have the logger enable logging of most Irrlicht classes,
Nice idea.
jimbo wrote:2. Have methods like addAnimator() return the animator pointer instead of void, so you can do:
Hmm, that's clever. In fact, it may be a little too clever for it's own good.

jimbo wrote:3. IMesh *mesh = animatedmeshnode->getMesh()->getMesh(0); seems a bit weird.
Urgh, yes. I really wish that IAnimatedMeshSceneNode's IAnimatedMesh * get-method was called getAnimatedMesh() instead of getMesh(), but it would probably cause a riot if it were changed now. Actually, for an even funnier bit of rabble rousing, retain IAnimatedMeshSceneNode::getMesh() as well, but have it actually return an IMesh * (using getMesh(0) implicitly). ;)

jimbo wrote:4. Let CCubeSceneNode use the standard meshbuffers, so it's easy to add shadows etc.
I imagine that the first person who thinks it's easier to add this functionality to CCubeSceneNode than to roll their own node will submit a patch for it. ;)
jimbo wrote:5. Methods that do not work for a subclass should assert or be virtual, for example:
Yup, or at the very least log a warning.

jimbo wrote:6. All methods which accept text should be irr::core::string enabled f.e:
Yes, but... riots!

jimbo wrote:7. This may be a bit more fundamental, but using RTTI instead of getType() enumerations might make some things a bit less complex.
IIRC, RTTI is deliberately avoided to A) increase speed and B) enhance portability on weird platforms, although I may not RC.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Re: Some feature requests

Post by Ico »

rogerborg wrote:
jimbo wrote:6. All methods which accept text should be irr::core::string enabled f.e:
Yes, but... riots!
Overloading shouldn't cause riots imo? ;)

Regarding logging/text output - just add methods returning a string like .NET's ToString()?
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I also agree with everything jimbo said that I understand..

About the "riots", well, it's part of it, but it worth it.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Re: Some feature requests

Post by Luke »

jimbo wrote:3. IMesh *mesh = animatedmeshnode->getMesh()->getMesh(0); seems a bit weird.
Urgh, yes. I really wish that IAnimatedMeshSceneNode's IAnimatedMesh * get-method was called getAnimatedMesh() instead of getMesh(), but it would probably cause a riot if it were changed now. Actually, for an even funnier bit of rabble rousing, retain IAnimatedMeshSceneNode::getMesh() as well, but have it actually return an IMesh * (using getMesh(0) implicitly). ;)
hopefully it doesn't cause a riot, but I made IAnimatedMesh derived from IMesh (it was derived behind the interface before anyway).

so from 1.4, it's fine to go IMesh *mesh = animatedmeshnode->getMesh();

but be careful if it's really an animated mesh, the mesh will be at the last animated frame

and
1. Have the logger enable logging of most Irrlicht classes, so:
seems pretty useful
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: Some feature requests

Post by rogerborg »

Luke wrote:hopefully it doesn't cause a riot, but I made IAnimatedMesh derived from IMesh (it was derived behind the interface before anyway).

so from 1.4, it's fine to go IMesh *mesh = animatedmeshnode->getMesh();

but be careful if it's really an animated mesh, the mesh will be at the last animated frame
Yup, I noticed that. It's fair enough, but because the behaviour is implicit, it's caused a little confusion. I expect people will get used to it, although perhaps a comment in IAnimatedMesh specifying the behaviour if it's used an an IMesh might be helpful.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply