|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmol.export.Export3D
public final class Export3D
Provides high-level graphics primitives for 3D graphics export.
Field Summary | |
---|---|
private short |
colix
|
private JmolExportInterface |
exporter
|
private Graphics3D |
g3d
|
private int |
height
|
private Hermite3D |
hermite3d
|
private javax.vecmath.Point3f |
ptA
|
private javax.vecmath.Point3i |
ptAi
|
private javax.vecmath.Point3f |
ptB
|
private javax.vecmath.Point3i |
ptBi
|
private javax.vecmath.Point3f |
ptC
|
private javax.vecmath.Point3f |
ptD
|
private int |
slab
|
private int |
width
|
Constructor Summary | |
---|---|
Export3D()
|
Method Summary | |
---|---|
int |
calcSurfaceShade(javax.vecmath.Point3i pointA,
javax.vecmath.Point3i pointB,
javax.vecmath.Point3i pointC)
|
boolean |
checkTranslucent(boolean isAlphaTranslucent)
|
void |
drawCircleCentered(short colix,
int diameter,
int x,
int y,
int z,
boolean doFill)
draws a simple circle (draw circle) |
void |
drawCylinderTriangle(int xA,
int yA,
int zA,
int xB,
int yB,
int zB,
int xC,
int yC,
int zC,
int diameter)
|
void |
drawDashedLine(int run,
int rise,
javax.vecmath.Point3i pointA,
javax.vecmath.Point3i pointB)
|
void |
drawDottedLine(javax.vecmath.Point3i pointA,
javax.vecmath.Point3i pointB)
|
void |
drawfillTriangle(int xA,
int yA,
int zA,
int xB,
int yB,
int zB,
int xC,
int yC,
int zC)
|
void |
drawHermite(boolean fill,
boolean border,
int tension,
javax.vecmath.Point3i s0,
javax.vecmath.Point3i s1,
javax.vecmath.Point3i s2,
javax.vecmath.Point3i s3,
javax.vecmath.Point3i s4,
javax.vecmath.Point3i s5,
javax.vecmath.Point3i s6,
javax.vecmath.Point3i s7,
int aspectRatio)
|
void |
drawHermite(int tension,
javax.vecmath.Point3i s0,
javax.vecmath.Point3i s1,
javax.vecmath.Point3i s2,
javax.vecmath.Point3i s3)
|
private void |
drawHLine(int x,
int y,
int z,
int w)
|
void |
drawImage(java.awt.Image image,
int x,
int y,
int z,
int zSlab,
short bgcolix,
int width,
int height)
|
void |
drawLine(int x1,
int y1,
int z1,
int x2,
int y2,
int z2)
|
void |
drawLine(javax.vecmath.Point3i pointA,
javax.vecmath.Point3i pointB)
|
void |
drawLine(short colixA,
short colixB,
int xA,
int yA,
int zA,
int xB,
int yB,
int zB)
|
void |
drawPixel(int x,
int y,
int z)
|
void |
drawPoints(int count,
int[] coordinates)
|
void |
drawQuadrilateral(short colix,
javax.vecmath.Point3i pointA,
javax.vecmath.Point3i pointB,
javax.vecmath.Point3i pointC,
javax.vecmath.Point3i screenD)
|
void |
drawRect(int x,
int y,
int z,
int zSlab,
int rWidth,
int rHeight)
draws a rectangle |
void |
drawString(java.lang.String str,
Font3D font3d,
int xBaseline,
int yBaseline,
int z,
int zSlab)
draws the specified string in the current font. |
void |
drawStringNoSlab(java.lang.String str,
Font3D font3d,
int xBaseline,
int yBaseline,
int z)
draws the specified string in the current font. |
void |
drawTriangle(javax.vecmath.Point3i pointA,
javax.vecmath.Point3i pointB,
javax.vecmath.Point3i pointC,
int check)
|
void |
drawTriangle(javax.vecmath.Point3i pointA,
short colixA,
javax.vecmath.Point3i pointB,
short colixB,
javax.vecmath.Point3i pointC,
short colixC,
int check)
|
private void |
drawVLine(int x,
int y,
int z,
int h)
|
void |
fillCone(byte endcap,
int diameter,
javax.vecmath.Point3f pointBase,
javax.vecmath.Point3f screenTip)
|
void |
fillCone(byte endcap,
int diameter,
javax.vecmath.Point3i pointBase,
javax.vecmath.Point3i screenTip)
|
void |
fillCylinder(byte endcaps,
int mad,
int xA,
int yA,
int zA,
int xB,
int yB,
int zB)
|
void |
fillCylinder(byte endcaps,
int diameter,
javax.vecmath.Point3i pointA,
javax.vecmath.Point3i pointB)
|
void |
fillCylinder(short colixA,
short colixB,
byte endcaps,
int mad,
int xA,
int yA,
int zA,
int xB,
int yB,
int zB)
|
void |
fillCylinderBits(byte endcaps,
int diameter,
javax.vecmath.Point3f pointA,
javax.vecmath.Point3f pointB)
|
void |
fillHermite(int tension,
int diameterBeg,
int diameterMid,
int diameterEnd,
javax.vecmath.Point3i s0,
javax.vecmath.Point3i s1,
javax.vecmath.Point3i s2,
javax.vecmath.Point3i s3)
|
void |
fillQuadrilateral(javax.vecmath.Point3f pointA,
javax.vecmath.Point3f pointB,
javax.vecmath.Point3f pointC,
javax.vecmath.Point3f pointD)
|
void |
fillQuadrilateral(javax.vecmath.Point3i pointA,
short colixA,
short normixA,
javax.vecmath.Point3i pointB,
short colixB,
short normixB,
javax.vecmath.Point3i pointC,
short colixC,
short normixC,
javax.vecmath.Point3i screenD,
short colixD,
short normixD)
|
void |
fillRect(int x,
int y,
int z,
int zSlab,
int widthFill,
int heightFill)
fills background rectangle for label |
void |
fillScreenedCircleCentered(short colixFill,
int diameter,
int x,
int y,
int z)
draws a screened circle ... |
void |
fillSphereCentered(int diameter,
int x,
int y,
int z)
fills a solid sphere |
void |
fillSphereCentered(int diameter,
javax.vecmath.Point3f center)
fills a solid sphere |
void |
fillSphereCentered(int diameter,
javax.vecmath.Point3i center)
fills a solid sphere |
void |
fillTriangle(javax.vecmath.Point3f pointA,
javax.vecmath.Point3f pointB,
javax.vecmath.Point3f pointC)
|
void |
fillTriangle(javax.vecmath.Point3i pointA,
int intensityA,
javax.vecmath.Point3i pointB,
int intensityB,
javax.vecmath.Point3i pointC,
int intensityC)
|
void |
fillTriangle(javax.vecmath.Point3i pointA,
javax.vecmath.Point3i pointB,
javax.vecmath.Point3i pointC)
|
void |
fillTriangle(javax.vecmath.Point3i pointA,
short colixA,
short normixA,
javax.vecmath.Point3i pointB,
short colixB,
short normixB,
javax.vecmath.Point3i pointC,
short colixC,
short normixC)
|
void |
fillTriangle(javax.vecmath.Point3i pointA,
short colixA,
short normixA,
javax.vecmath.Point3i pointB,
short colixB,
short normixB,
javax.vecmath.Point3i pointC,
short colixC,
short normixC,
float factor)
|
void |
fillTriangle(short normix,
int xpointA,
int ypointA,
int zpointA,
int xpointB,
int ypointB,
int zpointB,
int xpointC,
int ypointC,
int zpointC)
|
int |
getColixArgb(short colix)
|
int |
getDepth()
gets g3d depth |
JmolExportInterface |
getExporter()
|
Font3D |
getFont3DCurrent()
|
Font3D |
getFont3DScaled(Font3D font,
float scale)
|
byte |
getFontFid(float fontSize)
|
byte |
getFontFid(java.lang.String fontFace,
float fontSize)
|
java.lang.String |
getHexColorFromIndex(short colix)
|
short |
getInverseNormix(short normix)
|
short |
getNormix(javax.vecmath.Vector3f vector)
|
javax.vecmath.Vector3f |
getNormixVector(short normix)
|
int |
getRenderHeight()
gets g3d height |
int |
getRenderWidth()
gets g3d width |
int |
getSlab()
gets g3d slab |
javax.vecmath.Vector3f[] |
getTransformedVertexVectors()
|
boolean |
haveTranslucentObjects()
|
boolean |
isAntialiased()
is full scene / oversampling antialiasing in effect |
boolean |
isClippedXY(int diameter,
int x,
int y)
|
boolean |
isClippedZ(int z)
|
boolean |
isDirectedTowardsCamera(short normix)
|
boolean |
isInDisplayRange(int x,
int y)
|
(package private) void |
plotPixelClipped(int x,
int y,
int z)
|
void |
plotPixelClipped(javax.vecmath.Point3i screen)
|
void |
plotPixelClippedNoSlab(int argb,
int x,
int y,
int z)
|
void |
renderBackground()
|
void |
renderEllipsoid(int x,
int y,
int z,
int diameter,
javax.vecmath.Matrix3f mToEllipsoidal,
double[] coef,
javax.vecmath.Matrix4f mDeriv,
int selectedOctant,
javax.vecmath.Point3i[] octantPoints)
|
void |
renderIsosurface(javax.vecmath.Point3f[] vertices,
short colix,
short[] colixes,
javax.vecmath.Vector3f[] normals,
int[][] indices,
java.util.BitSet bsFaces,
int nVertices,
int faceVertexMax)
|
boolean |
setColix(short colix)
sets current color from colix color index |
void |
setFont(byte fid)
|
void |
setg3dExporter(Graphics3D g3d,
JmolExportInterface exporter)
|
void |
setRenderer(ShapeRenderer shapeRenderer)
|
void |
setSlab(int slabValue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Graphics3D g3d
private short colix
private Hermite3D hermite3d
private int width
private int height
private int slab
private JmolExportInterface exporter
private javax.vecmath.Point3f ptA
private javax.vecmath.Point3f ptB
private javax.vecmath.Point3f ptC
private javax.vecmath.Point3f ptD
private javax.vecmath.Point3i ptAi
private javax.vecmath.Point3i ptBi
Constructor Detail |
---|
public Export3D()
Method Detail |
---|
public JmolExportInterface getExporter()
getExporter
in interface JmolRendererInterface
public void setg3dExporter(Graphics3D g3d, JmolExportInterface exporter)
setg3dExporter
in interface JmolRendererInterface
public void setSlab(int slabValue)
setSlab
in interface JmolRendererInterface
public void setRenderer(ShapeRenderer shapeRenderer)
setRenderer
in interface JmolRendererInterface
public void renderBackground()
public void fillScreenedCircleCentered(short colixFill, int diameter, int x, int y, int z)
fillScreenedCircleCentered
in interface JmolRendererInterface
colixFill
- the color indexdiameter
- the pixel diameterx
- center xy
- center yz
- center zpublic void drawCircleCentered(short colix, int diameter, int x, int y, int z, boolean doFill)
drawCircleCentered
in interface JmolRendererInterface
colix
- the color indexdiameter
- the pixel diameterx
- center xy
- center yz
- center zdoFill
- (not implemented in exporters)public void fillSphereCentered(int diameter, int x, int y, int z)
fillSphereCentered
in interface JmolRendererInterface
diameter
- pixel countx
- center xy
- center yz
- center zpublic void fillSphereCentered(int diameter, javax.vecmath.Point3i center)
fillSphereCentered
in interface JmolRendererInterface
diameter
- pixel countcenter
- javax.vecmath.Point3i defining the centerpublic void fillSphereCentered(int diameter, javax.vecmath.Point3f center)
fillSphereCentered
in interface JmolRendererInterface
diameter
- pixel countcenter
- a javax.vecmath.Point3f ... floats are casted to intspublic void drawRect(int x, int y, int z, int zSlab, int rWidth, int rHeight)
drawRect
in interface JmolRendererInterface
x
- upper left xy
- upper left yz
- upper left zzSlab
- z for slab check (for set labelsFront)rWidth
- pixel countrHeight
- pixel countprivate void drawHLine(int x, int y, int z, int w)
private void drawVLine(int x, int y, int z, int h)
public void fillRect(int x, int y, int z, int zSlab, int widthFill, int heightFill)
fillRect
in interface JmolRendererInterface
x
- upper left xy
- upper left yz
- upper left zzSlab
- z value for slabbingwidthFill
- pixel countheightFill
- pixel countpublic void drawString(java.lang.String str, Font3D font3d, int xBaseline, int yBaseline, int z, int zSlab)
drawString
in interface JmolRendererInterface
str
- the Stringfont3d
- the Font3DxBaseline
- baseline xyBaseline
- baseline yz
- baseline zzSlab
- z for slab calculationpublic void drawStringNoSlab(java.lang.String str, Font3D font3d, int xBaseline, int yBaseline, int z)
drawStringNoSlab
in interface JmolRendererInterface
str
- the Stringfont3d
- the Font3DxBaseline
- baseline xyBaseline
- baseline yz
- baseline zpublic void drawImage(java.awt.Image image, int x, int y, int z, int zSlab, short bgcolix, int width, int height)
drawImage
in interface JmolRendererInterface
public void drawPixel(int x, int y, int z)
drawPixel
in interface JmolRendererInterface
void plotPixelClipped(int x, int y, int z)
public void plotPixelClippedNoSlab(int argb, int x, int y, int z)
plotPixelClippedNoSlab
in interface JmolRendererInterface
public void plotPixelClipped(javax.vecmath.Point3i screen)
plotPixelClipped
in interface JmolRendererInterface
public void drawPoints(int count, int[] coordinates)
drawPoints
in interface JmolRendererInterface
public void drawDashedLine(int run, int rise, javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB)
drawDashedLine
in interface JmolRendererInterface
public void drawDottedLine(javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB)
drawDottedLine
in interface JmolRendererInterface
public void drawLine(int x1, int y1, int z1, int x2, int y2, int z2)
drawLine
in interface JmolRendererInterface
public void drawLine(short colixA, short colixB, int xA, int yA, int zA, int xB, int yB, int zB)
drawLine
in interface JmolRendererInterface
public void drawLine(javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB)
drawLine
in interface JmolRendererInterface
public void fillCylinder(short colixA, short colixB, byte endcaps, int mad, int xA, int yA, int zA, int xB, int yB, int zB)
fillCylinder
in interface JmolRendererInterface
public void fillCylinder(byte endcaps, int mad, int xA, int yA, int zA, int xB, int yB, int zB)
fillCylinder
in interface JmolRendererInterface
public void fillCylinder(byte endcaps, int diameter, javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB)
fillCylinder
in interface JmolRendererInterface
public void fillCylinderBits(byte endcaps, int diameter, javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB)
fillCylinderBits
in interface JmolRendererInterface
public void fillCone(byte endcap, int diameter, javax.vecmath.Point3i pointBase, javax.vecmath.Point3i screenTip)
fillCone
in interface JmolRendererInterface
public void fillCone(byte endcap, int diameter, javax.vecmath.Point3f pointBase, javax.vecmath.Point3f screenTip)
fillCone
in interface JmolRendererInterface
public void drawHermite(int tension, javax.vecmath.Point3i s0, javax.vecmath.Point3i s1, javax.vecmath.Point3i s2, javax.vecmath.Point3i s3)
drawHermite
in interface JmolRendererInterface
public void drawHermite(boolean fill, boolean border, int tension, javax.vecmath.Point3i s0, javax.vecmath.Point3i s1, javax.vecmath.Point3i s2, javax.vecmath.Point3i s3, javax.vecmath.Point3i s4, javax.vecmath.Point3i s5, javax.vecmath.Point3i s6, javax.vecmath.Point3i s7, int aspectRatio)
drawHermite
in interface JmolRendererInterface
public void fillHermite(int tension, int diameterBeg, int diameterMid, int diameterEnd, javax.vecmath.Point3i s0, javax.vecmath.Point3i s1, javax.vecmath.Point3i s2, javax.vecmath.Point3i s3)
fillHermite
in interface JmolRendererInterface
public void drawTriangle(javax.vecmath.Point3i pointA, short colixA, javax.vecmath.Point3i pointB, short colixB, javax.vecmath.Point3i pointC, short colixC, int check)
drawTriangle
in interface JmolRendererInterface
public void drawTriangle(javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB, javax.vecmath.Point3i pointC, int check)
drawTriangle
in interface JmolRendererInterface
public void drawCylinderTriangle(int xA, int yA, int zA, int xB, int yB, int zB, int xC, int yC, int zC, int diameter)
drawCylinderTriangle
in interface JmolRendererInterface
public void drawfillTriangle(int xA, int yA, int zA, int xB, int yB, int zB, int xC, int yC, int zC)
drawfillTriangle
in interface JmolRendererInterface
public void fillTriangle(javax.vecmath.Point3i pointA, int intensityA, javax.vecmath.Point3i pointB, int intensityB, javax.vecmath.Point3i pointC, int intensityC)
fillTriangle
in interface JmolRendererInterface
public void fillTriangle(javax.vecmath.Point3i pointA, short colixA, short normixA, javax.vecmath.Point3i pointB, short colixB, short normixB, javax.vecmath.Point3i pointC, short colixC, short normixC)
fillTriangle
in interface JmolRendererInterface
public void fillTriangle(short normix, int xpointA, int ypointA, int zpointA, int xpointB, int ypointB, int zpointB, int xpointC, int ypointC, int zpointC)
fillTriangle
in interface JmolRendererInterface
public void fillTriangle(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Point3f pointC)
fillTriangle
in interface JmolRendererInterface
public void fillTriangle(javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB, javax.vecmath.Point3i pointC)
fillTriangle
in interface JmolRendererInterface
public void fillTriangle(javax.vecmath.Point3i pointA, short colixA, short normixA, javax.vecmath.Point3i pointB, short colixB, short normixB, javax.vecmath.Point3i pointC, short colixC, short normixC, float factor)
fillTriangle
in interface JmolRendererInterface
public void drawQuadrilateral(short colix, javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB, javax.vecmath.Point3i pointC, javax.vecmath.Point3i screenD)
drawQuadrilateral
in interface JmolRendererInterface
public void fillQuadrilateral(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Point3f pointC, javax.vecmath.Point3f pointD)
fillQuadrilateral
in interface JmolRendererInterface
public void fillQuadrilateral(javax.vecmath.Point3i pointA, short colixA, short normixA, javax.vecmath.Point3i pointB, short colixB, short normixB, javax.vecmath.Point3i pointC, short colixC, short normixC, javax.vecmath.Point3i screenD, short colixD, short normixD)
fillQuadrilateral
in interface JmolRendererInterface
public void renderIsosurface(javax.vecmath.Point3f[] vertices, short colix, short[] colixes, javax.vecmath.Vector3f[] normals, int[][] indices, java.util.BitSet bsFaces, int nVertices, int faceVertexMax)
renderIsosurface
in interface JmolRendererInterface
public void renderEllipsoid(int x, int y, int z, int diameter, javax.vecmath.Matrix3f mToEllipsoidal, double[] coef, javax.vecmath.Matrix4f mDeriv, int selectedOctant, javax.vecmath.Point3i[] octantPoints)
renderEllipsoid
in interface JmolRendererInterface
public boolean isAntialiased()
isAntialiased
in interface JmolRendererInterface
public boolean checkTranslucent(boolean isAlphaTranslucent)
checkTranslucent
in interface JmolRendererInterface
public boolean haveTranslucentObjects()
haveTranslucentObjects
in interface JmolRendererInterface
public int getRenderWidth()
getRenderWidth
in interface JmolRendererInterface
public int getRenderHeight()
getRenderHeight
in interface JmolRendererInterface
public int getSlab()
getSlab
in interface JmolRendererInterface
public int getDepth()
getDepth
in interface JmolRendererInterface
public boolean setColix(short colix)
setColix
in interface JmolRendererInterface
colix
- the color index
public void setFont(byte fid)
setFont
in interface JmolRendererInterface
public Font3D getFont3DCurrent()
getFont3DCurrent
in interface JmolRendererInterface
public boolean isInDisplayRange(int x, int y)
isInDisplayRange
in interface JmolRendererInterface
public boolean isClippedZ(int z)
isClippedZ
in interface JmolRendererInterface
public boolean isClippedXY(int diameter, int x, int y)
isClippedXY
in interface JmolRendererInterface
public int getColixArgb(short colix)
getColixArgb
in interface JmolRendererInterface
public java.lang.String getHexColorFromIndex(short colix)
getHexColorFromIndex
in interface JmolRendererInterface
public int calcSurfaceShade(javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB, javax.vecmath.Point3i pointC)
calcSurfaceShade
in interface JmolRendererInterface
public byte getFontFid(java.lang.String fontFace, float fontSize)
getFontFid
in interface JmolRendererInterface
public boolean isDirectedTowardsCamera(short normix)
isDirectedTowardsCamera
in interface JmolRendererInterface
public short getNormix(javax.vecmath.Vector3f vector)
getNormix
in interface JmolRendererInterface
public short getInverseNormix(short normix)
getInverseNormix
in interface JmolRendererInterface
public javax.vecmath.Vector3f[] getTransformedVertexVectors()
getTransformedVertexVectors
in interface JmolRendererInterface
public javax.vecmath.Vector3f getNormixVector(short normix)
getNormixVector
in interface JmolRendererInterface
public Font3D getFont3DScaled(Font3D font, float scale)
getFont3DScaled
in interface JmolRendererInterface
public byte getFontFid(float fontSize)
getFontFid
in interface JmolRendererInterface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |