edu.sdsc.mbt.viewers.GLViewerImpl
Class SsGeometry

java.lang.Object
  extended byedu.sdsc.mbt.viewers.GLViewerImpl.GeometryEntity
      extended byedu.sdsc.mbt.viewers.GLViewerImpl.SsGeometry
Direct Known Subclasses:
CoilGeometry, HelixGeometry, StrandGeometry

public class SsGeometry
extends GeometryEntity

SsGeometry is the base class for the geometry of all Secondary Structure objects.

Author:
Apostol Gramada

Field Summary
static java.util.HashMap colorCache
           
static java.util.HashMap colorReference
          This hash is used to look up float[] values by a reference to a Color object
 
Constructor Summary
SsGeometry()
           
 
Method Summary
static void drawSs(Chain c, javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, com.sun.opengl.util.GLUT glut, StructureMap structureMap, StructureStyles styles, boolean ribbon)
          Builds a scene of the secondary structures, the list of SS being the one produced by the StructureMap argument based on what is explicitely available in the data source file or from the Kabsch-Sander algorithm.
static void drawSs(Chain c, javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, com.sun.opengl.util.GLUT glut, StructureMap structureMap, StructureStyles styles, boolean ribbon, float helixQuality, float strandQuality, float turnQuality, float coilQuality, int helixSmoothingSteps, int strandSmoothingSteps, int turnSmoothingSteps, int coilSmoothingSteps, int helixCsType, int strandCsType, int turnCsType, int coilCsType, int helixSsShape)
          Builds a scene of the secondary structures, the list of SS being the one produced by the StructureMap argument based on what is explicitely available in the data source file or from the Kabsch-Sander algorithm.
static void drawSs(Chain c, javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, com.sun.opengl.util.GLUT glut, StructureMap structureMap, StructureStyles styles, boolean ribbon, int helixSmoothingSteps, int strandSmoothingSteps, int turnSmoothingSteps, int coilSmoothingSteps)
          Builds a scene of the secondary structures, the list of SS being the one produced by the StructureMap argument based on what is explicitely available in the data source file or from the Kabsch-Sander algorithm.
static void drawSs(Chain c, javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, com.sun.opengl.util.GLUT glut, StructureMap structureMap, StructureStyles styles, boolean ribbon, int helixSmoothingSteps, int strandSmoothingSteps, int turnSmoothingSteps, int coilSmoothingSteps, int helixSsShape)
          Builds a scene of the secondary structures, the list of SS being the one produced by the StructureMap argument based on what is explicitely available in the data source file or from the Kabsch-Sander algorithm.
 int getClosestResidueIndex(float[] point)
          Returns the index of the closest residue to the given point, with the given color.
 java.awt.Color[] getColorMap()
          Returns the color map from a given set of float arrays.
 boolean getHighlightState()
           
 SsGeometry getNextSs()
          Returns the next Secondary Structure geometry (in a chain for instance)
 Vec3f getNextToFirstCa()
          First CA coord (after smoothing) may be needed outside for imposing continuity Deprecated
 float[] getNextToFirstCaCoord()
          First CA coord (after smoothing) may be needed outside for imposing continuity
 SsGeometry getPreviousSs()
          Returns the previous Secondary Structure geometry (in a chain for instance)
 Vec3f getPreviousToLastCa()
          Get Previous to last CA coord (after smoothing) may be needed outside for imposing continuity Deprecated
 float[] getPreviousToLastCaCoord()
          Previous to last CA coord (after smoothing) may be needed outside for imposing continuity
 int getPriestleSteps()
           
 java.lang.Object getUserData()
          Returns information (annotation) provided by the user
 boolean[] getVisibilityMap()
           
 void highlight(float[] color)
          Highlights the whole fragment with the given color.
 void highlightClosestResidue(float[] point, float[] color)
          Highlights the closest residue to the given point, with the given color.
 void highlightResidue(int index, float[] color)
          Hightlights the portion of SS sorounding residue at index.
 void highlightResidueRegion(int index, float[] color)
          Hightlights the portion of SS sorounding residue at index.
 boolean isLeftExtended()
          Set a flag that the fragment has been extended to the left to fill a gap
 boolean isRightExtended()
          Set a flag that the fragment has been extended to the right to fill a gap
 void resetColor()
          Resets the whole fragment to the original color map.
 void resetGeometryColor()
          Resets the vertex color in the geometry shape of this SsGeometry object.
 void resetRibbonColor(int index)
          Resets the color of the portion of SS sorounding residue at index.
 void setColorMap(java.awt.Color[] color)
          Sets the color map from a given set of colors Deprecated
 void setCoordinates(float[][] coord)
          Sets the coordinates along which to draw the spine.
 void setCoordinates(Vec3f[] coords)
          Sets the coordinates along which to draw the spine.
 void setCrossSectionStyle(CrossSectionStyle csStyle)
          Sets the cross section style
 void setCrossSectionType(int type)
          Sets the cross section type
 void setLeftExtended(boolean extend)
          Set a flag that the fragment has been extended to the left to fill a gap
 void setNextCaCoord(float[] coord)
          Set Next Ca atom coordinate
 void setNextCaCoord(Vec3f coord)
          Set Next Ca atom coordinate Deprecated
 void setNextSs(SsGeometry ss)
          Sets the next Secondary Structure geometry (in a chain for instance)
 void setPreviousCaCoord(float[] coord)
          Set Previous Ca atom coordinate.
 void setPreviousCaCoord(Vec3f coord)
          Set Previous Ca atom coordinate.
 void setPreviousSs(SsGeometry ss)
          Sets the previous Secondary Structure geometry (in a chain for instance)
 void setPriestleSteps(int i)
          Set the number of steps done in smoothing coordinates
 void setRightExtended(boolean extend)
          Set a flag that the fragment has been extended to the right to fill a gap
 void setRoundedShape(boolean round)
          Whether the shape should be rounded or not
 void setSegmentCount(int seg)
          Set number of segments to be drawn between any two consecutive CA positions.
 void setUserData(java.lang.Object info)
          Sets information (annotation) provided by the user
 void setVisibilityMap(boolean[] vis)
           
 
