org.jmol.g3d
Class Graphics3D

java.lang.Object
  extended by org.jmol.g3d.Graphics3D

public final class Graphics3D
extends java.lang.Object

Provides high-level graphics primitives for 3D visualization.

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

Field Summary
static short AQUA
           
static short BLACK
           
static short BLUE
           
static java.awt.Color COLOR_GOLD
           
static java.awt.Color COLOR_HOTPINK
           
static java.awt.Color COLOR_TEAL
           
static int[] colorArgbs
           
static java.lang.String[] colorNames
           
static short CYAN
           
static byte ENDCAPS_FLAT
           
static byte ENDCAPS_NONE
           
static byte ENDCAPS_OPEN
           
static byte ENDCAPS_SPHERICAL
           
static short FUCHSIA
           
static int GEODESIC_START_NEIGHBOR_COUNT
           
static int GEODESIC_START_VERTEX_COUNT
           
static short GOLD
           
static short GRAY
           
static short GREEN
           
static int HIGHEST_GEODESIC_LEVEL
           
static short HOTPINK
           
static byte intensitySpecularSurfaceLimit
           
static short LIGHTGRAY
           
static short LIME
           
static short MAGENTA
           
static short MAROON
           
static short NAVY
           
static short NULL_COLIX
           
static short OLIVE
           
static short OPAQUE
           
static short ORANGE
           
static short PINK
           
static short PURPLE
           
static short RED
           
static byte shadeLast
           
static byte shadeMax
           
static byte shadeNormal
           
static short SILVER
           
static short SPECIAL_COLIX_MAX
           
static short TEAL
           
static short TRANSLUCENT
           
static short UNRECOGNIZED
           
static short WHITE
           
static short YELLOW
           
 
Constructor Summary
Graphics3D(java.awt.Component awtComponent)
          Allocates a g3d object
 
Method Summary
 void applyBlueOrGreenAnaglyph(boolean blueChannel)
           
 void applyCyanAnaglyph()
           
 void beginRendering(java.awt.Rectangle rectClip, javax.vecmath.Matrix3f rotationMatrix, boolean antialiasThisFrame)
           
