org.jmol.shapebio
Class BioShapeRenderer

java.lang.Object
  extended by org.jmol.shape.ShapeRenderer
      extended by org.jmol.shape.MeshRenderer
          extended by org.jmol.shapebio.BioShapeRenderer
Direct Known Subclasses:
BackboneRenderer, RocketsRenderer, StrandsRenderer, TraceRenderer

abstract class BioShapeRenderer
extends MeshRenderer


Field Summary
private  javax.vecmath.AxisAngle4f aa
           
private static int ABSOLUTE_MIN_MESH_SIZE
           
private  int aspectRatio
           
protected  java.util.BitSet bsVisible
           
protected  short[] colixes
           
private  javax.vecmath.Point3f[] controlHermites
           
protected  javax.vecmath.Point3f[] controlPoints
           
protected  javax.vecmath.Point3i[] controlPointScreens
           
private  int diameterBeg
           
private  int diameterEnd
           
private  int diameterMid
           
private  boolean doCap0
           
private  boolean doCap1
           
private  boolean haveControlPointScreens
           
private  int hermiteLevel
           
private  int iNext
           
private  int iNext2
           
private  int iNext3
           
private  boolean invalidateMesh
           
private  boolean invalidateSheets
           
private  int iPrev
           
protected  boolean isCarbohydrate
           
private  boolean isHighRes
           
protected  boolean isNucleic
           
private  boolean isTraceAlpha
           
protected  int[] leadAtomIndices
           
protected  short[] mads
           
private  javax.vecmath.Matrix3f mat
           
private  Mesh[] meshes
           
private  boolean[] meshReady
           
private static int MIN_MESH_RENDER_SIZE
           
protected  int monomerCount
           
protected  Monomer[] monomers
           
private  javax.vecmath.Vector3f norm
           
private  javax.vecmath.Point3f pointT
           
private  javax.vecmath.Point3f pt
           
private  javax.vecmath.Point3f pt1
           
private  javax.vecmath.Point3f ptNext
           
private  javax.vecmath.Point3f ptPrev
           
private  javax.vecmath.Point3f[] radiusHermites
           
private  boolean ribbonBorder
           
protected  javax.vecmath.Point3i[] ribbonBottomScreens
           
protected  javax.vecmath.Point3i[] ribbonTopScreens
           
private  javax.vecmath.Point3i screenArrowBot
           
private  javax.vecmath.Point3i screenArrowBotPrev
           
private  javax.vecmath.Point3i screenArrowTop
           
private  javax.vecmath.Point3i screenArrowTopPrev
           
private  float sheetSmoothing
           
protected  byte[] structureTypes
           
private  javax.vecmath.Vector3f wing
           
private  javax.vecmath.Vector3f wing0
           
private  javax.vecmath.Vector3f wing1
           
private  javax.vecmath.Vector3f[] wingHermites
           
private  javax.vecmath.Vector3f wingT
           
protected  javax.vecmath.Vector3f[] wingVectors
           
private  javax.vecmath.Vector3f Z
           
 
Fields inherited from class org.jmol.shape.MeshRenderer
antialias, bsFaces, diameter, frontOnly, imageFontScaling, isTranslucent, mesh, normixes, pt1f, pt1i, pt2f, pt2i, scalePixelsPerMicron, screens, transformedVectors, vertexCount, vertices, width
 
Fields inherited from class org.jmol.shape.ShapeRenderer
colix, g3d, isGenerator, mad, madBeg, madEnd, madMid, modelSet, myVisibilityFlag, shape, shapeID, slabbing, viewer
 
Constructor Summary
BioShapeRenderer()
           
 
Method Summary
private  void calc1Screen(javax.vecmath.Point3f center, javax.vecmath.Vector3f vector, short mad, float offset_1000, javax.vecmath.Point3i screen)
           
protected  void calcScreenControlPoints()
           
protected  void calcScreenControlPoints(javax.vecmath.Point3f[] points)
           
protected  javax.vecmath.Point3i[] calcScreens(float offsetFraction)
          calculate screen points based on control points and wing positions (cartoon, strand, meshRibbon, and ribbon)
private  boolean checkDiameter(int d)
           
private  boolean createMeshCylinder(int i, int madBeg, int madMid, int madEnd, int aspectRatio)
           
private  void freeTempArrays()
           
protected  short getLeadColix(int i)
           
private  boolean initializePolymer(BioShape bioShape)
           
protected  boolean isHelix(int i)
           
protected  void render()
           
protected abstract  void renderBioShape(BioShape bioShape)
           
protected  void renderCone(int i, javax.vecmath.Point3f pointBegin, javax.vecmath.Point3f pointEnd, javax.vecmath.Point3f screenPtBegin, javax.vecmath.Point3f screenPtEnd)
           
protected  void renderHermiteArrowHead(int i)
           
protected  void renderHermiteConic(int i, boolean thisTypeOnly)
           
protected  void renderHermiteCylinder(javax.vecmath.Point3i[] screens, int i)
           
protected  void renderHermiteRibbon(boolean doFill, int i, boolean thisTypeOnly)
           
private  boolean setMads(int i, boolean thisTypeOnly)
           
private  void setNeighbors(int i)
           
private  void setStructureTypes()
           
 
Methods inherited from class org.jmol.shape.MeshRenderer
isPolygonDisplayable, render1, render2, renderExport, renderPoints, renderTriangles, transform
 
Methods inherited from class org.jmol.shape.ShapeRenderer
getMad, initRenderer, render, renderLine, setGenerator, setViewerG3dShapeID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