Methods inherited from class edu.sdsc.mbt.viewers.GLViewerImpl.GeometryEntity
drawJoglGeometry, getQuality, setQuality
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colorCache

public static java.util.HashMap colorCache

colorReference

public static java.util.HashMap colorReference
This hash is used to look up float[] values by a reference to a Color object

Constructor Detail

SsGeometry

public SsGeometry()
Method Detail

drawSs

public static void drawSs(Chain c,
                          javax.media.opengl.GL gl,
                          javax.media.opengl.glu.GLU glu,
                          com.sun.opengl.util.GLUT glut,
                          StructureMap structureMap,
                          StructureStyles styles,
                          boolean ribbon)
                   throws FragmentTooShortException
Builds a scene of the secondary structures, the list of SS being the one produced by the StructureMap argument based on what is explicitely available in the data source file or from the Kabsch-Sander algorithm. **JB converted to work on a single chain...

Throws:
FragmentTooShortException

drawSs

public static void drawSs(Chain c,
                          javax.media.opengl.GL gl,
                          javax.media.opengl.glu.GLU glu,
                          com.sun.opengl.util.GLUT glut,
                          StructureMap structureMap,
                          StructureStyles styles,
                          boolean ribbon,
                          int helixSmoothingSteps,
                          int strandSmoothingSteps,
                          int turnSmoothingSteps,
                          int coilSmoothingSteps)
                   throws FragmentTooShortException
Builds a scene of the secondary structures, the list of SS being the one produced by the StructureMap argument based on what is explicitely available in the data source file or from the Kabsch-Sander algorithm. **JB converted to work on a single chain...

Throws:
FragmentTooShortException

drawSs

public static void drawSs(Chain c,
                          javax.media.opengl.GL gl,
                          javax.media.opengl.glu.GLU glu,
                          com.sun.opengl.util.GLUT glut,
                          StructureMap structureMap,
                          StructureStyles styles,
                          boolean ribbon,
                          int helixSmoothingSteps,
                          int strandSmoothingSteps,
                          int turnSmoothingSteps,
                          int coilSmoothingSteps,
                          int helixSsShape)
                   throws FragmentTooShortException
Builds a scene of the secondary structures, the list of SS being the one produced by the StructureMap argument based on what is explicitely available in the data source file or from the Kabsch-Sander algorithm. **JB converted to work on a single chain...

Throws:
FragmentTooShortException

drawSs

public static void drawSs(Chain c,
                          javax.media.opengl.GL gl,
                          javax.media.opengl.glu.GLU glu,
                          com.sun.opengl.util.GLUT glut,
                          StructureMap structureMap,
                          StructureStyles styles,
                          boolean ribbon,
                          float helixQuality,
                          float strandQuality,
                          float turnQuality,
                          float coilQuality,
                          int helixSmoothingSteps,
                          int strandSmoothingSteps,
                          int turnSmoothingSteps,
                          int coilSmoothingSteps,
                          int helixCsType,
                          int strandCsType,
                          int turnCsType,
                          int coilCsType,
                          int helixSsShape)
                   throws FragmentTooShortException