static int calcIntensity(float x, float y, float z)
           
 int calcIntensityScreen(javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB, javax.vecmath.Point3f screenC)
           
 void calcNormalizedNormal(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Point3f pointC, javax.vecmath.Vector3f vNormNorm)
           
 void calcSurfaceShade(short colix, long xyzdA, long xyzdB, long xyzdC)
           
 void calcSurfaceShade(short colix, javax.vecmath.Point3i screenA, javax.vecmath.Point3i screenB, javax.vecmath.Point3i screenC)
           
 void changeColixArgb(short id, int argb)
           
 void drawCircleCentered(short colix, int diameter, int x, int y, int z)
          draws a circle of the specified color at the specified location
 void drawCircleCentered(short colix, long xyzd)
          draws a circle of the specified color at the specified location
 void drawDashedLine(int run, int rise, int x1, int y1, int z1, int x2, int y2, int z2)
           
 void drawDashedLine(short colix, int run, int rise, int x1, int y1, int z1, int x2, int y2, int z2)
           
 void drawDashedLine(short colix, int run, int rise, javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB)
           
 void drawDashedLine(short colix1, short colix2, int run, int rise, int x1, int y1, int z1, int x2, int y2, int z2)
           
 void drawDottedLine(short colix, int x1, int y1, int z1, int x2, int y2, int z2)
           
 void drawDottedLine(short colix, javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB)
           
 void drawfillTriangle(short colix, int xA, int yA, int zA, int xB, int yB, int zB, int xC, int yC, int zC)
           
 void drawHermite(boolean fill, boolean border, short colix, 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)
           
 void drawHermite(short colix, int tension, javax.vecmath.Point3i s0, javax.vecmath.Point3i s1, javax.vecmath.Point3i s2, javax.vecmath.Point3i s3)
           
 void drawImage(java.awt.Image image, int x, int y, int z)
          draws a flat image whose upper left corner is at x,y,z
 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 colix, int x1, int y1, int z1, int x2, int y2, int z2)
           
 void drawLine(short colix, long xyzdA, long xyzdB)
           
 void drawLine(short colix, javax.vecmath.Point3i pointA, javax.vecmath.Point3i pointB)
           
 void drawLine(short colix1, short colix2, int x1, int y1, int z1, int x2, int y2, int z2)
           
 void drawPixel(int x, int y, int z)
           
 void drawPixel(javax.vecmath.Point3i point)
           
 void drawPixel(javax.vecmath.Point3i point, int normix)
           
 void drawPolygon4(int[] ax, int[] ay, int[] az)
           
 void drawQuadrilateral(short colix, javax.vecmath.Point3i screenA, javax.vecmath.Point3i screenB, javax.vecmath.Point3i screenC, javax.vecmath.Point3i screenD)
           
 void drawRect(short colix, int x, int y, int z, int width, int height)
          draws a rectangle
 void drawRectNoSlab(short colix, int x, int y, int z, int width, int height)
          draws a rectangle while ignoring slab/depth clipping could be useful for UI work
 void drawString(java.lang.String str, Font3D font3d, short colix, int xBaseline, int yBaseline, int z)
          draws the specified string in the current font.
 void drawString(java.lang.String str, Font3D font3d, short colix, short bgcolix, int xBaseline, int yBaseline, int z)
          draws the specified string in the current font.
 void drawString(java.lang.String str, short colix, int xBaseline, int yBaseline, int z)
          draws the specified string in the current font.
 void drawStringNoSlab(java.lang.String str, Font3D font3d, short colix, short bgcolix, int xBaseline, int yBaseline, int z)
           
 void drawTriangle(short colix, int xA, int yA, int zA, int xB, int yB, int zB, int xC, int yC, int zC)
           
 void drawTriangle(short colix, long xyzdA, long xyzdB, long xyzdC)
           
 void drawTriangle(short colix, javax.vecmath.Point3i screenA, javax.vecmath.Point3i screenB, javax.vecmath.Point3i screenC)
           
 void endRendering()
           
 void fillCircleCentered(short colixFill, int diameter, int x, int y, int z)
          fills a solid circle
 void fillCone(short colix, byte endcap, int diameter, int xBase, int yBase, int zBase, int xTip, int yTip, int zTip)
           
 void fillCone(short colix, byte endcap, int diameter, javax.vecmath.Point3i screenBase, javax.vecmath.Point3i screenTip)
           
 void fillCylinder(short colix, byte endcaps, int diameter, int xA, int yA, int zA, int xB, int yB, int zB)
           
 void fillCylinder(short colix, byte endcaps, int diameter, javax.vecmath.Point3i screenA, javax.vecmath.Point3i screenB)
           
 void fillCylinder(short colixA, short colixB, byte endcaps, int diameter, int xA, int yA, int zA, int xB, int yB, int zB)
           
 void fillHermite(short colix, 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.Point3i screenA, short colixA, short normixA, javax.vecmath.Point3i screenB, short colixB, short normixB, javax.vecmath.Point3i screenC, short colixC, short normixC, javax.vecmath.Point3i screenD, short colixD, short normixD)
           
 void fillQuadrilateral(short colix, javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB, javax.vecmath.Point3f screenC, javax.vecmath.Point3f screenD)
           
 void fillQuadrilateral(short colix, javax.vecmath.Point3i screenA, javax.vecmath.Point3i screenB, javax.vecmath.Point3i screenC, javax.vecmath.Point3i screenD)
           
 void fillQuadrilateral(short colix, javax.vecmath.Point3i screenA, short normixA, javax.vecmath.Point3i screenB, short normixB, javax.vecmath.Point3i screenC, short normixC, javax.vecmath.Point3i screenD, short normixD)
           
 void fillRect(short colix, int x, int y, int z, int widthFill, int heightFill)
           
 void fillScreenedCircleCentered(short colixFill, int diameter, int x, int y, int z)
          draws a screened circle ... every other dot is turned on
 void fillSphereCentered(short colix, int diameter, int x, int y, int z)
          fills a solid sphere
 void fillSphereCentered(short colix, int diameter, javax.vecmath.Point3f center)
          fills a solid sphere
 void fillSphereCentered(short colix, int diameter, javax.vecmath.Point3i center)
          fills a solid sphere
 void fillSphereCentered(short colix, long xyzd)
          fills a solid sphere
 void fillTriangle(javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB, javax.vecmath.Point3f screenC)
           
 void fillTriangle(javax.vecmath.Point3i screenA, javax.vecmath.Point3i screenB, javax.vecmath.Point3i screenC)
           
 void fillTriangle(javax.vecmath.Point3i screenA, short colixA, short normixA, javax.vecmath.Point3i screenB, short colixB, short normixB, javax.vecmath.Point3i screenC, short colixC, short normixC)
           
 void fillTriangle(short colix, boolean translucent, int xA, int yA, int zA, int xB, int yB, int zB, int xC, int yC, int zC)
           
 void fillTriangle(short colix, long xyzdA, long xyzdB, long xyzdC)
           
 void fillTriangle(short colix, javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB, javax.vecmath.Point3f screenC)
           
 void fillTriangle(short colix, javax.vecmath.Point3i screenA, javax.vecmath.Point3i screenB, javax.vecmath.Point3i screenC)
           
 void fillTriangle(short colix, javax.vecmath.Point3i screenA, short normixA, javax.vecmath.Point3i screenB, short normixB, javax.vecmath.Point3i screenC, short normixC)
           
 void fillTriangle(short colix, short normix, long xyzdA, long xyzdB, long xyzdC)
           
 void flushShadesAndImageCaches()
           
 boolean fullSceneAntialiasRendering()
          is full scene / oversampling antialiasing in effect
 short get2SidedNormix(javax.vecmath.Vector3f vector)
           
