public class GData extends java.lang.Object implements JmolGraphicsInterface
Modifier and Type | Field and Description |
---|---|
int |
ambientOcclusion |
boolean |
antialiasEnabled |
protected boolean |
antialiasThisFrame |
javajs.api.GenericPlatform |
apiPlatform |
int |
argbCurrent |
int |
argbNoisyDn |
int |
argbNoisyUp |
protected java.lang.Object |
backgroundImage |
int |
bgcolor |
int |
bufferSize |
protected short[] |
changeableColixMap |
protected short |
colixCurrent |
protected javajs.awt.Font |
currentFont |
boolean |
currentlyRendering |
int |
depth |
protected int |
displayMaxX |
protected int |
displayMaxY |
protected int |
displayMinX |
protected int |
displayMinY |
static byte |
ENDCAPS_FLAT |
static byte |
ENDCAPS_NONE |
static byte |
ENDCAPS_OPEN |
static byte |
ENDCAPS_OPENEND |
static byte |
ENDCAPS_SPHERICAL |
static int |
EXPORT_CARTESIAN |
static int |
EXPORT_NOT |
static int |
EXPORT_RAYTRACER |
protected java.lang.Object |
graphicsForMetrics |
int |
height |
protected int |
ht3 |
protected boolean |
inGreyscaleMode |
boolean |
isPass2 |
protected boolean |
newAntialiasing |
protected int |
newWindowHeight |
protected int |
newWindowWidth |
protected static short |
normixCount |
Shader |
shader |
int |
slab |
protected int |
textY |
protected javajs.util.V3[] |
transformedVectors |
boolean |
translucentCoverOnly |
protected Viewer |
vwr |
int |
width |
protected int |
windowHeight |
protected int |
windowWidth |
static int |
xGT |
int |
xLast |
static int |
xLT |
static int |
yGT |
int |
yLast |
static int |
yLT |
static int |
zGT |
static int |
zLT |
Constructor and Description |
---|
GData()
It is possible to instantiate this class with no Graphics3D.
|
Modifier and Type | Method and Description |
---|---|
void |
addRenderer(int tok) |
void |
applyAnaglygh(STER stereoMode,
int[] stereoColors) |
void |
beginRendering(javajs.util.M3 stereoRotationMatrix,
boolean translucentMode,
boolean isImageWrite,
boolean renderLow) |
void |
changeColixArgb(int id,
int argb) |
void |
clear() |
void |
clearFontCache() |
int |
clipCode(int z) |
int |
clipCode3(int x,
int y,
int z) |
void |
destroy() |
void |
endRendering() |
int |
getAmbientPercent() |
boolean |
getCel() |
int |
getCelPower() |
short |
getChangeableColix(int id,
int argb) |
int |
getColorArgbOrGray(short colix) |
int |
getDiffusePercent() |
javajs.awt.Font |
getFont3D(float fontSize) |
javajs.awt.Font |
getFont3DCurrent() |
javajs.awt.Font |
getFont3DFS(java.lang.String fontFace,
float fontSize) |
javajs.awt.Font |
getFont3DFSS(java.lang.String fontFace,
java.lang.String fontStyle,
float fontSize) |
javajs.awt.Font |
getFont3DScaled(javajs.awt.Font font,
float scale) |
byte |
getFontFid(float fontSize) |
byte |
getFontFidFS(java.lang.String fontFace,
float fontSize) |
static void |
getHermiteList(int tension,
javajs.util.T3 p0,
javajs.util.T3 p1,
javajs.util.T3 p2,
javajs.util.T3 p3,
javajs.util.T3 p4,
javajs.util.T3[] list,
int index0,
int n,
boolean isPt)
Used by Navigator, BioShapeRenderer, and DrawRenderer
|
javajs.util.V3 |
getLightSource() |
int |
getPhongExponent() |
java.lang.Object |
getScreenImage(boolean isImageWrite) |
int[] |
getShades(short colix) |
boolean |
getSpecular() |
int |
getSpecularExponent() |
int |
getSpecularPercent() |
int |
getSpecularPower() |
int |
getTextPosition() |
javajs.util.V3[] |
getTransformedVertexVectors() |
void |
initialize(Viewer vwr,
javajs.api.GenericPlatform apiPlatform) |
boolean |
isAntialiased()
is full scene / oversampling antialiasing in effect
|
boolean |
isClipped(int x,
int y) |
boolean |
isClipped3(int x,
int y,
int z) |
boolean |
isClippedXY(int diameter,
int x,
int y) |
boolean |
isClippedZ(int z) |
boolean |
isDirectedTowardsCamera(short normix) |
boolean |
isInDisplayRange(int x,
int y) |
void |
plotImage(int x,
int y,
int z,
java.lang.Object image,
JmolRendererInterface jmolRenderer,
short bgcolix,
int width,
int height) |
void |
plotText(int x,
int y,
int z,
int colorArgbOrGray,
int bgColor,
java.lang.String text,
javajs.awt.Font font3d,
JmolRendererInterface jmolRenderer) |
void |
releaseScreenImage() |
void |
renderAllStrings(java.lang.Object jmolRenderer) |
void |
renderBackground(JmolRendererInterface jmolRenderer) |
static int |
roundInt(int a)
JavaScript won't really have an integer here after integer division.
|
void |
setAmbientOcclusion(int value) |
void |
setAmbientPercent(int val)
fractional distance from black for ambient color
|
void |
setBackgroundArgb(int argb)
sets background color to the specified argb value
|
void |
setBackgroundImage(java.lang.Object image) |
void |
setBackgroundTransparent(boolean TF) |
boolean |
setC(short colix) |
void |
setCel(boolean val) |
void |
setCelPower(int celPower) |
void |
setColor(int argb) |
void |
setDepth(int depthValue)
clipping from the front and the back
|
void |
setDiffusePercent(int val)
df in I = df * (N dot L) + sf * (R dot V)^p
|
void |
setFont(javajs.awt.Font font3d) |
void |
setFontFid(byte fid) |
void |
setGreyscaleMode(boolean greyscaleMode)
controls greyscale rendering
|
void |
setNewWindowParametersForExport() |
boolean |
setPass2(boolean antialias) |
void |
setPhongExponent(int val)
p in I = df * (N dot L) + sf * (R dot V)^p
|
void |
setSlab(int slabValue)
clipping from the front and the back
|
void |
setSlabAndZShade(int slab,
int depth,
int zSlab,
int zDepth,
int zPower) |
void |
setSpecular(boolean val) |
void |
setSpecularExponent(int val)
log_2(p) in I = df * (N dot L) + sf * (R dot V)^p for faster calculation of
shades
|
void |
setSpecularPercent(int val)
sf in I = df * (N dot L) + sf * (R dot V)^p not a percent of anything,
really
|
void |
setSpecularPower(int val)
fractional distance to white for specular dot
|
void |
setTextPosition(int y) |
protected void |
setWidthHeight(boolean isAntialiased) |
void |
setWindowParameters(int width,
int height,
boolean antialias) |
protected void |
setWinParams(int width,
int height,
boolean antialias) |
void |
snapshotAnaglyphChannelBytes() |
public javajs.api.GenericPlatform apiPlatform
public boolean translucentCoverOnly
public boolean currentlyRendering
public boolean antialiasEnabled
protected int windowWidth
protected int windowHeight
protected int displayMinX
protected int displayMaxX
protected int displayMinY
protected int displayMaxY
protected boolean antialiasThisFrame
protected boolean inGreyscaleMode
protected short[] changeableColixMap
protected java.lang.Object backgroundImage
protected int newWindowWidth
protected int newWindowHeight
protected boolean newAntialiasing
public int bgcolor
public int xLast
public int yLast
public int slab
public int depth
public int width
public int height
public int ambientOcclusion
protected short colixCurrent
public int argbCurrent
protected int ht3
public boolean isPass2
protected int textY
public int bufferSize
public Shader shader
protected Viewer vwr
public static final byte ENDCAPS_NONE
public static final byte ENDCAPS_OPEN
public static final byte ENDCAPS_FLAT
public static final byte ENDCAPS_SPHERICAL
public static final byte ENDCAPS_OPENEND
protected java.lang.Object graphicsForMetrics
public static final int EXPORT_RAYTRACER
public static final int EXPORT_CARTESIAN
public static final int EXPORT_NOT
public static final int yGT
public static final int yLT
public static final int xGT
public static final int xLT
public static final int zGT
public static final int zLT
public int argbNoisyUp
public int argbNoisyDn
protected javajs.util.V3[] transformedVectors
protected static short normixCount
protected javajs.awt.Font currentFont
public GData()
public void initialize(Viewer vwr, javajs.api.GenericPlatform apiPlatform)
public void setDepth(int depthValue)
the plane is defined as a percentage from the back of the image to the front
for depth values:
depthValue
- rear clipping percentage [0,100]public void setSlab(int slabValue)
the plane is defined as a percentage from the back of the image to the front
For slab values:
setSlab
in interface JmolGraphicsInterface
slabValue
- front clipping percentage [0,100]public void setSlabAndZShade(int slab, int depth, int zSlab, int zDepth, int zPower)
setSlabAndZShade
in interface JmolGraphicsInterface
zSlab
- for zShadezDepth
- for zShadezPower
- public void setAmbientOcclusion(int value)
public boolean isAntialiased()
isAntialiased
in interface JmolGraphicsInterface
public short getChangeableColix(int id, int argb)
public void changeColixArgb(int id, int argb)
public int getColorArgbOrGray(short colix)
public int[] getShades(short colix)
public void setGreyscaleMode(boolean greyscaleMode)
greyscaleMode
- Flag for greyscale renderingpublic int getSpecularPower()
public void setSpecularPower(int val)
val
- public int getSpecularPercent()
public void setSpecularPercent(int val)
val
- public int getSpecularExponent()
public void setSpecularExponent(int val)
val
- public int getPhongExponent()
public void setPhongExponent(int val)
val
- public int getDiffusePercent()
public void setDiffusePercent(int val)
val
- public int getAmbientPercent()
public void setAmbientPercent(int val)
val
- public boolean getSpecular()
public void setSpecular(boolean val)
public void setCel(boolean val)
public boolean getCel()
public int getCelPower()
public void setCelPower(int celPower)
public javajs.util.V3 getLightSource()
public boolean isClipped3(int x, int y, int z)
public boolean isClipped(int x, int y)
public boolean isInDisplayRange(int x, int y)
isInDisplayRange
in interface JmolGraphicsInterface
public boolean isClippedXY(int diameter, int x, int y)
isClippedXY
in interface JmolGraphicsInterface
public boolean isClippedZ(int z)
public int clipCode3(int x, int y, int z)
public int clipCode(int z)
public javajs.awt.Font getFont3D(float fontSize)
public javajs.awt.Font getFont3DFS(java.lang.String fontFace, float fontSize)
public byte getFontFidFS(java.lang.String fontFace, float fontSize)
public javajs.awt.Font getFont3DFSS(java.lang.String fontFace, java.lang.String fontStyle, float fontSize)
public javajs.awt.Font getFont3DScaled(javajs.awt.Font font, float scale)
public byte getFontFid(float fontSize)
public void setBackgroundTransparent(boolean TF)
TF
- public void setBackgroundArgb(int argb)
argb
- an argb value with alpha channelpublic void setBackgroundImage(java.lang.Object image)
public void setWindowParameters(int width, int height, boolean antialias)
protected void setWinParams(int width, int height, boolean antialias)
public void setNewWindowParametersForExport()
protected void setWidthHeight(boolean isAntialiased)
public void beginRendering(javajs.util.M3 stereoRotationMatrix, boolean translucentMode, boolean isImageWrite, boolean renderLow)
stereoRotationMatrix
- translucentMode
- isImageWrite
- renderLow
- TODOpublic void endRendering()
public void snapshotAnaglyphChannelBytes()
public java.lang.Object getScreenImage(boolean isImageWrite)
isImageWrite
- public void releaseScreenImage()
public void applyAnaglygh(STER stereoMode, int[] stereoColors)
stereoMode
- stereoColors
- public boolean setPass2(boolean antialias)
antialias
- public void destroy()
public void clearFontCache()
public void plotImage(int x, int y, int z, java.lang.Object image, JmolRendererInterface jmolRenderer, short bgcolix, int width, int height)
x
- y
- z
- image
- jmolRenderer
- bgcolix
- width
- height
- public void plotText(int x, int y, int z, int colorArgbOrGray, int bgColor, java.lang.String text, javajs.awt.Font font3d, JmolRendererInterface jmolRenderer)
x
- y
- z
- colorArgbOrGray
- bgColor
- TODOtext
- font3d
- jmolRenderer
- public void renderBackground(JmolRendererInterface jmolRenderer)
jmolRenderer
- public void setFont(javajs.awt.Font font3d)
font3d
- public void setFontFid(byte fid)
fid
- public void setColor(int argb)
public boolean setC(short colix)
colix
- public boolean isDirectedTowardsCamera(short normix)
normix
- public static int roundInt(int a)
a
- public void clear()
public void renderAllStrings(java.lang.Object jmolRenderer)
renderAllStrings
in interface JmolGraphicsInterface
public void addRenderer(int tok)
tok
- public static void getHermiteList(int tension, javajs.util.T3 p0, javajs.util.T3 p1, javajs.util.T3 p2, javajs.util.T3 p3, javajs.util.T3 p4, javajs.util.T3[] list, int index0, int n, boolean isPt)
tension
- p0
- p1
- p2
- p3
- p4
- list
- index0
- n
- isPt
- public void setTextPosition(int y)
public int getTextPosition()
public javajs.util.V3[] getTransformedVertexVectors()
public javajs.awt.Font getFont3DCurrent()