Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
 public static extern void AddBond( IntPtr instance, BondStruct bond);
Exemple #4
0
 public static extern void AddBond(IntPtr instance, BondStruct bond);