Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
 public static extern void AddBond( IntPtr instance, BondStruct bond);
Ejemplo n.º 4
0
 public static extern void AddBond(IntPtr instance, BondStruct bond);