Class Graphics3D
java.lang.Object
org.jmol.util.GData
org.jmol.g3d.Graphics3D
- All Implemented Interfaces:
JmolGraphicsInterface, JmolRendererInterface
Provides high-level graphics primitives for 3D visualization for the software
renderers. These methods should not have to be used with WebGL or OpenGL or
other hardware accelerators.
This module is linked to via reflection from org.jmol.viewer.Viewer
Bob Hanson 9/2/2012
Note added 4/2015 BH:
Well, it turns out that the calculation of the intermediate pixel z value
in all methods involving rasterization of lines is incorrect and has been
incorrect since Jmol's inception. I noticed long ago that large triangles such as
produced in DRAW could incorrectly overlay/underlay other objects, but I could
never determine why. It turns out that the assumption that z-value is linear
across a line when perspectiveDepth is TRUE is simply incorrect.
Basically, the function z(x) is non-linear. Treating it as simply a
linear function results in oddities where lines and planes
-- particularly created using DRAW and large distances -- appear
to be where they are not.
Through Jmol 13.3.13 we had the standard linear relationship:
z = (x - xa) / (xb - xa) * (zb - za) + za
I worked it out, and, amazingly, it should be
z = (xb - xa) * za * zb / ((xb - x) * zb + (x - xa) * za)
Note that it is still true that when x = xb, z = zb
and when x = xa, z = za, as required.
This equation can be rearranged to
z = a / (b - x)
where
a = (xb - xa) * za * (zb / (zb - za))
and
b = (xb * zb - xa * za) / (zb - za)
These values must be floats, not integers, to work properly, because
these are extrapolations from long distances in some cases. So there is
considerable overhead there. It will take some experimentation to figure this
out.
The practical implications are for line, cylinder, and triangle drawing.
First-pass corrections are for axes and DRAW objects. They tend to be the
larger objects that result in the issue.
Also affected is POV-Ray output, because right now POV-Ray is created using
perspective on and plotted as though it were orthographic, but although that
works in x and y, it does not work in z!
A pure software implementation of a 3D graphics engine. No hardware required. Depending upon what you are rendering ... some people say it is pretty fast.
- Author:
- Miguel, miguel@jmol.org with additions by Bob Hanson hansonr@stolaf.edu The above is an understatement to say the least. This is a two-pass rendering system. In the first pass, all opaque objects are rendered. In the second pass, all translucent objects are rendered. If there are no translucent objects, then that is found in the first pass as follows: The renderers first try to set the color index of the object to be rendered using setColix(short colix), and that method returns false if we are in the wrong pass for that type of object. In addition, setColix records in the boolean haveTranslucentObjects whether a translucent object was seen in the first pass. The second pass is skipped if this flag is not set. This saves immensely on rendering time when there are no translucent objects. THUS, IT IS CRITICAL THAT ALL RENDERING OPTIONS CHECK THE COLIX USING g3d.setColix(short colix) PRIOR TO RENDERING. Translucency is rendered only approximately. We can't maintain a full buffer of all translucent objects. Instead, we "cheat" by maintaining one translucent z buffer. When a translucent pixel is to be written, its z position is checked and... ...if it is behind or at the z position of any pixel, it is ignored ...if it is in front of a translucent pixel, it is added to the translucent buffer ...if it is between an opaque and translucent pixel, the translucent pixel is turned opaque, and the new pixel is added to the translucent buffer This guarantees accurate translucency when there are no more than two translucent pixels between the user and an opaque pixel. It's a fudge, for sure. But it is pretty good, and certainly fine for "draft" work. Users needing more accurate translucencty are encouraged to use the POV-Ray export facility for production-level work. Antialiasing is accomplished as full scene antialiasing. This means that the width and height are doubled (both here and in TransformManager), the scene is rendered, and then each set of four pixels is averaged (roughly) as the final pixel in the width*height buffer. Antialiasing options allow for antialiasing of all objects: antialiasDisplay = true antialiasTranslucent = true or just the opaque ones: antialiasDisplay = true antialiasTranslucent = false or not at all: antialiasDisplay = false The difference will be speed and memory. Adding translucent objects doubles the buffer requirement, and adding antialiasing quadruples the buffer requirement. So we have: Memory requirements are significant, in multiples of (width) * (height) 32-bit integers: antialias OFF ON/opaque only ON/all objects no translucent 1p + 1z = 2 4p + 4z = 8 4p + 4z = 8 objects with translucent 2p + 2z = 4 5p + 5z = 10 8p + 8z = 16 objects Note that no antialising at all is required for POV-Ray output. POV-Ray will do antialiasing on its own. In principle we could save a bit in the case of antialiasing of just opaque objects and reuse the p and z buffers for the translucent buffer, but this hasn't been implemented because the savings isn't that great, and if you are going to the trouble of having antialiasing, you probably what it all.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintprotected int[]protected int[]static Comparator<org.jmol.g3d.TextString> protected intprotected int[]protected int[]protected intFields inherited from class GData
ambientOcclusion, antialiasEnabled, antialiasThisFrame, apiPlatform, argbCurrent, argbNoisyDn, argbNoisyUp, backgroundImage, bgcolor, bufferSize, changeableColixMap, colixCurrent, contrastColix, currentFont, currentlyRendering, depth, displayMaxX, displayMaxX2, displayMaxY, displayMaxY2, displayMinX, displayMinX2, displayMinY, displayMinY2, ENDCAPS_FLAT, ENDCAPS_FLAT_TO_SPHERICAL, ENDCAPS_HIDDEN, ENDCAPS_NONE, ENDCAPS_OPEN_TO_SPHERICAL, ENDCAPS_SPHERICAL, EXPORT_CARTESIAN, EXPORT_NOT, EXPORT_RAYTRACER, graphicsForMetrics, height, ht3, HUGE, inGreyscaleMode, isPass2, newAntialiasing, newWindowHeight, newWindowWidth, normixCount, shader, slab, textY, transformedVectors, translucentCoverOnly, vwr, width, windowHeight, windowWidth, xGT, xLast, xLT, yGT, yLast, yLT, zGT, zLT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRenderer(int tok) allows core JavaScript loading to not involve these classesvoidapplyAnaglygh(STER stereoMode, int[] stereoColors) voidbeginRendering(M3 rotationMatrix, boolean translucentMode, boolean isImageWrite, boolean renderLow) booleanbooleancheckTranslucent(boolean isAlphaTranslucent) voidclear()voidvoiddestroy()static voiddownsample2d(int[] pbuf, int width, int height, int bgcheck) voidvoidvoiddrawDashedLineBits(int run, int rise, P3 pointA, P3 pointB) booleandrawEllipse(P3 ptAtom, P3 ptX, P3 ptY, boolean fillArc, boolean wireframeOnly) voiddrawFilledCircle(short colixRing, short colixFill, int diameter, int x, int y, int z) draws a ring and filled circle (halos, draw CIRCLE, draw handles)voiddrawHermite4(int tension, P3 s0, P3 s1, P3 s2, P3 s3) voiddrawHermite7(boolean fill, boolean border, int tension, P3 s0, P3 s1, P3 s2, P3 s3, P3 s4, P3 s5, P3 s6, P3 s7, int aspectRatio, short colixBack) voidvoiddrawLine(short colixA, short colixB, int x1, int y1, int z1, int x2, int y2, int z2) voiddrawLineAB(P3 pointA, P3 pointB) voiddrawLineABBits(int run, int rise, boolean andClip) voiddrawLineBits(short colixA, short colixB, P3 pointA, P3 pointB) voiddrawLinePixels(P3i a, P3i b, int z, int zslab) voiddrawLineXYZ(int x1, int y1, int z1, int x2, int y2, int z2) voiddrawPixel(int x, int y, int z) voiddrawPoints(int count, int[] coordinates, int scale) voiddrawRect(int x, int y, int z, int zSlab, int rWidth, int rHeight) draws a rectanglevoiddrawString(String str, Font font3d, int xBaseline, int yBaseline, int z, int zSlab, short bgColix) draws the specified string in the current font.voiddrawStringNoSlab(String str, Font font3d, int xBaseline, int yBaseline, int z, short bgColix) draws the specified string in the current font.voiddrawSurface(MeshSurface meshSurface, short colix) voiddrawTriangle3C(P3i screenA, short colixA, P3i screenB, short colixB, P3i screenC, short colixC, int check) voidvoidfillConeScreen3f(byte endcap, int screenDiameter, P3 screenBase, P3 screenTip, boolean isBarb) voidfillCylinder(byte endcaps, int diameter, P3i screenA, P3i screenB) voidfillCylinderBits(byte endcaps, int diameter, P3 screenA, P3 screenB) voidfillCylinderBits2(short colixA, short colixB, byte endcaps, int diameter, P3 screenA, P3 screenB) voidfillCylinderScreen3I(byte endcaps, int diameter, P3 screenA, P3 screenB, P3 pt0f, P3 pt1f, float radius) voidfillCylinderXYZ(short colixA, short colixB, byte endcaps, int diameter, int xA, int yA, int zA, int xB, int yB, int zB) voidfillEllipsoid(P3 center, P3[] points, int x, int y, int z, int diameter, M3 mToEllipsoidal, double[] coef, M4 mDeriv, int selectedOctant, P3[] octantPoints) voidfillHermite(int tension, int diameterBeg, int diameterMid, int diameterEnd, P3 s0, P3 s1, P3 s2, P3 s3) voidfillQuadrilateral(P3 screenA, P3 screenB, P3 screenC, P3 screenD, boolean isSolid) voidfillSphereBits(int diameter, P3 center) fills a solid spherevoidfillSphereI(int diameter, P3i center) fills a solid spherevoidfillSphereXYZ(int diameter, int x, int y, int z) fills a solid spherevoidfillTextRect(int x, int y, int z, int zSlab, int widthFill, int heightFill) fills background rectangle for labelvoidfillTriangle3CN(P3i screenA, short colixA, short normixA, P3i screenB, short colixB, short normixB, P3i screenC, short colixC, short normixC) voidfillTriangle3CNBits(P3 screenA, short colixA, short normixA, P3 screenB, short colixB, short normixB, P3 screenC, short colixC, short normixC, boolean twoSided) voidfillTriangle3f(P3 screenA, P3 screenB, P3 screenC, boolean isSolid) voidvoidfillTriangleTwoSided(short normix, P3 screenA, P3 screenB, P3 screenC) static intfixTextImageRGB(int argb) intdoublegetScreenImage(boolean isImageWrite) intgetShadeIndex(short normix) booleanbooleanvoidinitialize(Viewer vwr, GenericPlatform apiPlatform) booleaninitializeOutput(Viewer vwr, double privateKey, Map<String, Object> params) booleanbooleanisWebGL()static intmergeBufferPixel(int argbA, int argbB, int bgcolor) voidplotImage(int x, int y, int z, Object image, JmolRendererInterface jmolRenderer, short bgcolix, int imageWidth, int imageHeight) voidplotImagePixel(int argb, int x, int y, int z, byte shade, int bgargb, int width, int height, int[] zbuf, Object p, int transpLog) voidplotPixelClippedP3i(P3i screen) voidplotText(int x, int y, int z, int argb, int bgargb, String text, Font font3d, JmolRendererInterface jmolRenderer) voidvoidrenderAllStrings(Object jmolRenderer) voidrenderBackground(JmolRendererInterface jmolRenderer) ///////////////////////////////////////////////////////voidrenderCrossHairs(int[] minMax, int screenWidth, int screenHeight, P3 navOffset, float navDepth) voidsetBackgroundTransparent(boolean TF) booleansetC(short colix) sets current color from colix color indexvoidbooleansetPass2(boolean antialiasTranslucent) voidsetRotationMatrix(M3 rotationMatrix) voidsetSlabAndZShade(int slabValue, int depthValue, int zSlab, int zDepth, int zShadePower) voidsetWindowParameters(int width, int height, boolean antialias) voidvoidvolumeRender(boolean TF) voidvolumeRender4(int diameter, int x, int y, int z) Methods inherited from class GData
changeColixArgb, clipCode, clipCode3, drawQuadrilateralBits, drawTriangleBits, getAmbientPercent, getCel, getCelPower, getChangeableColix, getColorArgbOrGray, getDiffusePercent, getFont3D, getFont3DCurrent, getFont3DFS, getFont3DFSS, getFont3DScaled, getFontFidFS, getFontFidI, getHermiteList, getLightSource, getPhongExponent, getShades, getSpecular, getSpecularExponent, getSpecularPercent, getSpecularPower, getTextPosition, getTransformedVertexVectors, isAntialiased, isClipped, isClipped3, isClippedXY, isClippedZ, isDirectedTowardsCamera, isInDisplayRange, roundInt, setAmbientOcclusion, setAmbientPercent, setBackgroundArgb, setBackgroundImage, setCel, setCelPower, setColor, setDepth, setDiffusePercent, setFontBold, setGreyscaleMode, setNewWindowParametersForExport, setPhongExponent, setSlab, setSpecular, setSpecularExponent, setSpecularPercent, setSpecularPower, setTextPosition, setWidthHeight, setWinParamsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JmolGraphicsInterface
isAntialiased, isClippedXY, isInDisplayRange, setSlab
-
Field Details
-
pbuf
protected int[] pbuf -
pbufT
protected int[] pbufT -
zbuf
protected int[] zbuf -
zbufT
protected int[] zbufT -
translucencyMask
protected int translucencyMask -
zMargin
protected int zMargin -
sort
-
pass2Flag01
public int pass2Flag01
-
-
Constructor Details
-
Graphics3D
public Graphics3D()
-
-
Method Details
-
isWebGL
public boolean isWebGL()- Specified by:
isWebGLin interfaceJmolRendererInterface
-
clear
-
destroy
-
initialize
- Overrides:
initializein classGData
-
addRenderer
public void addRenderer(int tok) allows core JavaScript loading to not involve these classes- Specified by:
addRendererin interfaceJmolRendererInterface- Overrides:
addRendererin classGData- Parameters:
tok-
-
setWindowParameters
public void setWindowParameters(int width, int height, boolean antialias) - Overrides:
setWindowParametersin classGData
-
checkTranslucent
public boolean checkTranslucent(boolean isAlphaTranslucent) - Specified by:
checkTranslucentin interfaceJmolRendererInterface
-
beginRendering
public void beginRendering(M3 rotationMatrix, boolean translucentMode, boolean isImageWrite, boolean renderLow) - Overrides:
beginRenderingin classGData- Parameters:
rotationMatrix-translucentMode-isImageWrite-renderLow- TODO
-
setBackgroundTransparent
public void setBackgroundTransparent(boolean TF) - Overrides:
setBackgroundTransparentin classGData- Parameters:
TF-
-
setPass2
-
endRendering
public void endRendering()- Overrides:
endRenderingin classGData
-
mergeBufferPixel
public static int mergeBufferPixel(int argbA, int argbB, int bgcolor) -
getScreenImage
- Overrides:
getScreenImagein classGData- Parameters:
isImageWrite-- Returns:
- image object
-
applyAnaglygh
- Overrides:
applyAnaglyghin classGData- Parameters:
stereoMode-stereoColors-
-
snapshotAnaglyphChannelBytes
public void snapshotAnaglyphChannelBytes()- Overrides:
snapshotAnaglyphChannelBytesin classGData
-
releaseScreenImage
public void releaseScreenImage()- Overrides:
releaseScreenImagein classGData
-
haveTranslucentObjects
public boolean haveTranslucentObjects()- Specified by:
haveTranslucentObjectsin interfaceJmolRendererInterface
-
setSlabAndZShade
public void setSlabAndZShade(int slabValue, int depthValue, int zSlab, int zDepth, int zShadePower) - Specified by:
setSlabAndZShadein interfaceJmolGraphicsInterface- Overrides:
setSlabAndZShadein classGData- Parameters:
zSlab- for zShadezDepth- for zShadezShadePower-
-
downsample2d
public static void downsample2d(int[] pbuf, int width, int height, int bgcheck) -
hasContent
public boolean hasContent() -
setC
public boolean setC(short colix) sets current color from colix color index- Specified by:
setCin interfaceJmolRendererInterface- Overrides:
setCin classGData- Parameters:
colix- the color index- Returns:
- true or false if this is the right pass
-
drawFilledCircle
public void drawFilledCircle(short colixRing, short colixFill, int diameter, int x, int y, int z) Description copied from interface:JmolRendererInterfacedraws a ring and filled circle (halos, draw CIRCLE, draw handles)- Specified by:
drawFilledCirclein interfaceJmolRendererInterface- Parameters:
colixRing-colixFill-diameter-x- center xy- center yz- center z
-
volumeRender4
public void volumeRender4(int diameter, int x, int y, int z) - Specified by:
volumeRender4in interfaceJmolRendererInterface
-
fillSphereXYZ
public void fillSphereXYZ(int diameter, int x, int y, int z) fills a solid sphere- Specified by:
fillSphereXYZin interfaceJmolRendererInterface- Parameters:
diameter- pixel countx- center xy- center yz- center z
-
volumeRender
public void volumeRender(boolean TF) - Specified by:
volumeRenderin interfaceJmolRendererInterface
-
fillSphereI
fills a solid sphere- Specified by:
fillSphereIin interfaceJmolRendererInterface- Parameters:
diameter- pixel countcenter- javax.vecmath.Point3i defining the center
-
fillSphereBits
fills a solid sphere- Specified by:
fillSphereBitsin interfaceJmolRendererInterface- Parameters:
diameter- pixel countcenter- a javax.vecmath.Point3f ... floats are casted to ints
-
fillEllipsoid
public void fillEllipsoid(P3 center, P3[] points, int x, int y, int z, int diameter, M3 mToEllipsoidal, double[] coef, M4 mDeriv, int selectedOctant, P3[] octantPoints) - Specified by:
fillEllipsoidin interfaceJmolRendererInterface
-
drawRect
public void drawRect(int x, int y, int z, int zSlab, int rWidth, int rHeight) draws a rectangle- Specified by:
drawRectin interfaceJmolRendererInterface- Parameters:
x- upper left xy- upper left yz- upper left zzSlab- z for slab check (for set labelsFront)rWidth- pixel countrHeight- pixel count
-
fillTextRect
public void fillTextRect(int x, int y, int z, int zSlab, int widthFill, int heightFill) fills background rectangle for label- Specified by:
fillTextRectin interfaceJmolRendererInterface- Parameters:
x- upper left xy- upper left yz- upper left zzSlab- z value for slabbingwidthFill- pixel countheightFill- pixel count
-
drawString
public void drawString(String str, Font font3d, int xBaseline, int yBaseline, int z, int zSlab, short bgColix) draws the specified string in the current font. no line wrapping -- axis, labels, measures- Specified by:
drawStringin interfaceJmolRendererInterface- Parameters:
str- the Stringfont3d- the Font3DxBaseline- baseline xyBaseline- baseline yz- baseline zzSlab- z for slab calculationbgColix-
-
drawStringNoSlab
public void drawStringNoSlab(String str, Font font3d, int xBaseline, int yBaseline, int z, short bgColix) draws the specified string in the current font. no line wrapping -- echo, frank, hover, molecularOrbital, uccage- Specified by:
drawStringNoSlabin interfaceJmolRendererInterface- Parameters:
str- the Stringfont3d- the Font3DxBaseline- baseline xyBaseline- baseline yz- baseline zbgColix-
-
renderAllStrings
- Specified by:
renderAllStringsin interfaceJmolGraphicsInterface- Overrides:
renderAllStringsin classGData
-
plotText
public void plotText(int x, int y, int z, int argb, int bgargb, String text, Font font3d, JmolRendererInterface jmolRenderer) -
drawImage
public void drawImage(Object objImage, int x, int y, int z, int zSlab, short bgcolix, int width, int height) - Specified by:
drawImagein interfaceJmolRendererInterface
-
plotImage
public void plotImage(int x, int y, int z, Object image, JmolRendererInterface jmolRenderer, short bgcolix, int imageWidth, int imageHeight) -
setFont
-
drawPixel
public void drawPixel(int x, int y, int z) - Specified by:
drawPixelin interfaceJmolRendererInterface
-
drawPoints
public void drawPoints(int count, int[] coordinates, int scale) - Specified by:
drawPointsin interfaceJmolRendererInterface
-
drawDashedLineBits
- Specified by:
drawDashedLineBitsin interfaceJmolRendererInterface
-
drawLineABBits
public void drawLineABBits(int run, int rise, boolean andClip) -
drawLineXYZ
public void drawLineXYZ(int x1, int y1, int z1, int x2, int y2, int z2) - Specified by:
drawLineXYZin interfaceJmolRendererInterface
-
drawLine
public void drawLine(short colixA, short colixB, int x1, int y1, int z1, int x2, int y2, int z2) - Specified by:
drawLinein interfaceJmolRendererInterface
-
drawLineBits
- Specified by:
drawLineBitsin interfaceJmolRendererInterface
-
drawLinePixels
- Specified by:
drawLinePixelsin interfaceJmolGraphicsInterface- Overrides:
drawLinePixelsin classGData
-
drawLineAB
- Specified by:
drawLineABin interfaceJmolRendererInterface
-
fillCylinderXYZ
public void fillCylinderXYZ(short colixA, short colixB, byte endcaps, int diameter, int xA, int yA, int zA, int xB, int yB, int zB) - Specified by:
fillCylinderXYZin interfaceJmolRendererInterface
-
fillCylinderScreen3I
public void fillCylinderScreen3I(byte endcaps, int diameter, P3 screenA, P3 screenB, P3 pt0f, P3 pt1f, float radius) - Specified by:
fillCylinderScreen3Iin interfaceJmolRendererInterface
-
fillCylinder
- Specified by:
fillCylinderin interfaceJmolRendererInterface
-
fillCylinderBits
- Specified by:
fillCylinderBitsin interfaceJmolRendererInterface
-
fillCylinderBits2
public void fillCylinderBits2(short colixA, short colixB, byte endcaps, int diameter, P3 screenA, P3 screenB) - Specified by:
fillCylinderBits2in interfaceJmolRendererInterface
-
fillConeScreen3f
public void fillConeScreen3f(byte endcap, int screenDiameter, P3 screenBase, P3 screenTip, boolean isBarb) - Specified by:
fillConeScreen3fin interfaceJmolRendererInterface
-
drawHermite4
- Specified by:
drawHermite4in interfaceJmolRendererInterface
-
drawHermite7
public void drawHermite7(boolean fill, boolean border, int tension, P3 s0, P3 s1, P3 s2, P3 s3, P3 s4, P3 s5, P3 s6, P3 s7, int aspectRatio, short colixBack) - Specified by:
drawHermite7in interfaceJmolRendererInterface
-
fillHermite
public void fillHermite(int tension, int diameterBeg, int diameterMid, int diameterEnd, P3 s0, P3 s1, P3 s2, P3 s3) - Specified by:
fillHermitein interfaceJmolRendererInterface
-
drawTriangle3C
public void drawTriangle3C(P3i screenA, short colixA, P3i screenB, short colixB, P3i screenC, short colixC, int check) - Specified by:
drawTriangle3Cin interfaceJmolRendererInterface
-
fillTriangleTwoSided
- Specified by:
fillTriangleTwoSidedin interfaceJmolRendererInterface
-
fillTriangle3f
- Specified by:
fillTriangle3fin interfaceJmolRendererInterface
-
fillTriangle3i
public void fillTriangle3i(P3 screenA, P3 screenB, P3 screenC, T3 ptA, T3 ptB, T3 ptC, boolean doShade) - Specified by:
fillTriangle3iin interfaceJmolRendererInterface
-
fillTriangle3CN
public void fillTriangle3CN(P3i screenA, short colixA, short normixA, P3i screenB, short colixB, short normixB, P3i screenC, short colixC, short normixC) - Specified by:
fillTriangle3CNin interfaceJmolRendererInterface
-
fillTriangle3CNBits
public void fillTriangle3CNBits(P3 screenA, short colixA, short normixA, P3 screenB, short colixB, short normixB, P3 screenC, short colixC, short normixC, boolean twoSided) - Specified by:
fillTriangle3CNBitsin interfaceJmolRendererInterface
-
getShadeIndex
public int getShadeIndex(short normix) -
fillQuadrilateral
- Specified by:
fillQuadrilateralin interfaceJmolRendererInterface
-
drawSurface
- Specified by:
drawSurfacein interfaceJmolRendererInterface
-
plotPixelClippedP3i
- Specified by:
plotPixelClippedP3iin interfaceJmolRendererInterface
-
plotImagePixel
public void plotImagePixel(int argb, int x, int y, int z, byte shade, int bgargb, int width, int height, int[] zbuf, Object p, int transpLog) - Specified by:
plotImagePixelin interfaceJmolRendererInterface
-
renderBackground
///////////////////////////////////////////////////////- Specified by:
renderBackgroundin interfaceJmolRendererInterface- Overrides:
renderBackgroundin classGData- Parameters:
jmolRenderer-
-
drawAtom
- Specified by:
drawAtomin interfaceJmolRendererInterface
-
getExportType
public int getExportType()- Specified by:
getExportTypein interfaceJmolRendererInterface
-
getExportName
- Specified by:
getExportNamein interfaceJmolRendererInterface
-
canDoTriangles
public boolean canDoTriangles() -
isCartesianExport
public boolean isCartesianExport() -
initializeExporter
public JmolRendererInterface initializeExporter(Viewer vwr, double privateKey, GData g3d, Map<String, Object> params) - Specified by:
initializeExporterin interfaceJmolRendererInterface
-
finalizeOutput
- Specified by:
finalizeOutputin interfaceJmolRendererInterface
-
drawBond
public void drawBond(P3 atomA, P3 atomB, short colixA, short colixB, byte endcaps, short mad, int bondOrder) - Specified by:
drawBondin interfaceJmolRendererInterface
-
drawEllipse
- Specified by:
drawEllipsein interfaceJmolRendererInterface
-
getPrivateKey
public double getPrivateKey() -
clearFontCache
public void clearFontCache()- Overrides:
clearFontCachein classGData
-
setRotationMatrix
-
renderCrossHairs
public void renderCrossHairs(int[] minMax, int screenWidth, int screenHeight, P3 navOffset, float navDepth) - Specified by:
renderCrossHairsin interfaceJmolRendererInterface- Parameters:
minMax-screenWidth-screenHeight-navOffset-navDepth-
-
initializeOutput
- Specified by:
initializeOutputin interfaceJmolRendererInterface
-
fixTextImageRGB
public static int fixTextImageRGB(int argb)
-