Esempio n. 1
0
    void DisplayActiveSite()
    {
        FileManager.MetaFile[] userPieceList;
        FileManager.MetaFile[] activeSite;
        FileManager.MetaFile[] activeSiteAnchors;
        userPieceList     = FileManager.GetPieces("UserPiece");
        activeSite        = FileManager.GetPieces("ActiveSite");         // TODO: update for multiple Active Sites
        activeSiteAnchors = FileManager.GetPieces("ActiveSite/Anchors"); // TODO: update for multiple Active Sites

        MolFile molFile = new MolFile(activeSite[0]);                    // TODO: be able to select other Active Sites (if available)

        Transform activeSiteTrans = CreateTransform("ActiveSite", GameObject.Find("BasePoint").transform);
        Transform molControlTrans = CreateTransform("MolControl", activeSiteTrans);
        Transform molObjectTrans  = CreateTransform("MolObject", molControlTrans);

        DisplayAtoms.Display(molFile.GetAtomDetailList(), molObjectTrans);


        foreach (FileManager.MetaFile anchor in activeSiteAnchors)
        {
            activeSiteTrans = CreateTransform("ActiveSiteAnchor", GameObject.Find("BasePoint").transform);
            molControlTrans = CreateTransform("MolControl", activeSiteTrans);
            molObjectTrans  = CreateTransform("MolObject", molControlTrans);

            DisplayAtoms.Display(molFile.GetAtomDetailList(), molObjectTrans);
        }
    }
Esempio n. 2
0
    void AddMolecule(GameObject window, int moleculeNum)
    {
        MolFile molFile = new MolFile((FileManager.MetaFile)moleculeFiles.GetValue(moleculeNum - 1));

        DisplayAtoms.Display(molFile.GetAtomDetailList(), window.transform.Find("MoleculeObject").transform);
    }