public void setModel(MolecularModel mm) { clearModel(); for (int a = 0; a < mm.Atoms.Count; a++) { Atom atom = (Atom)mm.Atoms[a]; AtomStruct anAtom = new AtomStruct(); anAtom.x = (float)atom.X; anAtom.y = (float)atom.Y; anAtom.z = (float)atom.Z; anAtom.ID = atom.ID; anAtom.elementNumber = atom.ElementNumber; AddAnAtom(_renderer, anAtom); } for (int b = 0; b < mm.Bonds.Count; b++) { Bond bond = (Bond)mm.Bonds[b]; BondStruct aBond = new BondStruct(); aBond.atomIndex1 = bond.AtomIndex1; aBond.atomIndex2 = bond.AtomIndex2; AddBond(_renderer, aBond); } }
public void setModel(MolecularModel mm) { clearModel(); for (int a = 0; a < mm.Atoms.Count; a++) { Atom atom = (Atom) mm.Atoms[a]; AtomStruct anAtom = new AtomStruct(); anAtom.x = (float) atom.X; anAtom.y = (float) atom.Y; anAtom.z = (float) atom.Z; anAtom.ID = atom.ID; anAtom.elementNumber = atom.ElementNumber; AddAnAtom(_renderer, anAtom); } for (int b = 0; b < mm.Bonds.Count; b++) { Bond bond = (Bond) mm.Bonds[b]; BondStruct aBond = new BondStruct(); aBond.atomIndex1 = bond.AtomIndex1; aBond.atomIndex2 = bond.AtomIndex2; AddBond(_renderer, aBond); } }
public static extern void AddAnAtom( IntPtr instance, AtomStruct atom);
public static extern void AddAnAtom(IntPtr instance, AtomStruct atom);
public static extern int TestAtomStruct(AtomStruct atom);