Hi Maia,

to answer your questions:

> less intuitive for OO programmers

Entity systems do not use inheritance (well, dtEntity does, components can form 
an inheritance structure) and do less encapsulation than traditional object 
systems. But once you understand the basic idea it is very nice to have all 
functionality of one sort bundled away in an entity system. For example look at 
the sound system: All sound related stuff is in the SoundSystem object and the 
components it holds. You can easily and efficiently iterate over all sound 
components because they are held in a central data structure. No other part of 
the system needs to know about sounds. You can unload or start the sound system 
during run time, no restart or recompile needed. I think all this flexibility 
makes it worth to move away from inheritance based systems or traditional 
object-stored component systems.

About using less ref_ptrs: Objects referenced by ref_ptrs must be created with 
new() on the heap and can not be held by memory managers like boost::pool. So 
not using them makes the system more flexible. You can do your own memory 
management for components, which can be important for speed-critical parts. 

> Also, I am not sure if it is working with VR Juggler (for CAVE configuration, 
> etc.), allows devices integration through VRPN, networking. Could you tell if 
> it does ? 
If OSG can do it then dtEntity can do it. dtEntity is simply a framework for 
controlling the OSG scene graph. While there is some setup code for getting an 
osgViewer started and registering to keyboard/mouse events, you can choose to 
not use that code and do your individual setup that maybe only uses parts of 
dtEntity.

About osgCal3: I have written a simple entity system that currently only allows 
starting and stopping animations from JavaScript or C++, also attaching mesh 
nodes to animation bones. I will commit it to the dtEntity trunk when I return 
to work on wednesday, ok?

Cheers, 

Martin

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47361#47361





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to