static int getArgbFromString(java.lang.String strColor)
           
 short getChangableColix(short id, int argb)
           
static short getChangableColixIndex(short colix)
           
 short getClosestVisibleGeodesicVertexIndex(javax.vecmath.Vector3f vector, int[] visibilityBitmap, int level)
           
static short getColix(java.awt.Color color)
           
static short getColix(int argb)
           
static short getColix(java.lang.Object obj)
           
static short getColix(java.lang.String colorName)
           
 int getColixArgb(short colix)
           
 short getColixBackgroundContrast()
          black or white, whichever contrasts more with the current background
 short getColixMix(short colixA, short colixB)
           
 java.awt.Color getColor(short colix)
           
static java.awt.Color getColorFromString(java.lang.String strColor)
           
 Font3D getFont3D(int fontSize)
           
 Font3D getFont3D(java.lang.String fontFace, int fontSize)
           
 Font3D getFont3D(java.lang.String fontFace, java.lang.String fontStyle, int fontSize)
           
 Font3D getFont3DCurrent()
           
 byte getFontFid(int fontSize)
           
 byte getFontFid(java.lang.String fontFace, int fontSize)
           
 byte getFontFid(java.lang.String fontFace, java.lang.String fontStyle, int fontSize)
           
 byte getFontFidCurrent()
           
 java.awt.FontMetrics getFontMetrics()
           
 int getGeodesicFaceCount(int level)
           
 short[] getGeodesicFaceNormixes(int level)
           
 short[] getGeodesicFaceVertexes(int level)
           
 short[] getGeodesicNeighborVertexes(int level)
           
 int getGeodesicVertexCount(int level)
           
 javax.vecmath.Vector3f[] getGeodesicVertexVectors()
           
 short getInverseNormix(short normix)
           
 short getInverseNormix(javax.vecmath.Vector3f vector)
           
 short getNormix(javax.vecmath.Vector3f vector)
           
 short getNormix(javax.vecmath.Vector3f vector, int geodesicLevel)
           
static short getOpaqueColix(short colix)
           
 int getRenderHeight()
           
 int getRenderWidth()
           
 java.awt.Image getScreenImage()
           
 int[] getShades(short colix)
           
 boolean getSpecular()
           
 javax.vecmath.Vector3f[] getTransformedVertexVectors()
           
static short getTranslucentColix(short colix)
           
static short getTranslucentColix(short colix, boolean translucent)
           
 int getWindowHeight()
          gets g3d height
 int getWindowWidth()
          gets g3d width
 boolean hasContent()
           
static short inheritColix(short myColix, short parentColix)
           
static short inheritColix(short myColix, short parentColix, short grandParentColix)
           
static boolean isColixTranslucent(short colix)
           
 boolean isDirectedTowardsCamera(short normix)
           
 boolean isNeighborVertex(short vertex1, short vertex2, int level)
           
 void plotPoints(int count, short colix, byte[] intensities, int[] coordinates)
           
 void plotPoints(short colix, int count, int[] coordinates)
           
 void releaseScreenImage()
           
 void setAmbientPercent(int ambientPercent)
           
 void setBackground(short colix)
          sets background color using colix color index
 void setColix(short colix)
          sets current color from colix color index
 void setColixIntensity(short colix, int intensity)
           
 void setDiffusePercent(int diffusePercent)
           
 void setFont(byte fid)
           
 void setFont(Font3D font3d)
           
 void setFontOfSize(int fontsize)
           
 void setGreyscaleMode(boolean greyscaleMode)
          controls greyscale rendering
 void setIntensity(int intensity)
           
 void setLightsourceZ(float dist)
           
 void setSize(java.awt.Dimension dim, boolean enableFullSceneAntialiasing)
          sets the image size
 void setSlabAndDepthValues(int slabValue, int depthValue)
          clipping from the front and the back the plane is defined as a percentage from the back of the image to the front For slab values: 100 means 100% is shown 75 means the back 75% is shown 50 means the back half is shown 0 means that nothing is shown for depth values: 0 means 100% is shown 25 means the back 25% is not shown 50 means the back half is not shown 100 means that nothing is shown
 void setSpecular(boolean specular)
           
 void setSpecularPercent(int specularPercent)
           
 void setSpecularPower(int specularPower)
           