Builds a scene of the secondary structures, the list of SS being the one produced by the StructureMap argument based on what is explicitely available in the data source file or from the Kabsch-Sander algorithm. **JB converted to work on a single chain...

Throws:
FragmentTooShortException

setCrossSectionType

public void setCrossSectionType(int type)
Sets the cross section type


setCrossSectionStyle

public void setCrossSectionStyle(CrossSectionStyle csStyle)
Sets the cross section style


setRoundedShape

public void setRoundedShape(boolean round)
Whether the shape should be rounded or not


setSegmentCount

public void setSegmentCount(int seg)
Set number of segments to be drawn between any two consecutive CA positions.


setCoordinates

public void setCoordinates(Vec3f[] coords)
Sets the coordinates along which to draw the spine. Deprecated, use setCoordinates with an array of float[] as an argument instead.


setCoordinates

public void setCoordinates(float[][] coord)
Sets the coordinates along which to draw the spine.


setPreviousSs

public void setPreviousSs(SsGeometry ss)
Sets the previous Secondary Structure geometry (in a chain for instance)


setNextSs

public void setNextSs(SsGeometry ss)
Sets the next Secondary Structure geometry (in a chain for instance)


setLeftExtended

public void setLeftExtended(boolean extend)
Set a flag that the fragment has been extended to the left to fill a gap


setRightExtended

public void setRightExtended(boolean extend)
Set a flag that the fragment has been extended to the right to fill a gap


setPreviousCaCoord

public void setPreviousCaCoord(Vec3f coord)
Set Previous Ca atom coordinate. Deprecated.


setPreviousCaCoord

public void setPreviousCaCoord(float[] coord)
Set Previous Ca atom coordinate.


setNextCaCoord

public void setNextCaCoord(Vec3f coord)
Set Next Ca atom coordinate Deprecated


setNextCaCoord

public void setNextCaCoord(float[] coord)
Set Next Ca atom coordinate


setColorMap

public void setColorMap(java.awt.Color[] color)
Sets the color map from a given set of colors Deprecated


setVisibilityMap

public void setVisibilityMap(boolean[] vis)

setUserData

public void setUserData(java.lang.Object info)
Sets information (annotation) provided by the user


resetGeometryColor

public void resetGeometryColor()
Resets the vertex color in the geometry shape of this SsGeometry object.


getClosestResidueIndex

public int getClosestResidueIndex(float[] point)
Returns the index of the closest residue to the given point, with the given color.


highlightClosestResidue

public void highlightClosestResidue(float[] point,
                                    float[] color)
Highlights the closest residue to the given point, with the given color.


highlight

public void highlight(float[] color)
Highlights the whole fragment with the given color.


resetColor

public void resetColor()
Resets the whole fragment to the original color map.


getColorMap

public java.awt.Color[] getColorMap()
Returns the color map from a given set of float arrays.


getVisibilityMap

public boolean[] getVisibilityMap()

getPreviousSs

public SsGeometry getPreviousSs()
Returns the previous Secondary Structure geometry (in a chain for instance)


getNextSs

public SsGeometry getNextSs()
Returns the next Secondary Structure geometry (in a chain for instance)


getHighlightState

public boolean getHighlightState()

highlightResidueRegion

public void highlightResidueRegion(int index,
                                   float[] color)
Hightlights the portion of SS sorounding residue at index.


highlightResidue

public void highlightResidue(int index,
                             float[] color)
Hightlights the portion of SS sorounding residue at index.


resetRibbonColor

public void resetRibbonColor(int index)
Resets the color of the portion of SS sorounding residue at index.


getUserData

public java.lang.Object getUserData()
Returns information (annotation) provided by the user


isLeftExtended

public boolean isLeftExtended()
Set a flag that the fragment has been extended to the left to fill a gap


isRightExtended

public boolean isRightExtended()
Set a flag that the fragment has been extended to the right to fill a gap


getNextToFirstCa

public Vec3f getNextToFirstCa()
First CA coord (after smoothing) may be needed outside for imposing continuity Deprecated


getNextToFirstCaCoord

public float[] getNextToFirstCaCoord()
First CA coord (after smoothing) may be needed outside for imposing continuity


getPreviousToLastCa

public Vec3f getPreviousToLastCa()
Get Previous to last CA coord (after smoothing) may be needed outside for imposing continuity Deprecated


getPreviousToLastCaCoord

public float[] getPreviousToLastCaCoord()
Previous to last CA coord (after smoothing) may be needed outside for imposing continuity


setPriestleSteps

public void setPriestleSteps(int i)
Set the number of steps done in smoothing coordinates


getPriestleSteps

public int getPriestleSteps()