edu.mssm.crover.domain2d
Class MultiPointLoopTemplate

java.lang.Object
  |
  +--edu.mssm.crover.domain2d.AbstractLoopTemplate
        |
        +--edu.mssm.crover.domain2d.MultiPointLoopTemplate
All Implemented Interfaces:
LoopTemplate

public class MultiPointLoopTemplate
extends AbstractLoopTemplate
implements LoopTemplate

Provides a multiple control point bezier curve loop template. Instances of these LoopTemplates can potentially define any shape and be adapted to a variety of special cases by changing the number of control points and their locations.


Field Summary
 
Fields inherited from class edu.mssm.crover.domain2d.AbstractLoopTemplate
adapted, controls, entryDirection, exitDirection, FIT, glyph_pos, notFit, spacer, TIMEOUT_EXPIRED, TOO_MUCH_RESIDUES, UNDEFINED
 
Constructor Summary
MultiPointLoopTemplate(java.awt.geom.Point2D spacer, java.awt.geom.Point2D entryDirection, java.awt.geom.Point2D exitDirection, java.awt.geom.Point2D[] controls)
           
 
Method Summary
protected  void adaptWithParameter(double l, java.awt.geom.Point2D[] array)
           
protected  double adjustParameter(double l, int fit)
           
protected  double initialParameter()
           
protected  boolean isParameterValid(double l)
           
static void main(java.lang.String[] args)
           
protected  double parameterMaxValue()
           
protected  double parameterMinValue()
           
protected  void setControls(java.awt.geom.Point2D[] ctrs)
           
 void setParameterMaxValue(double max)
           
 void setSpacer(java.awt.geom.Point2D newspacer)
          Instructs the template to adapt to a new spacer.
 
Methods inherited from class edu.mssm.crover.domain2d.AbstractLoopTemplate
adapt, distance, distance, getAdapted, getControls, getGlyphPositions, getP0, getPn, getSpacer, glyphsNotDisplayed, setPossibleEllipses, spaceResiduesOnAdaptedCurve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.mssm.crover.domain2d.LoopTemplate
adapt, getAdapted, getControls, getGlyphPositions, getP0, getPn, getSpacer, glyphsNotDisplayed, setPossibleEllipses
 

Constructor Detail

MultiPointLoopTemplate

public MultiPointLoopTemplate(java.awt.geom.Point2D spacer,
                              java.awt.geom.Point2D entryDirection,
                              java.awt.geom.Point2D exitDirection,
                              java.awt.geom.Point2D[] controls)
Method Detail

setSpacer

public void setSpacer(java.awt.geom.Point2D newspacer)
Instructs the template to adapt to a new spacer. The control points are scaled by the length of the new spacer over the length of the last one.

Specified by:
setSpacer in interface LoopTemplate
Specified by:
setSpacer in class AbstractLoopTemplate

setControls

protected void setControls(java.awt.geom.Point2D[] ctrs)

isParameterValid

protected boolean isParameterValid(double l)
Specified by:
isParameterValid in class AbstractLoopTemplate

adjustParameter

protected double adjustParameter(double l,
                                 int fit)
Specified by:
adjustParameter in class AbstractLoopTemplate

initialParameter

protected double initialParameter()
Specified by:
initialParameter in class AbstractLoopTemplate

parameterMinValue

protected double parameterMinValue()
Specified by:
parameterMinValue in class AbstractLoopTemplate

parameterMaxValue

protected double parameterMaxValue()
Specified by:
parameterMaxValue in class AbstractLoopTemplate

setParameterMaxValue

public void setParameterMaxValue(double max)

adaptWithParameter

protected void adaptWithParameter(double l,
                                  java.awt.geom.Point2D[] array)
Specified by:
adaptWithParameter in class AbstractLoopTemplate

main

public static void main(java.lang.String[] args)


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.