示例#1
0
 public void addAtom(AtomSite site, Color c, float r) {
   Point3d p = new Point3d(site.x, site.y, site.z);
   AtomType at = new AtomType(site.symbol);
   float radius = (float) at.atomicRadius();
   if (radius == 0) radius = 0.3f;
   if (r != -1) radius = r;
   Color3f color = new Color3f(c == null ? at.color() : c);
   new Atom(this.deltaroot, p, radius, color, true);
 }
示例#2
0
 public void setAtoms(AtomSite[] sites, Color c, float r) {
   this.removeAll();
   for (int i = 0; i < sites.length; i++) {
     Point3d p = new Point3d(sites[i].x, sites[i].y, sites[i].z);
     AtomType at = new AtomType(sites[i].symbol);
     float radius = (float) at.atomicRadius();
     if (radius == 0) radius = 0.3f;
     if (r != -1) radius = r;
     Color3f color = new Color3f(c == null ? at.color() : c);
     new Atom(this.deltaroot, p, radius, color, true);
   }
 }