public static void Display() { // UIData.EnableUpdate=false; IAtomStyle displayAtom; if (UIData.isSphereToCube) { displayAtom = new AtomCubeStyle(); Debug.Log("DisplayMolecule.Display(): New atom cube style"); } else { displayAtom = new AtomSphereStyle(); Debug.Log("DisplayMolecule.Display(): New atom sphere style"); } Debug.Log("DisplayAtoms here DisplayAtoms here DisplayAtoms here DisplayAtoms here"); displayAtom.DisplayAtoms(UIData.atomtype); if (UIData.bondtype == UIData.BondType.cube || UIData.bondtype == UIData.BondType.hyperstick || UIData.bondtype == UIData.BondType.bbhyperstick) { IBondStyle displayBond = new BondCubeStyle(); displayBond.DisplayBonds(); } else if (UIData.bondtype == UIData.BondType.line) { IBondStyle displayBond = new BondLineStyle(); displayBond.DisplayBonds(); } else if (UIData.bondtype == UIData.BondType.tubestick) { IBondStyle displayBond = new BondTubeStyle(); displayBond.DisplayBonds(); } else if (UIData.bondtype == UIData.BondType.particlestick) { IBondStyle displayBond = new BondParticleStyle(); displayBond.DisplayBonds(); } CreatGameObjectArray(); CheckResidues(); if (GUIMoleculeController.HYPERBALLSDEFAULT) { GUIMoleculeController.toggle_NA_HBALLSMOOTH = !GUIMoleculeController.toggle_NA_HBALLSMOOTH; UIData.hballsmoothmode = GUIMoleculeController.toggle_NA_HBALLSMOOTH; } UIData.hasMoleculeDisplay = true; // UIData.EnableUpdate=true; }
public static void CubeToSphere() { UIData.resetDisplay = false; // DestroyObject(); HideObject(); if (UIData.atomtype == UIData.AtomType.sphere) { GameObject spmObject = GameObject.FindGameObjectWithTag("SphereManager"); SphereManager spManager = spmObject.GetComponent <SphereManager>(); spManager.EnableRenderers(); } if (!UIData.isSphereLoaded) { IAtomStyle displayAtom; Debug.Log("UIData.atomtype :: " + UIData.atomtype); displayAtom = new AtomSphereStyle(); displayAtom.DisplayAtoms(UIData.atomtype); } if (UIData.bondtype == UIData.BondType.cube || UIData.bondtype == UIData.BondType.hyperstick || UIData.bondtype == UIData.BondType.bbhyperstick) { IBondStyle displayBond = new BondCubeStyle(); displayBond.DisplayBonds(); } else if (UIData.bondtype == UIData.BondType.line) { IBondStyle displayBond = new BondLineStyle(); displayBond.DisplayBonds(); } else if (UIData.bondtype == UIData.BondType.tubestick) { IBondStyle displayBond = new BondTubeStyle(); displayBond.DisplayBonds(); } else if (UIData.bondtype == UIData.BondType.particlestick) { IBondStyle displayBond = new BondParticleStyle(); displayBond.DisplayBonds(); } CreatGameObjectArray(); BallUpdate.resetRadii = true; //BallUpdate.resetColors = true; Debug.Log("Exiting :: CubeToSphere"); }