static short setTranslucent(short colix, boolean isTranslucent)
           
 void snapshotAnaglyphChannelBytes()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIGHEST_GEODESIC_LEVEL

public static final int HIGHEST_GEODESIC_LEVEL
See Also:
Constant Field Values

ENDCAPS_NONE

public static final byte ENDCAPS_NONE
See Also:
Constant Field Values

ENDCAPS_OPEN

public static final byte ENDCAPS_OPEN
See Also:
Constant Field Values

ENDCAPS_FLAT

public static final byte ENDCAPS_FLAT
See Also:
Constant Field Values

ENDCAPS_SPHERICAL

public static final byte ENDCAPS_SPHERICAL
See Also:
Constant Field Values

NULL_COLIX

public static final short NULL_COLIX
See Also:
Constant Field Values

TRANSLUCENT

public static final short TRANSLUCENT
See Also:
Constant Field Values

OPAQUE

public static final short OPAQUE
See Also:
Constant Field Values

UNRECOGNIZED

public static final short UNRECOGNIZED
See Also:
Constant Field Values

SPECIAL_COLIX_MAX

public static final short SPECIAL_COLIX_MAX
See Also:
Constant Field Values

BLACK

public static final short BLACK
See Also:
Constant Field Values

ORANGE

public static final short ORANGE
See Also:
Constant Field Values

PINK

public static final short PINK
See Also:
Constant Field Values

BLUE

public static final short BLUE
See Also:
Constant Field Values

WHITE

public static final short WHITE
See Also:
Constant Field Values

AQUA

public static final short AQUA
See Also:
Constant Field Values

CYAN

public static final short CYAN
See Also:
Constant Field Values

RED

public static final short RED
See Also:
Constant Field Values

GREEN

public static final short GREEN
See Also:
Constant Field Values

GRAY

public static final short GRAY
See Also:
Constant Field Values

SILVER

public static final short SILVER
See Also:
Constant Field Values

LIGHTGRAY

public static final short LIGHTGRAY
See Also:
Constant Field Values

LIME

public static final short LIME
See Also:
Constant Field Values

MAROON

public static final short MAROON
See Also:
Constant Field Values

NAVY

public static final short NAVY
See Also:
Constant Field Values

OLIVE

public static final short OLIVE
See Also:
Constant Field Values

PURPLE

public static final short PURPLE
See Also:
Constant Field Values

TEAL

public static final short TEAL
See Also:
Constant Field Values

MAGENTA

public static final short MAGENTA
See Also:
Constant Field Values

FUCHSIA

public static final short FUCHSIA
See Also:
Constant Field Values

YELLOW

public static final short YELLOW
See Also:
Constant Field Values

HOTPINK

public static final short HOTPINK
See Also:
Constant Field Values

GOLD

public static final short GOLD
See Also:
Constant Field Values

COLOR_GOLD

public static final java.awt.Color COLOR_GOLD

COLOR_HOTPINK

public static final java.awt.Color COLOR_HOTPINK

COLOR_TEAL

public static final java.awt.Color COLOR_TEAL

shadeMax

public static final byte shadeMax
See Also:
Constant Field Values

shadeLast

public static final byte shadeLast
See Also:
Constant Field Values

shadeNormal

public static final byte shadeNormal

intensitySpecularSurfaceLimit

public static final byte intensitySpecularSurfaceLimit

colorNames

public static final java.lang.String[] colorNames

colorArgbs

public static final int[] colorArgbs

GEODESIC_START_VERTEX_COUNT

public static final int GEODESIC_START_VERTEX_COUNT
See Also:
Constant Field Values

GEODESIC_START_NEIGHBOR_COUNT

public static final int GEODESIC_START_NEIGHBOR_COUNT
See Also:
Constant Field Values
Constructor Detail

Graphics3D

public Graphics3D(java.awt.Component awtComponent)
Allocates a g3d object

Parameters:
awtComponent - the java.awt.Component where the image will be drawn
Method Detail

setSize

public void setSize(java.awt.Dimension dim,
                    boolean enableFullSceneAntialiasing)
sets the image size

Parameters:
dim - java.awt.Dimension with width and height
enableFullSceneAntialiasing - currently not in production

fullSceneAntialiasRendering

public boolean fullSceneAntialiasRendering()
is full scene / oversampling antialiasing in effect

Returns:
the answer

getWindowWidth

public int getWindowWidth()
gets g3d width

Returns:
width pixel count;

getWindowHeight

public int getWindowHeight()
gets g3d height

Returns:
height pixel count

getRenderWidth

public int getRenderWidth()

getRenderHeight

public int getRenderHeight()

setBackground

public void setBackground(short colix)
sets background color using colix color index

Parameters:
colix - a color index represented as a short
See Also:
Colix

getColixBackgroundContrast

public short getColixBackgroundContrast()
black or white, whichever contrasts more with the current background

