|
From: Phil F. <pfe...@co...> - 2003-08-12 13:28:11
|
> > I don't think I will get that detailed when it comes to rendering, I > think initially it should be kept to simple polygons that fit in the > grid structure, like in 2D with some similar support like > SimGraphics.drawFastCircle()... > > This way we can start with some simple rendering support and expand > from there, but still keep the presentation separate from the data > model. Issues such as collision avoidance an animation are probably > more advanced features that I would not necessarily want the display > engine to handle because theres too much of a mix between model and > presentation if one uses them. The way I dealt with that and also leave room for additional development was to have a "Drawable3D" base class that knew how to draw itself as a sphere. That class was extended to become Agent3D base classes. All the graphics functionality was contained in the createSceneGraph() method in the Drawable3D class, so you could either forget about it and have reasonable graphics that could be easily swapped out for the next API (as long as "Scene Graph" makes sense), or overload in your agent class for all the nifty graphics. That part seems to have worked out pretty well. > > > For example, If one were to write a 2D model, lets say it had > individual agents that grew over time to acquire more "grid" locations > on an Object2DGrid, then the control over if two agents are occupying > the same grid location would be programmed into the model itself and > not really be the responsibility of the Object2DDisplay to control. I > think grids give us a simple starting point for working with this sort > of behavior in 3D as well. It does, but you may find yourself limited in the long run. One of the advantages of 3D is the ability to portray much more complex scenes that have object interaction playing an important role. This could be an agent moving across a surface that it interrogates, or running along a link that connects two nodes on a network. One of the projects I'm working on now is modeling an autonomous vehicle with a laser rangefinder. The entire vehicle is a hierarchical arrangement of agents, LIDAR, turret, transmission, motor, even the terrain. And this is built on the same base classes that I use to model epidemics in populations. That would have been tougher to do if the rendering geometry had been isolated from the simulation geometry. Anyway, that's my $0.02 :-) Good luck! Phil > |