org.jmol.g3d
Class Colix3D

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

 class Colix3D
extends java.lang.Object

Implements a color index model using a colix as a COLor IndeX.

A colix is a color index represented as a short int.

The value 0 is considered a null value ... for no color. In Jmol this generally means that the value is inherited from some other object.

The value 1 is used to indicate that color only is to be inherited. 0x0001 INHERIT_OPAQUE -- opaque, but with the color coming from the parent. 0x4001 INHERIT_TRANSLUCENT -- translucent but with the color coming from the parent. The value 2 is used to indicate that one of the palettes is to be used. 0x0002 PALETTE, opaque 0x4002 PALETTE, translucent Palettes themselves are coded separately in a Palette ID that is tracked with

Author:
Miguel, miguel@jmol.org

Field Summary
private static int[] argbs
           
private static int[] argbsGreyscale
           
private static int[][] ashades
           
private static int[][] ashadesGreyscale
           
private static Int2IntHash colixHash
           
private static int colixMax
           
(package private) static int[] predefinedArgbs
           
private static int RAW_RGB_INT
           
 
Constructor Summary
Colix3D()
           
 
Method Summary
(package private) static int allocateColix(int argb)
           
private static void calcArgbsGreyscale()
           
(package private) static void flushShades()
           
(package private) static int getArgb(short colix)
           
(package private) static int getArgbGreyscale(short colix)
           
(package private) static short getColix(int argb)
           
(package private) static int[] getShades(int argb, boolean asGrey)
           
(package private) static int[] getShades(short colix)
           
(package private) static int[] getShadesGreyscale(short colix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colixMax

private static int colixMax

argbs

private static int[] argbs

argbsGreyscale

private static int[] argbsGreyscale

ashades

private static int[][] ashades

ashadesGreyscale

private static int[][] ashadesGreyscale

colixHash

private static final Int2IntHash colixHash

RAW_RGB_INT

private static final int RAW_RGB_INT
See Also:
Constant Field Values

predefinedArgbs

static final int[] predefinedArgbs
Constructor Detail

Colix3D

Colix3D()
Method Detail

getColix

static short getColix(int argb)

allocateColix

static int allocateColix(int argb)

calcArgbsGreyscale

private static void calcArgbsGreyscale()

getArgb

static final int getArgb(short colix)

getArgbGreyscale

static final int getArgbGreyscale(short colix)

getShades

static final int[] getShades(int argb,
                             boolean asGrey)

getShades

static final int[] getShades(short colix)

getShadesGreyscale

static final int[] getShadesGreyscale(short colix)

flushShades

static final void flushShades()