Returns:
black or white colix value

setGreyscaleMode

public void setGreyscaleMode(boolean greyscaleMode)
controls greyscale rendering

Parameters:
greyscaleMode - Flag for greyscale rendering

setSlabAndDepthValues

public void setSlabAndDepthValues(int slabValue,
                                  int depthValue)
clipping from the front and the back

the plane is defined as a percentage from the back of the image to the front

For slab values:

for depth values:

Parameters:
slabValue - front clipping percentage [0,100]
depthValue - rear clipping percentage [0,100]

hasContent

public boolean hasContent()

setColix

public void setColix(short colix)
sets current color from colix color index

Parameters:
colix - the color index

setColixIntensity

public void setColixIntensity(short colix,
                              int intensity)

setIntensity

public void setIntensity(int intensity)

drawImage

public void drawImage(java.awt.Image image,
                      int x,
                      int y,
                      int z)
draws a flat image whose upper left corner is at x,y,z

Parameters:
image - the image
x - x
y - y
z - z

drawCircleCentered

public void drawCircleCentered(short colix,
                               long xyzd)
draws a circle of the specified color at the specified location

Parameters:
colix - the color index
xyzd - a long holding x, y, z, and d

drawCircleCentered

public void drawCircleCentered(short colix,
                               int diameter,
                               int x,
                               int y,
                               int z)
draws a circle of the specified color at the specified location

Parameters:
colix - the color index
diameter - pixel diameter
x - center x
y - center y
z - center z

fillScreenedCircleCentered

public void fillScreenedCircleCentered(short colixFill,
                                       int diameter,
                                       int x,
                                       int y,
                                       int z)
draws a screened circle ... every other dot is turned on

Parameters:
colixFill - the color index
diameter - the pixel diameter
x - center x
y - center y
z - center z

fillCircleCentered

public void fillCircleCentered(short colixFill,
                               int diameter,
                               int x,
                               int y,
                               int z)
fills a solid circle

Parameters:
colixFill - the color index
diameter - the pixel diameter
x - center x
y - center y
z - center z

fillSphereCentered

public void fillSphereCentered(short colix,
                               long xyzd)
fills a solid sphere

Parameters:
colix - the color index
xyzd - x,y,z,diameter

fillSphereCentered

public void fillSphereCentered(short colix,
                               int diameter,
                               int x,
                               int y,
                               int z)
fills a solid sphere

Parameters:
colix - the color index
diameter - pixel count
x - center x
y - center y
z - center z

fillSphereCentered

public void fillSphereCentered(short colix,
                               int diameter,
                               javax.vecmath.Point3i center)
fills a solid sphere

Parameters:
colix - the color index
diameter - pixel count
center - javax.vecmath.Point3i defining the center

fillSphereCentered

public void fillSphereCentered(short colix,
                               int diameter,
                               javax.vecmath.Point3f center)
fills a solid sphere

Parameters:
colix - the color index
diameter - pixel count
center - a javax.vecmath.Point3f ... floats are casted to ints

drawRect

public void drawRect(short colix,
                     int x,
                     int y,
                     int z,
                     int width,
                     int height)
draws a rectangle

Parameters:
colix - the color index
x - upper left x
y - upper left y
z - upper left z
width - pixel count
height - pixel count

drawRectNoSlab

public void drawRectNoSlab(short colix,
                           int x,
                           int y,
                           int z,
                           int width,
                           int height)
draws a rectangle while ignoring slab/depth clipping

could be useful for UI work

Parameters:
colix - the color index
x - upper left x
y - upper left y
z - upper left z
width - pixel count
height - pixel count

drawString

public void drawString(java.lang.String str,
                       short colix,
                       int xBaseline,
                       int yBaseline,
                       int z)
draws the specified string in the current font. no line wrapping

Parameters:
str - the string
colix - the color index
xBaseline - baseline x
yBaseline - baseline y
z - baseline z

drawString

public void drawString(java.lang.String str,
                       Font3D font3d,
                       short colix,
                       int xBaseline,
                       int yBaseline,
                       int z)
draws the specified string in the current font. no line wrapping

Parameters:
str - the String
font3d - the Font3D
colix - the color index
xBaseline - baseline x
yBaseline - baseline y
z - baseline z

drawString

public void drawString(java.lang.String str,
                       Font3D font3d,
                       short colix,
                       short bgcolix,
                       int xBaseline,
                       int yBaseline,
                       int z)
draws the specified string in the current font. no line wrapping

Parameters:
str - the String
font3d - the Font3D
colix - the color index
bgcolix - the color index of the background
xBaseline - baseline x
yBaseline - baseline y
z - baseline z

drawStringNoSlab

