// **************************************************************************** void MolDraw2D::drawMolecule(const ROMol &mol, const vector<int> *highlight_atoms, const map<int, DrawColour> *highlight_atom_map, const std::map<int, double> *highlight_radii, int confId) { drawMolecule(mol, "", highlight_atoms, highlight_atom_map, highlight_radii, confId); }
void LaboratoryScreen::draw(int width, int height) { glRotatef(camera.rotX, 1, 0, 0); glRotatef(camera.rotY, 0, 1, 0); glTranslatef(camera.posX, camera.posY, camera.posZ); skybox->draw(); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_LIGHT1); glEnable(GL_LIGHT2); glEnable(GL_LIGHT3); glEnable(GL_COLOR_MATERIAL); drawMolecule(currentMolecule); mip.draw(width,height); }
// **************************************************************************** void MolDraw2D::drawMolecule(const ROMol &mol, const std::string &legend, const vector<int> *highlight_atoms, const map<int, DrawColour> *highlight_atom_map, const std::map<int, double> *highlight_radii, int confId) { vector<int> highlight_bonds; if (highlight_atoms) { for (vector<int>::const_iterator ai = highlight_atoms->begin(); ai != highlight_atoms->end(); ++ai) { for (vector<int>::const_iterator aj = ai + 1; aj != highlight_atoms->end(); ++aj) { const Bond *bnd = mol.getBondBetweenAtoms(*ai, *aj); if (bnd) highlight_bonds.push_back(bnd->getIdx()); } } } drawMolecule(mol, legend, highlight_atoms, &highlight_bonds, highlight_atom_map, NULL, highlight_radii, confId); }