invalidateMesh

private boolean invalidateMesh

invalidateSheets

private boolean invalidateSheets

isHighRes

private boolean isHighRes

isTraceAlpha

private boolean isTraceAlpha

ribbonBorder

private boolean ribbonBorder

haveControlPointScreens

private boolean haveControlPointScreens

aspectRatio

private int aspectRatio

hermiteLevel

private int hermiteLevel

sheetSmoothing

private float sheetSmoothing

meshes

private Mesh[] meshes

meshReady

private boolean[] meshReady

monomerCount

protected int monomerCount

monomers

protected Monomer[] monomers

isNucleic

protected boolean isNucleic

isCarbohydrate

protected boolean isCarbohydrate

bsVisible

protected java.util.BitSet bsVisible

ribbonTopScreens

protected javax.vecmath.Point3i[] ribbonTopScreens

ribbonBottomScreens

protected javax.vecmath.Point3i[] ribbonBottomScreens

controlPoints

protected javax.vecmath.Point3f[] controlPoints

controlPointScreens

protected javax.vecmath.Point3i[] controlPointScreens

leadAtomIndices

protected int[] leadAtomIndices

wingVectors

protected javax.vecmath.Vector3f[] wingVectors

mads

protected short[] mads

colixes

protected short[] colixes

structureTypes

protected byte[] structureTypes

pointT

private final javax.vecmath.Point3f pointT

iPrev

private int iPrev

iNext

private int iNext

iNext2

private int iNext2

iNext3

private int iNext3

diameterBeg

private int diameterBeg

diameterMid

private int diameterMid

diameterEnd

private int diameterEnd

doCap0

private boolean doCap0

doCap1

private boolean doCap1

screenArrowTop

private final javax.vecmath.Point3i screenArrowTop

screenArrowTopPrev

private final javax.vecmath.Point3i screenArrowTopPrev

screenArrowBot

private final javax.vecmath.Point3i screenArrowBot

screenArrowBotPrev

private final javax.vecmath.Point3i screenArrowBotPrev

ABSOLUTE_MIN_MESH_SIZE

private static final int ABSOLUTE_MIN_MESH_SIZE
See Also:
Constant Field Values

MIN_MESH_RENDER_SIZE

private static final int MIN_MESH_RENDER_SIZE
See Also:
Constant Field Values

controlHermites

private javax.vecmath.Point3f[] controlHermites

wingHermites

private javax.vecmath.Vector3f[] wingHermites

radiusHermites

private javax.vecmath.Point3f[] radiusHermites

norm

private javax.vecmath.Vector3f norm

Z

private final javax.vecmath.Vector3f Z

wing

private final javax.vecmath.Vector3f wing

wing0

private final javax.vecmath.Vector3f wing0

wing1

private final javax.vecmath.Vector3f wing1

wingT

private final javax.vecmath.Vector3f wingT

aa

private final javax.vecmath.AxisAngle4f aa

pt

private final javax.vecmath.Point3f pt

pt1

private final javax.vecmath.Point3f pt1

ptPrev

private final javax.vecmath.Point3f ptPrev

ptNext

private final javax.vecmath.Point3f ptNext

mat

private final javax.vecmath.Matrix3f mat
Constructor Detail

BioShapeRenderer

BioShapeRenderer()
Method Detail

renderBioShape

protected abstract void renderBioShape(BioShape bioShape)

render

protected void render()
Overrides:
render in class MeshRenderer

freeTempArrays

private void freeTempArrays()

initializePolymer

private boolean initializePolymer(BioShape bioShape)

setStructureTypes

private void setStructureTypes()

isHelix

protected boolean isHelix(int i)

calcScreenControlPoints

protected void calcScreenControlPoints()

calcScreenControlPoints

protected void calcScreenControlPoints(javax.vecmath.Point3f[] points)

calcScreens

protected javax.vecmath.Point3i[] calcScreens(float offsetFraction)
calculate screen points based on control points and wing positions (cartoon, strand, meshRibbon, and ribbon)

Parameters:
offsetFraction -
Returns:
Point3i array THAT MUST BE LATER FREED

calc1Screen

private void calc1Screen(javax.vecmath.Point3f center,
                         javax.vecmath.Vector3f vector,
                         short mad,
                         float offset_1000,
                         javax.vecmath.Point3i screen)

getLeadColix

protected short getLeadColix(int i)

setNeighbors

private void setNeighbors(int i)

renderHermiteCylinder

protected void renderHermiteCylinder(javax.vecmath.Point3i[] screens,
                                     int i)

setMads

private boolean setMads(int i,
                        boolean thisTypeOnly)

checkDiameter

private boolean checkDiameter(int d)

renderHermiteConic

protected void renderHermiteConic(int i,
                                  boolean thisTypeOnly)

renderHermiteRibbon

protected void renderHermiteRibbon(boolean doFill,
                                   int i,
                                   boolean thisTypeOnly)

renderHermiteArrowHead

protected void renderHermiteArrowHead(int i)

renderCone

protected void renderCone(int i,
                          javax.vecmath.Point3f pointBegin,
                          javax.vecmath.Point3f pointEnd,
                          javax.vecmath.Point3f screenPtBegin,
                          javax.vecmath.Point3f screenPtEnd)

createMeshCylinder

private boolean createMeshCylinder(int i,
                                   int madBeg,
                                   int madMid,
                                   int madEnd,
                                   int aspectRatio)