public void drawStringNoSlab(java.lang.String str,
                             Font3D font3d,
                             short colix,
                             short bgcolix,
                             int xBaseline,
                             int yBaseline,
                             int z)

setFontOfSize

public void setFontOfSize(int fontsize)

setFont

public void setFont(byte fid)

setFont

public void setFont(Font3D font3d)

getFont3DCurrent

public Font3D getFont3DCurrent()

getFontFidCurrent

public byte getFontFidCurrent()

getFontMetrics

public java.awt.FontMetrics getFontMetrics()

beginRendering

public void beginRendering(java.awt.Rectangle rectClip,
                           javax.vecmath.Matrix3f rotationMatrix,
                           boolean antialiasThisFrame)

endRendering

public void endRendering()

snapshotAnaglyphChannelBytes

public void snapshotAnaglyphChannelBytes()

applyBlueOrGreenAnaglyph

public void applyBlueOrGreenAnaglyph(boolean blueChannel)

applyCyanAnaglyph

public void applyCyanAnaglyph()

getScreenImage

public java.awt.Image getScreenImage()

releaseScreenImage

public void releaseScreenImage()

drawDashedLine

public void drawDashedLine(short colix,
                           int run,
                           int rise,
                           int x1,
                           int y1,
                           int z1,
                           int x2,
                           int y2,
                           int z2)

drawDottedLine

public void drawDottedLine(short colix,
                           int x1,
                           int y1,
                           int z1,
                           int x2,
                           int y2,
                           int z2)

drawDashedLine

public void drawDashedLine(short colix1,
                           short colix2,
                           int run,
                           int rise,
                           int x1,
                           int y1,
                           int z1,
                           int x2,
                           int y2,
                           int z2)

drawLine

public void drawLine(javax.vecmath.Point3i pointA,
                     javax.vecmath.Point3i pointB)

drawLine

public void drawLine(short colix,
                     javax.vecmath.Point3i pointA,
                     javax.vecmath.Point3i pointB)

drawLine

public void drawLine(short colix,
                     long xyzdA,
                     long xyzdB)

drawDottedLine

public void drawDottedLine(short colix,
                           javax.vecmath.Point3i pointA,
                           javax.vecmath.Point3i pointB)

drawDashedLine

public void drawDashedLine(short colix,
                           int run,
                           int rise,
                           javax.vecmath.Point3i pointA,
                           javax.vecmath.Point3i pointB)

drawDashedLine

public void drawDashedLine(int run,
                           int rise,
                           int x1,
                           int y1,
                           int z1,
                           int x2,
                           int y2,
                           int z2)

drawLine

public void drawLine(int x1,
                     int y1,
                     int z1,
                     int x2,
                     int y2,
                     int z2)

drawLine

public void drawLine(short colix,
                     int x1,
                     int y1,
                     int z1,
                     int x2,
                     int y2,
                     int z2)

drawLine

public void drawLine(short colix1,
                     short colix2,
                     int x1,
                     int y1,
                     int z1,
                     int x2,
                     int y2,
                     int z2)

drawPolygon4

public void drawPolygon4(int[] ax,
                         int[] ay,
                         int[] az)

fillQuadrilateral

public void fillQuadrilateral(short colix,
                              javax.vecmath.Point3f screenA,
                              javax.vecmath.Point3f screenB,
                              javax.vecmath.Point3f screenC,
                              javax.vecmath.Point3f screenD)

fillTriangle

public void fillTriangle(short colix,
                         javax.vecmath.Point3i screenA,
                         short normixA,
                         javax.vecmath.Point3i screenB,
                         short normixB,
                         javax.vecmath.Point3i screenC,
                         short normixC)

fillTriangle

public void fillTriangle(javax.vecmath.Point3i screenA,
                         short colixA,
                         short normixA,
                         javax.vecmath.Point3i screenB,
                         short colixB,
                         short normixB,
                         javax.vecmath.Point3i screenC,
                         short colixC,
                         short normixC)

fillTriangle

public void fillTriangle(short colix,
                         javax.vecmath.Point3i screenA,
                         javax.vecmath.Point3i screenB,
                         javax.vecmath.Point3i screenC)

fillTriangle

public void fillTriangle(short colix,
                         long xyzdA,
                         long xyzdB,
                         long xyzdC)

fillTriangle

public void fillTriangle(short colix,
                         short normix,
                         long xyzdA,
                         long xyzdB,
                         long xyzdC)

fillTriangle

public void fillTriangle(short colix,
                         javax.vecmath.Point3f screenA,
                         javax.vecmath.Point3f screenB,
                         javax.vecmath.Point3f screenC)

fillQuadrilateral

public void fillQuadrilateral(short colix,
                              javax.vecmath.Point3i screenA,
                              javax.vecmath.Point3i screenB,
                              javax.vecmath.Point3i screenC,
                              javax.vecmath.Point3i screenD)

