org.jmol.g3d
Class Normix3D

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

 class Normix3D
extends Object

Provides quantization of normalized vectors so that shading for lighting calculations can be handled by a simple index lookup

A 'normix' is a normal index, represented as a short

Author:
Miguel, miguel@jmol.org

Field Summary
private static short[] inverseNormixes
           
private static short[][] neighborVertexesArrays
           
(package private) static int NORMIX_GEODESIC_LEVEL
           
static short NORMIX_NULL
           
private static int normixCount
           
private static byte nullShadeIndex
           
private  byte[] shadeIndexes
           
private  byte[] shadeIndexes2Sided
           
private static boolean TIMINGS
           
private  Vector3f[] transformedVectors
           
private static Vector3f[] vertexVectors
           
 
Constructor Summary
Normix3D()
           
 
Method Summary
(package private) static short get2SidedNormix(Vector3f v, BitSet bsTemp)
           
(package private) static short getInverseNormix(short normix)
           
(package private) static short getNormix(double x, double y, double z, int geodesicLevel, BitSet bsConsidered)
           
(package private) static short getNormix(Vector3f v, BitSet bsTemp)
           
(package private)  int getShadeIndex(short normix)
           
(package private)  Vector3f[] getTransformedVectors()
           
(package private) static Vector3f getVector(short normix)
           
(package private)  boolean isDirectedTowardsCamera(short normix)
           
(package private)  void setRotationMatrix(Matrix3f rotationMatrix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMIX_GEODESIC_LEVEL

static final int NORMIX_GEODESIC_LEVEL
See Also:
Constant Field Values

normixCount

private static final int normixCount

vertexVectors

private static final Vector3f[] vertexVectors

inverseNormixes

private static final short[] inverseNormixes

neighborVertexesArrays

private static final short[][] neighborVertexesArrays

TIMINGS

private static final boolean TIMINGS
See Also:
Constant Field Values

NORMIX_NULL

public static final short NORMIX_NULL
See Also:
Constant Field Values

transformedVectors

private final Vector3f[] transformedVectors

shadeIndexes

private final byte[] shadeIndexes

shadeIndexes2Sided

private final byte[] shadeIndexes2Sided

nullShadeIndex

private static byte nullShadeIndex
Constructor Detail

Normix3D

Normix3D()
Method Detail

getInverseNormix

static short getInverseNormix(short normix)

getNormix

static short getNormix(Vector3f v,
                       BitSet bsTemp)

get2SidedNormix

static short get2SidedNormix(Vector3f v,
                             BitSet bsTemp)

getVector

static Vector3f getVector(short normix)

getNormix

static short getNormix(double x,
                       double y,
                       double z,
                       int geodesicLevel,
                       BitSet bsConsidered)

getTransformedVectors

Vector3f[] getTransformedVectors()

isDirectedTowardsCamera

boolean isDirectedTowardsCamera(short normix)

setRotationMatrix

void setRotationMatrix(Matrix3f rotationMatrix)

getShadeIndex

int getShadeIndex(short normix)