Hi Dave, On Tuesday, April 17, 2012 01:17:45 PM David Lonie wrote: > Hi Tuukka, > > On Mon, Apr 16, 2012 at 2:56 PM, Tuukka Verho <[email protected]> wrote: > > David Lonie kirjoitti 16.4.2012 kello 20.37: > >> I was trying to think of a way to implement this in a maintainable way > >> across all of the engines, maybe with a MoleculeRepresentation (or > >> similar) layer between Molecule and Engine, but a new engine may be > >> the best way to go for now. > > > > Maybe the clipping code could be simply taken out from the engines? We > > could have a more sophisticated drawCylinder() method that would do the > > clipping etc. and also draw two-colored cylinders? On the other hand then > > it would need to be replicated in each painter backend separately -- > > unless the backend independent stuff would be in the Painter superclass > > for example. > This is similar to the idea of putting clipping plane support directly > into the painters, which I think we've agreed would be a good move. > This would allow us to clip spheres, lines, etc, too for atoms and > wireframe in addition to just the cylinders.
That's right... But I was thinking a bit further: the painter could also take care of calculating the shortest distance, multiple intersections and so on. So if the engine wants to wrap the cylinders it just passes the unit cell to the painter and everything just works. In that scheme the current way of drawing a two-colored bond with two separate drawCylinder calls wouldn't work, so there should be a drawTwoColoredCylinder method in the painter. - Tuukka ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Avogadro-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/avogadro-devel