fillQuadrilateral

public void fillQuadrilateral(short colix,
                              javax.vecmath.Point3i screenA,
                              short normixA,
                              javax.vecmath.Point3i screenB,
                              short normixB,
                              javax.vecmath.Point3i screenC,
                              short normixC,
                              javax.vecmath.Point3i screenD,
                              short normixD)

fillQuadrilateral

public void fillQuadrilateral(javax.vecmath.Point3i screenA,
                              short colixA,
                              short normixA,
                              javax.vecmath.Point3i screenB,
                              short colixB,
                              short normixB,
                              javax.vecmath.Point3i screenC,
                              short colixC,
                              short normixC,
                              javax.vecmath.Point3i screenD,
                              short colixD,
                              short normixD)

fillTriangle

public void fillTriangle(javax.vecmath.Point3i screenA,
                         javax.vecmath.Point3i screenB,
                         javax.vecmath.Point3i screenC)

fillTriangle

public void fillTriangle(javax.vecmath.Point3f screenA,
                         javax.vecmath.Point3f screenB,
                         javax.vecmath.Point3f screenC)

calcSurfaceShade

public void calcSurfaceShade(short colix,
                             long xyzdA,
                             long xyzdB,
                             long xyzdC)

calcSurfaceShade

public void calcSurfaceShade(short colix,
                             javax.vecmath.Point3i screenA,
                             javax.vecmath.Point3i screenB,
                             javax.vecmath.Point3i screenC)

drawfillTriangle

public void drawfillTriangle(short colix,
                             int xA,
                             int yA,
                             int zA,
                             int xB,
                             int yB,
                             int zB,
                             int xC,
                             int yC,
                             int zC)

fillTriangle

public void fillTriangle(short colix,
                         boolean translucent,
                         int xA,
                         int yA,
                         int zA,
                         int xB,
                         int yB,
                         int zB,
                         int xC,
                         int yC,
                         int zC)

drawTriangle

public void drawTriangle(short colix,
                         int xA,
                         int yA,
                         int zA,
                         int xB,
                         int yB,
                         int zB,
                         int xC,
                         int yC,
                         int zC)

drawTriangle

public void drawTriangle(short colix,
                         long xyzdA,
                         long xyzdB,
                         long xyzdC)

drawTriangle

public void drawTriangle(short colix,
                         javax.vecmath.Point3i screenA,
                         javax.vecmath.Point3i screenB,
                         javax.vecmath.Point3i screenC)

drawQuadrilateral

public void drawQuadrilateral(short colix,
                              javax.vecmath.Point3i screenA,
                              javax.vecmath.Point3i screenB,
                              javax.vecmath.Point3i screenC,
                              javax.vecmath.Point3i screenD)

fillCylinder

public void fillCylinder(short colixA,
                         short colixB,
                         byte endcaps,
                         int diameter,
                         int xA,
                         int yA,
                         int zA,
                         int xB,
                         int yB,
                         int zB)

fillCylinder

public void fillCylinder(short colix,
                         byte endcaps,
                         int diameter,
                         int xA,
                         int yA,
                         int zA,
                         int xB,
                         int yB,
                         int zB)

fillCylinder

public void fillCylinder(short colix,
                         byte endcaps,
                         int diameter,
                         javax.vecmath.Point3i screenA,
                         javax.vecmath.Point3i screenB)

fillCone

public void fillCone(short colix,
                     byte endcap,
                     int diameter,
                     int xBase,
                     int yBase,
                     int zBase,
                     int xTip,
                     int yTip,
                     int zTip)

fillCone

public void fillCone(short colix,
                     byte endcap,
                     int diameter,
                     javax.vecmath.Point3i screenBase,
                     javax.vecmath.Point3i screenTip)

fillHermite

public void fillHermite(short colix,
                        int tension,
                        int diameterBeg,
                        int diameterMid,
                        int diameterEnd,
                        javax.vecmath.Point3i s0,
                        javax.vecmath.Point3i s1,
                        javax.vecmath.Point3i s2,
                        javax.vecmath.Point3i s3)

drawHermite

public void drawHermite(short colix,
                        int tension,
                        javax.vecmath.Point3i s0,
                        javax.vecmath.Point3i s1,
                        javax.vecmath.Point3i s2,
                        javax.vecmath.Point3i s3)

drawHermite

public void drawHermite(boolean fill,
                        boolean border,
                        short colix,
                        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)

fillRect

public void fillRect(short colix,
                     int x,
                     int y,
                     int z,
                     int widthFill,
                     int heightFill)

drawPixel

public void drawPixel(javax.vecmath.Point3i point)

drawPixel

public void drawPixel(int x,
                      int y,
                      int z)

drawPixel

