org.jmol.shapespecial
Class Polyhedra

java.lang.Object
  extended by org.jmol.shape.Shape
      extended by org.jmol.shape.AtomShape
          extended by org.jmol.shapespecial.Polyhedra

public class Polyhedra
extends AtomShape


Nested Class Summary
(package private)  class Polyhedra.Polyhedron
           
 
Field Summary
private  javax.vecmath.Vector3f align1
           
private  javax.vecmath.Vector3f align2
           
private  boolean bondedOnly
           
private  java.util.BitSet bsVertexCount
           
private  java.util.BitSet bsVertices
           
private  java.util.BitSet centers
           
private static float DEFAULT_DISTANCE_FACTOR
           
private static float DEFAULT_FACECENTEROFFSET
           
(package private)  float distanceFactor
           
(package private)  int drawEdges
           
(package private) static int EDGES_ALL
           
(package private) static int EDGES_FRONT
           
private static int EDGES_NONE
           
private static int FACE_COUNT_MAX
           
(package private)  float faceCenterOffset
           
private  boolean haveBitSetVertices
           
private  boolean iHaveCenterBitSet
           
(package private)  boolean isCollapsed
           
private static int MAX_VERTICES
           
private static float minDistanceForPlanarity
           
private  short[] normixesT
           
private  int nVertices
           
private  Atom[] otherAtoms
           
private  byte[] planesT
           
(package private)  int polyhedronCount
           
(package private)  Polyhedra.Polyhedron[] polyhedrons
           
private  float radius
           
private static javax.vecmath.Point3f randomPoint
           
private  javax.vecmath.Vector3f vAB
           
private  javax.vecmath.Vector3f vAC
           
 
Fields inherited from class org.jmol.shape.AtomShape
atomCount, atoms, bsColixSet, bsSizeSet, colixes, isActive, mads, paletteIDs
 
Fields inherited from class org.jmol.shape.Shape
g3d, isBioShape, modelSet, myVisibilityFlag, shapeID, translucentAllowed, translucentLevel, viewer
 
Constructor Summary
Polyhedra()
           
 
Method Summary
private  void buildPolyhedra()
           
private  Polyhedra.Polyhedron constructBitSetPolyhedron(int atomIndex)
           
private  Polyhedra.Polyhedron constructBondsPolyhedron(int atomIndex)
           
private  Polyhedra.Polyhedron constructRadiusPolyhedron(int atomIndex)
           
private  void deletePolyhedra()
           
private  java.lang.String faceId(int i, int j, int k)
           
 java.lang.String getShapeState()
           
private  boolean isAligned(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, javax.vecmath.Point3f pt3)
           
private  boolean isPlanar(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, javax.vecmath.Point3f pt3, javax.vecmath.Point3f ptX)
           
 void setProperty(java.lang.String propertyName, java.lang.Object value, java.util.BitSet bs)
           
 void setVisibilityFlags(java.util.BitSet bs)
           
private  void setVisible(boolean visible)
           
private  Polyhedra.Polyhedron validatePolyhedronNew(Atom centralAtom, int vertexCount, Atom[] otherAtoms)
           
 
Methods inherited from class org.jmol.shape.AtomShape
initModelSet, setModelClickability, setSize
 
Methods inherited from class org.jmol.shape.Shape
appendCmd, checkBoundsMinMax, checkObjectClicked, checkObjectDragged, checkObjectHovered, findNearestAtomIndex, getColix, getColorCommand, getColorCommand, getFontCommand, getIndexFromName, getProperty, getShapeCommands, getShapeCommands, getShapeDetail, getViewer, initializeShape, initShape, remapColors, setColix, setColix, setModelSet, setStateInfo, setStateInfo, wasClicked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DISTANCE_FACTOR

private static final float DEFAULT_DISTANCE_FACTOR
See Also:
Constant Field Values

DEFAULT_FACECENTEROFFSET

private static final float DEFAULT_FACECENTEROFFSET
See Also:
Constant Field Values

EDGES_NONE

private static final int EDGES_NONE
See Also:
Constant Field Values

EDGES_ALL

static final int EDGES_ALL
See Also:
Constant Field Values

EDGES_FRONT

static final int EDGES_FRONT
See Also:
Constant Field Values

MAX_VERTICES

private static final int MAX_VERTICES
See Also:
Constant Field Values

FACE_COUNT_MAX

private static final int FACE_COUNT_MAX
See Also:
Constant Field Values

otherAtoms

private Atom[] otherAtoms

polyhedronCount

int polyhedronCount

polyhedrons

Polyhedra.Polyhedron[] polyhedrons

drawEdges

int drawEdges

radius

private float radius

nVertices

private int nVertices

faceCenterOffset

float faceCenterOffset

distanceFactor

float distanceFactor

isCollapsed

boolean isCollapsed

iHaveCenterBitSet

private boolean iHaveCenterBitSet

bondedOnly

private boolean bondedOnly

haveBitSetVertices

private boolean haveBitSetVertices

centers

private java.util.BitSet centers

bsVertices

private java.util.BitSet bsVertices

bsVertexCount

private java.util.BitSet bsVertexCount

normixesT

private short[] normixesT

planesT

private byte[] planesT

randomPoint

private static final javax.vecmath.Point3f randomPoint

align1

private javax.vecmath.Vector3f align1

align2

private javax.vecmath.Vector3f align2

vAB

private final javax.vecmath.Vector3f vAB

vAC

private final javax.vecmath.Vector3f vAC

minDistanceForPlanarity

private static float minDistanceForPlanarity
Constructor Detail

Polyhedra

public Polyhedra()
Method Detail

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object value,
                        java.util.BitSet bs)
Overrides:
setProperty in class AtomShape

deletePolyhedra

private void deletePolyhedra()

setVisible

private void setVisible(boolean visible)

buildPolyhedra

private void buildPolyhedra()

constructBondsPolyhedron

private Polyhedra.Polyhedron constructBondsPolyhedron(int atomIndex)

constructBitSetPolyhedron

private Polyhedra.Polyhedron constructBitSetPolyhedron(int atomIndex)

constructRadiusPolyhedron

private Polyhedra.Polyhedron constructRadiusPolyhedron(int atomIndex)

validatePolyhedronNew

private Polyhedra.Polyhedron validatePolyhedronNew(Atom centralAtom,
                                                   int vertexCount,
                                                   Atom[] otherAtoms)

faceId

private java.lang.String faceId(int i,
                                int j,
                                int k)

isAligned

private boolean isAligned(javax.vecmath.Point3f pt1,
                          javax.vecmath.Point3f pt2,
                          javax.vecmath.Point3f pt3)

isPlanar

private boolean isPlanar(javax.vecmath.Point3f pt1,
                         javax.vecmath.Point3f pt2,
                         javax.vecmath.Point3f pt3,
                         javax.vecmath.Point3f ptX)

setVisibilityFlags

public void setVisibilityFlags(java.util.BitSet bs)
Overrides:
setVisibilityFlags in class Shape

getShapeState

public java.lang.String getShapeState()
Overrides:
getShapeState in class AtomShape