@Override public void setAtomClickability() { if (atomEllipsoids.isEmpty()) return; for (Ellipsoid e : atomEllipsoids.values()) { int i = e.tensor.atomIndex1; Atom atom = ms.at[i]; if ((atom.shapeVisibilityFlags & vf) == 0 || ms.isAtomHidden(i)) continue; atom.setClickable(vf); } }
protected void render() { Stars stars = (Stars) shape; if (stars.mads == null) return; Atom[] atoms = modelSet.atoms; for (int i = modelSet.getAtomCount(); --i >= 0; ) { Atom atom = atoms[i]; if (!atom.isShapeVisible(myVisibilityFlag) || modelSet.isAtomHidden(i)) continue; colix = Shape.getColix(stars.colixes, i, atom); if (!g3d.setColix(colix)) continue; render1(atom, stars.mads[i]); } }
protected void render() { Vectors vectors = (Vectors) shape; if (!vectors.isActive) return; short[] mads = vectors.mads; if (mads == null) return; Atom[] atoms = vectors.atoms; short[] colixes = vectors.colixes; for (int i = modelSet.getAtomCount(); --i >= 0; ) { Atom atom = atoms[i]; if (!atom.isShapeVisible(myVisibilityFlag) || modelSet.isAtomHidden(i)) continue; Vector3f vibrationVector = viewer.getVibrationVector(i); if (vibrationVector == null) continue; vectorScale = viewer.getVectorScale(); if (transform(mads[i], atom, vibrationVector) && g3d.setColix(Shape.getColix(colixes, i, atom))) renderVector(atom); } }
private void drawSegment(Atom atomA, Atom atomB, short colixA, short colixB, float max) { if (atomA.getNBackbonesDisplayed() == 0 || atomB.getNBackbonesDisplayed() == 0 || ms.isAtomHidden(atomB.i) || !isDataFrame && atomA.distanceSquared(atomB) > max) return; colixA = C.getColixInherited(colixA, atomA.colixAtom); colixB = C.getColixInherited(colixB, atomB.colixAtom); if (!isExport && !isPass2 && !setBioColix(colixA) && !setBioColix(colixB)) return; int xA = atomA.sX, yA = atomA.sY, zA = atomA.sZ; int xB = atomB.sX, yB = atomB.sY, zB = atomB.sZ; int mad = this.mad; if (max == 1000) mad = mad >> 1; if (mad < 0) { g3d.drawLine(colixA, colixB, xA, yA, zA, xB, yB, zB); } else { int width = (int) (exportType == GData.EXPORT_CARTESIAN ? mad : vwr.tm.scaleToScreen((zA + zB) / 2, mad)); g3d.fillCylinderXYZ(colixA, colixB, GData.ENDCAPS_SPHERICAL, width, xA, yA, zA, xB, yB, zB); } }