public void drawPixel(javax.vecmath.Point3i point,
                      int normix)

plotPoints

public void plotPoints(short colix,
                       int count,
                       int[] coordinates)

plotPoints

public void plotPoints(int count,
                       short colix,
                       byte[] intensities,
                       int[] coordinates)

getColixArgb

public int getColixArgb(short colix)

getShades

public int[] getShades(short colix)

getChangableColixIndex

public static final short getChangableColixIndex(short colix)

isColixTranslucent

public static final boolean isColixTranslucent(short colix)

getTranslucentColix

public static final short getTranslucentColix(short colix,
                                              boolean translucent)

getTranslucentColix

public static final short getTranslucentColix(short colix)

getOpaqueColix

public static final short getOpaqueColix(short colix)

getColix

public static final short getColix(int argb)

getColix

public static final short getColix(java.awt.Color color)

getColixMix

public final short getColixMix(short colixA,
                               short colixB)

setTranslucent

public static final short setTranslucent(short colix,
                                         boolean isTranslucent)

getColix

public static final short getColix(java.lang.String colorName)

getColix

public static final short getColix(java.lang.Object obj)

inheritColix

public static final short inheritColix(short myColix,
                                       short parentColix)

inheritColix

public static final short inheritColix(short myColix,
                                       short parentColix,
                                       short grandParentColix)

getColor

public java.awt.Color getColor(short colix)

getChangableColix

public short getChangableColix(short id,
                               int argb)

changeColixArgb

public void changeColixArgb(short id,
                            int argb)

flushShadesAndImageCaches

public void flushShadesAndImageCaches()

setSpecular

public void setSpecular(boolean specular)

getSpecular

public boolean getSpecular()

setSpecularPower

public void setSpecularPower(int specularPower)

setAmbientPercent

public void setAmbientPercent(int ambientPercent)

setDiffusePercent

public void setDiffusePercent(int diffusePercent)

setSpecularPercent

public void setSpecularPercent(int specularPercent)

setLightsourceZ

public void setLightsourceZ(float dist)

calcIntensityScreen

public int calcIntensityScreen(javax.vecmath.Point3f screenA,
                               javax.vecmath.Point3f screenB,
                               javax.vecmath.Point3f screenC)

calcIntensity

public static int calcIntensity(float x,
                                float y,
                                float z)

getFont3D

public Font3D getFont3D(int fontSize)

getFont3D

public Font3D getFont3D(java.lang.String fontFace,
                        int fontSize)

getFont3D

public Font3D getFont3D(java.lang.String fontFace,
                        java.lang.String fontStyle,
                        int fontSize)

getFontFid

public byte getFontFid(int fontSize)

getFontFid

public byte getFontFid(java.lang.String fontFace,
                       int fontSize)

getFontFid

public byte getFontFid(java.lang.String fontFace,
                       java.lang.String fontStyle,
                       int fontSize)

getArgbFromString

public static int getArgbFromString(java.lang.String strColor)

getColorFromString

public static java.awt.Color getColorFromString(java.lang.String strColor)

calcNormalizedNormal

public void calcNormalizedNormal(javax.vecmath.Point3f pointA,
                                 javax.vecmath.Point3f pointB,
                                 javax.vecmath.Point3f pointC,
                                 javax.vecmath.Vector3f vNormNorm)

getNormix

public short getNormix(javax.vecmath.Vector3f vector)

getNormix

public short getNormix(javax.vecmath.Vector3f vector,
                       int geodesicLevel)

getInverseNormix

public short getInverseNormix(javax.vecmath.Vector3f vector)

getInverseNormix

public short getInverseNormix(short normix)

get2SidedNormix

public short get2SidedNormix(javax.vecmath.Vector3f vector)

isDirectedTowardsCamera

public boolean isDirectedTowardsCamera(short normix)

getClosestVisibleGeodesicVertexIndex

public short getClosestVisibleGeodesicVertexIndex(javax.vecmath.Vector3f vector,
                                                  int[] visibilityBitmap,
                                                  int level)

isNeighborVertex

public boolean isNeighborVertex(short vertex1,
                                short vertex2,
                                int level)

getGeodesicVertexVectors

public javax.vecmath.Vector3f[] getGeodesicVertexVectors()

getGeodesicVertexCount

public int getGeodesicVertexCount(int level)

getTransformedVertexVectors

public javax.vecmath.Vector3f[] getTransformedVertexVectors()

getGeodesicFaceCount

public int getGeodesicFaceCount(int level)

getGeodesicFaceVertexes

public short[] getGeodesicFaceVertexes(int level)

getGeodesicFaceNormixes

public short[] getGeodesicFaceNormixes(int level)

getGeodesicNeighborVertexes

public short[] getGeodesicNeighborVertexes(int level)