org.jmol.g3d
Class Platform3D

java.lang.Object
  extended by org.jmol.g3d.Platform3D
Direct Known Subclasses:
Awt3D, Swing3D

abstract class Platform3D
extends java.lang.Object

Specifies the API to an underlying int[] buffer of ARGB values that can be converted into an Image object and a short[] for z-buffer depth.

Author:
Miguel, miguel@jmol.org

Nested Class Summary
(package private)  class Platform3D.ClearingThread
           
 
Field Summary
(package private)  int bufferHeight
           
(package private)  int bufferSize
           
(package private)  int bufferSizeT
           
(package private)  int bufferWidth
           
(package private)  Platform3D.ClearingThread clearingThread
           
(package private) static boolean desireClearingThread
           
(package private) static boolean forcePlatformAWT
           
(package private)  java.awt.Graphics gOffscreen
           
(package private)  java.awt.Graphics graphicsOffscreen
           
(package private)  int heightOffscreen
           
(package private)  java.awt.Image imageOffscreen
           
(package private)  java.awt.Image imagePixelBuffer
           
(package private)  int[] pBuffer
           
(package private)  int[] pBufferT
           
(package private)  boolean useClearingThread
           
(package private)  int widthOffscreen
           
(package private)  int windowHeight
           
(package private)  int windowSize
           
(package private)  int windowWidth
           
(package private)  int[] zBuffer
           
(package private)  int[] zBufferT
           
 
Constructor Summary
Platform3D()
           
 
Method Summary
(package private)  void allocateBuffers(int width, int height, boolean antialias)
           
(package private) abstract  java.awt.Image allocateImage()
           
(package private) abstract  java.awt.Image allocateOffscreenImage(int width, int height)
           
private static Platform3D allocateSwing3D()
           
(package private)  void allocateTBuffers(boolean antialiasTranslucent)
           
(package private)  boolean checkOffscreenSize(int width, int height)
           
(package private)  void clearScreenBuffer()
           
(package private)  void clearScreenBufferThreaded()
           
(package private)  void clearTBuffer()
           
(package private) static Platform3D createInstance(java.awt.Component awtComponent)
           
(package private) abstract  java.awt.Graphics getGraphics(java.awt.Image imageOffscreen)
           
(package private)  boolean hasContent()
           
(package private)  void initialize(boolean useClearingThread)
           
(package private)  void notifyEndOfRendering()
           
(package private)  void obtainScreenBuffer()
           
(package private)  void releaseBuffers()
           
(package private)  void setBackgroundColor(int bgColor)
           
(package private)  void setBackgroundTransparent(boolean tf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

windowWidth

int windowWidth

windowHeight

int windowHeight

windowSize

int windowSize

bufferWidth

int bufferWidth

bufferHeight

int bufferHeight

bufferSize

int bufferSize

bufferSizeT

int bufferSizeT

imagePixelBuffer

java.awt.Image imagePixelBuffer

pBuffer

int[] pBuffer

pBufferT

int[] pBufferT

zBuffer

int[] zBuffer

zBufferT

int[] zBufferT

widthOffscreen

int widthOffscreen

heightOffscreen

int heightOffscreen

imageOffscreen

java.awt.Image imageOffscreen

gOffscreen

java.awt.Graphics gOffscreen

forcePlatformAWT

static final boolean forcePlatformAWT
See Also:
Constant Field Values

desireClearingThread

static final boolean desireClearingThread
See Also:
Constant Field Values

useClearingThread

boolean useClearingThread

clearingThread

Platform3D.ClearingThread clearingThread

graphicsOffscreen

java.awt.Graphics graphicsOffscreen
Constructor Detail

Platform3D

Platform3D()
Method Detail

createInstance

static Platform3D createInstance(java.awt.Component awtComponent)

allocateSwing3D

private static Platform3D allocateSwing3D()

initialize

final void initialize(boolean useClearingThread)

allocateImage

abstract java.awt.Image allocateImage()

allocateTBuffers

void allocateTBuffers(boolean antialiasTranslucent)

allocateBuffers

void allocateBuffers(int width,
                     int height,
                     boolean antialias)

releaseBuffers

void releaseBuffers()

hasContent

boolean hasContent()

clearScreenBuffer

void clearScreenBuffer()

setBackgroundColor

void setBackgroundColor(int bgColor)

clearTBuffer

void clearTBuffer()

obtainScreenBuffer

final void obtainScreenBuffer()

clearScreenBufferThreaded

final void clearScreenBufferThreaded()

notifyEndOfRendering

void notifyEndOfRendering()

allocateOffscreenImage

abstract java.awt.Image allocateOffscreenImage(int width,
                                               int height)

getGraphics

abstract java.awt.Graphics getGraphics(java.awt.Image imageOffscreen)

checkOffscreenSize

boolean checkOffscreenSize(int width,
                           int height)

setBackgroundTransparent

void setBackgroundTransparent(boolean tf)