I'm having trouble understanding the control flow and data structures in Jmol. I've got g3d working, and I've ported most of org.jmol.viewer, andorg.jmol.api, but I'm not entirely sure what to *do* with them.


I want to be able to draw a molecule -- just a simple alkene or alcohol, nothing crazy. I can't figure out *where* to do that though.

Control flow:
I'm rather confused by the rendering pipeline -- Graphics3D, Viewer, FrameRenderer, Frame, Platform3D -- so many related classes, and it seems like some of them run threads in the background then notify others when they're done. I just want a simplified pipeline: on repaint, draw model to image, copy image to screen. In trying to figure this out, I've come up with these questions:


What is Frame?
How does it relate to FrameRenderer?
Why does a FrameRenderer need a Frame?
What is the relationship between Platform3D, Graphics3D, and Viewer? They seem to have a lot of interconnections and delegate a lot of things to eachother.


Data structures:
I want to be able to say something like myJmol.AddAtom(new Carbon(x, y, z))
or myJmol.addBond(thisCarbon, thatCarbon, BondType.SINGLE_BOND)
In other words, I'm constructing my model programmatically at run time, not from a filie.


It looked to me like the way to do that would be to make an implementation of JmolAdapter , and make it iterate over my data structure with an AtomIterator. Then I'd give an instance MyAdapater to the instance of org.jmol.viewer.Viewer. Is that the right general idea? Or should I get the SmarterAdapter working first?

Help? I need to make some progress with this soon or it's back to Direct3D for me :(

-sascha



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to