コード例 #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);
            }
        }
コード例 #2
0
ファイル: RendererWrapper.cs プロジェクト: luaman/g3d-cpp
        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);
            }
        }
コード例 #3
0
 public void setModel(MolecularModel mm)
 {
     wrapper.setModel(mm);
     renderScene();
 }
コード例 #4
0
ファイル: Viewer.cs プロジェクト: luaman/g3d-cpp
        public void setModel(MolecularModel mm)
        {
            wrapper.setModel(mm);
            renderScene();