Graphics3D
public class GData
extends java.lang.Object
Modifier and Type | Field | 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 |
|
int |
slab |
|
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 | Description |
---|---|
GData() |
Modifier and Type | Method | Description |
---|---|---|
void |
applyAnaglygh(EnumStereoMode stereoMode,
int[] stereoColors) |
|
void |
beginRendering(Matrix3f stereoRotationMatrix) |
|
void |
changeColixArgb(short id,
int argb) |
|
void |
clear() |
|
void |
clearFontCache() |
|
int |
clipCode(int z) |
|
int |
clipCode3(int x,
int y,
int z) |
|
void |
destroy() |
|
void |
endRendering() |
|
static int |
getAmbientPercent() |
|
short[] |
getBgColixes(short[] bgcolixes) |
|
short |
getChangeableColix(short id,
int argb) |
|
int |
getColorArgbOrGray(short colix) |
|
int |
getDepth() |
gets g3d depth
|
static 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) |
|
static Point3f |
getLightSource() |
|
static int |
getPhongExponent() |
|
int |
getRenderHeight() |
gets g3d height
|
int |
getRenderWidth() |
gets g3d width
|
java.lang.Object |
getScreenImage() |
|
int[] |
getShades(short colix) |
|
int |
getSlab() |
gets g3d slab
|
static boolean |
getSpecular() |
|
static int |
getSpecularExponent() |
|
static int |
getSpecularPercent() |
|
static int |
getSpecularPower() |
|
Vector3f[] |
getTransformedVertexVectors() |
|
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,
Graphics3D 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,
Graphics3D jmolRenderer) |
|
void |
releaseScreenImage() |
|
void |
renderAllStrings(java.lang.Object jmolRenderer) |
|
void |
renderBackground(Graphics3D jmolRenderer) |
|
static int |
roundInt(int a) |
JavaScript won't really have an integer here after integer division.
|
static 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 |
setColix(short colix) |
|
void |
setColor(int color) |
|
void |
setDepth(int depthValue) |
clipping from the front and the back
|
static 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(Point3i pointA,
Point3i pointB,
Point3i pointC) |
|
boolean |
setPass2(boolean antialias) |
|
static 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
|
static void |
setSpecular(boolean val) |
|
static void |
setSpecularExponent(int val) |
log_2(p) in I = df * (N dot L) + sf * (R dot V)^p for faster calculation of
shades
|
static void |
setSpecularPercent(int val) |
sf in I = df * (N dot L) + sf * (R dot V)^p not a percent of anything,
really
|
static void |
setSpecularPower(int val) |
fractional distance to white for specular dot
|
protected void |
setWidthHeight(boolean isAntialiased) |
|
void |
setWindowParameters(int width,
int height,
boolean antialias) |
|
void |
setZShade(boolean zShade,
int zSlab,
int zDepth,
int zPower) |
|
void |
snapshotAnaglyphChannelBytes() |
public ApiPlatform apiPlatform
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 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 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:
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:
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
- public int getRenderWidth()
public int getRenderHeight()
public int getSlab()
public int getDepth()
public boolean isDisplayAntialiased()
public boolean isAntialiased()
public short getChangeableColix(short id, int argb)
public void changeColixArgb(short id, int argb)
public short[] getBgColixes(short[] bgcolixes)
public int getColorArgbOrGray(short colix)
public int[] getShades(short colix)
public void setGreyscaleMode(boolean greyscaleMode)
greyscaleMode
- Flag for greyscale renderingpublic static int getSpecularPower()
public static void setSpecularPower(int val)
val
- public static int getSpecularPercent()
public static void setSpecularPercent(int val)
val
- public static int getSpecularExponent()
public static void setSpecularExponent(int val)
val
- public static int getPhongExponent()
public static void setPhongExponent(int val)
val
- public static int getDiffusePercent()
public static void setDiffusePercent(int val)
val
- public static int getAmbientPercent()
public static void setAmbientPercent(int val)
val
- public static boolean getSpecular()
public static void setSpecular(boolean val)
public static Point3f getLightSource()
public boolean isClipped3(int x, int y, int z)
public boolean isClipped(int x, int y)
public boolean isInDisplayRange(int x, int y)
public boolean isClippedXY(int diameter, int x, int y)
public boolean isClippedZ(int z)
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 byte getFontFid(float fontSize)
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)
public void setNewWindowParametersForExport()
protected void setWidthHeight(boolean isAntialiased)
public void beginRendering(Matrix3f stereoRotationMatrix)
stereoRotationMatrix
- public void endRendering()
public void snapshotAnaglyphChannelBytes()
public java.lang.Object getScreenImage()
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, Graphics3D 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, Graphics3D jmolRenderer)
x
- y
- z
- colorArgbOrGray
- bgColor
- TODOtext
- font3d
- jmolRenderer
- public void renderBackground(Graphics3D 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 Vector3f[] getTransformedVertexVectors()
public void setNoisySurfaceShade(Point3i pointA, Point3i pointB, Point3i pointC)
pointA
- pointB
- pointC
- public static int roundInt(int a)
a
- public void clear()
public void renderAllStrings(java.lang.Object jmolRenderer)