public class GData extends java.lang.Object implements JmolGraphicsInterface
Modifier and Type | Field and Description |
---|---|
protected boolean |
antialiasEnabled |
protected boolean |
antialiasThisFrame |
ApiPlatform |
apiPlatform |
protected int |
argbCurrent |
protected java.lang.Object |
backgroundImage |
int |
bgcolor |
int |
bufferSize |
protected short[] |
changeableColixMap |
protected short |
colixCurrent |
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 boolean |
inGreyscaleMode |
boolean |
isPass2 |
protected boolean |
newAntialiasing |
protected int |
newWindowHeight |
protected int |
newWindowWidth |
Shader |
shader |
int |
slab |
boolean |
translucentCoverOnly |
int |
width |
protected int |
windowHeight |
protected int |
windowWidth |
static int |
xGT |
int |
xLast |
static int |
xLT |
static int |
yGT |
int |
yLast |
static int |
yLT |
int |
zDepth |
static int |
zGT |
static int |
zLT |
int |
zShadeB |
int |
zShadeG |
int |
zShadePower |
int |
zShadeR |
int |
zSlab |
Constructor and Description |
---|
GData() |
Modifier and Type | Method and Description |
---|---|
void |
applyAnaglygh(EnumStereoMode stereoMode,
int[] stereoColors) |
void |
beginRendering(Matrix3f stereoRotationMatrix,
boolean translucentMode,
boolean isImageWrite) |
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() |
short[] |
getBgColixes(short[] bgcolixes) |
boolean |
getCel() |
short |
getChangeableColix(int id,
int argb) |
int |
getColorArgbOrGray(short colix) |
int |
getDepth()
gets g3d depth
|
int |
getDiffusePercent() |
JmolFont |
getFont3D(float fontSize) |
JmolFont |
getFont3DCurrent() |
JmolFont |
getFont3DFS(java.lang.String fontFace,
float fontSize) |
JmolFont |
getFont3DFSS(java.lang.String fontFace,
java.lang.String fontStyle,
float fontSize) |
JmolFont |
getFont3DScaled(JmolFont font,
float scale) |
byte |
getFontFid(float fontSize) |
byte |
getFontFidFS(java.lang.String fontFace,
float fontSize) |
static int |
getFontStyleID(java.lang.String fontStyle) |
V3 |
getLightSource() |
int |
getPhongExponent() |
int |
getRenderHeight()
gets g3d height
|
int |
getRenderWidth()
gets g3d width
|
java.lang.Object |
getScreenImage(boolean isImageWrite) |
static int |
getScreenOctant(P3 pt) |
int[] |
getShades(short colix) |
int |
getSlab()
gets g3d slab
|
boolean |
getSpecular() |
int |
getSpecularExponent() |
int |
getSpecularPercent() |
int |
getSpecularPower() |
V3[] |
getTransformedVertexVectors() |
boolean |
getTranslucentCoverOnly() |
void |
initialize(ApiPlatform 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 |
isDisplayAntialiased()
is full scene / oversampling antialiasing GENERALLY in effect
|
boolean |
isInDisplayRange(int x,
int y) |
boolean |
isPass2() |
void |
plotImage(int x,
int y,
int z,
java.awt.Image 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,
JmolFont 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 |
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) |
void |
setCel(boolean val) |
boolean |
setColix(short colix) |
void |
setColor(int color) |
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(JmolFont font3d) |
void |
setFontFid(byte fid) |
void |
setGreyscaleMode(boolean greyscaleMode)
controls greyscale rendering
|
void |
setNewWindowParametersForExport() |
void |
setNoisySurfaceShade(P3i pointA,
P3i pointB,
P3i pointC) |
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 |
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 |
setTranslucentCoverOnly(boolean TF) |
protected void |
setWidthHeight(boolean isAntialiased) |
void |
setWindowParameters(int width,
int height,
boolean antialias) |
protected void |
setWinParams(int width,
int height,
boolean antialias) |
void |
setZShade(boolean zShade,
int zSlab,
int zDepth,
int zPower) |
protected void |
setZShade2(int zSlab,
int zDepth,
int zPower) |
void |
snapshotAnaglyphChannelBytes() |
public ApiPlatform apiPlatform
public boolean translucentCoverOnly
protected int windowWidth
protected int windowHeight
protected int displayMinX
protected int displayMaxX
protected int displayMinY
protected int displayMaxY
protected boolean antialiasThisFrame
protected boolean antialiasEnabled
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 zSlab
public int zDepth
public int zShadePower
protected short colixCurrent
protected int argbCurrent
public int bufferSize
public Shader shader
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
public int zShadeR
public int zShadeG
public int zShadeB
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 boolean isPass2
public void setTranslucentCoverOnly(boolean TF)
public boolean getTranslucentCoverOnly()
public void initialize(ApiPlatform 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:
setDepth
in interface JmolGraphicsInterface
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 setZShade(boolean zShade, int zSlab, int zDepth, int zPower)
zShade
- whether to shade along z front to backzSlab
- for zShadezDepth
- for zShadezPower
- protected void setZShade2(int zSlab, int zDepth, int zPower)
public int getRenderWidth()
getRenderWidth
in interface JmolGraphicsInterface
public int getRenderHeight()
getRenderHeight
in interface JmolGraphicsInterface
public int getSlab()
getSlab
in interface JmolGraphicsInterface
public int getDepth()
getDepth
in interface JmolGraphicsInterface
public boolean isDisplayAntialiased()
public boolean isAntialiased()
isAntialiased
in interface JmolGraphicsInterface
public short getChangeableColix(int id, int argb)
public void changeColixArgb(int id, int argb)
public short[] getBgColixes(short[] bgcolixes)
public int getColorArgbOrGray(short colix)
getColorArgbOrGray
in interface JmolGraphicsInterface
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 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)
isClippedZ
in interface JmolGraphicsInterface
public int clipCode3(int x, int y, int z)
public int clipCode(int z)
public JmolFont getFont3D(float fontSize)
public JmolFont getFont3DFS(java.lang.String fontFace, float fontSize)
public byte getFontFidFS(java.lang.String fontFace, float fontSize)
public JmolFont getFont3DFSS(java.lang.String fontFace, java.lang.String fontStyle, float fontSize)
public JmolFont getFont3DScaled(JmolFont font, float scale)
getFont3DScaled
in interface JmolGraphicsInterface
public byte getFontFid(float fontSize)
getFontFid
in interface JmolGraphicsInterface
public static int getFontStyleID(java.lang.String fontStyle)
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(Matrix3f stereoRotationMatrix, boolean translucentMode, boolean isImageWrite)
stereoRotationMatrix
- translucentMode
- isImageWrite
- public void endRendering()
public void snapshotAnaglyphChannelBytes()
public java.lang.Object getScreenImage(boolean isImageWrite)
isImageWrite
- public void releaseScreenImage()
public void applyAnaglygh(EnumStereoMode 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.awt.Image 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, JmolFont font3d, JmolRendererInterface jmolRenderer)
x
- y
- z
- colorArgbOrGray
- bgColor
- TODOtext
- font3d
- jmolRenderer
- public void renderBackground(JmolRendererInterface jmolRenderer)
jmolRenderer
- public JmolFont getFont3DCurrent()
public void setFont(JmolFont font3d)
font3d
- public void setFontFid(byte fid)
fid
- public void setColor(int color)
color
- public boolean isPass2()
public boolean setColix(short colix)
colix
- public boolean isDirectedTowardsCamera(short normix)
normix
- public V3[] getTransformedVertexVectors()
public void setNoisySurfaceShade(P3i pointA, P3i pointB, P3i pointC)
pointA
- pointB
- pointC
- public static int roundInt(int a)
a
- public void clear()
public void renderAllStrings(java.lang.Object jmolRenderer)
renderAllStrings
in interface JmolGraphicsInterface
public static int getScreenOctant(P3 pt)