backend.spheremodel
Class SphereParaLineModel

java.lang.Object
  extended by java.util.Observable
      extended by backend.spheremodel.SphereBasicObject
          extended by backend.spheremodel.SphereMultiPointBase
              extended by backend.spheremodel.SphereLineModel
                  extended by backend.spheremodel.SphereParaLineModel
All Implemented Interfaces:
CircleIntersection, java.util.Observer

public class SphereParaLineModel
extends SphereLineModel

The SphereParaLineModel class is used when dealing with parallel transported lines arguably the creation of this class was not absolutley necessary, but it gives us way to indentify a parallel transported line for a normal line and also allows us to have access to the general parallel transport model. In one sense the SphereParaLineModel is merely a wrapper for the SphereLineModel class. The problem is solves is that we needed access to the SphereParaTransModel after a user click so by wrapping the SphereLineModel in this class we had it's versatiliy plus the ability to instantly have this class function while having a low chance of failure.


Nested Class Summary
 
Nested classes/interfaces inherited from class backend.spheremodel.SphereLineModel
SphereLineModel.LineType
 
Constructor Summary
SphereParaLineModel(SphereLineModel theModel)
          The not so default SphereParaLineModel constructor.
SphereParaLineModel(SphereLineModel theModel, SphereParaTransModel transMod)
          The default constructor for the SphereParaLineModel
 
Method Summary
 float getLength()
          getLength will return the length of this line
 int getNumVerticies()
          should return the number of vertices on this line
 SphereParaTransModel getTrans()
          getTrans will return the SphereParaTransModel that this is part of
 boolean isIntersectionPtOnLine(javax.vecmath.Point3f checkMe)
          This function is ONLY for use with getIntersectionPoints because it assumes the points passed in lies on the great circle formed by the line in question.
 void setTrans(SphereParaTransModel newTrans)
          setTrans can be used to set the SphereParaTransModel that conrols this SphereParaTransModel.
 
Methods inherited from class backend.spheremodel.SphereLineModel
equals, getFirstPoint, getIntersectionPoints, getLineFromCirc, getLineType, getNormalVecToPlane, getPointsOnLine, getSecondPoint, update
 
Methods inherited from class backend.spheremodel.SphereBasicObject
addChild, getChild, getChildCount, getSelected, isBeingRemoved, isHidden, notifyFamily, removeChild, setBeingRemoved, setHidden, setSelected
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphereParaLineModel

public SphereParaLineModel(SphereLineModel theModel,
                           SphereParaTransModel transMod)
The default constructor for the SphereParaLineModel

Parameters:
theModel - the SphereLineModel that we will be representing
transMod - is the SphereParaTransModel that controls this

SphereParaLineModel

public SphereParaLineModel(SphereLineModel theModel)
The not so default SphereParaLineModel constructor. This constructor is strictly for use with reading in SphereParaLineModels from files. Of course I have no real way of enforcing this, but this constructor does not fully initalize the SphereParaLineModel so if you use it you MUST properly set the SphereParaTransModel that needs to be associated with this SphereParaLineModel

Parameters:
theModel - the SphereLineModel to be
Method Detail

setTrans

public void setTrans(SphereParaTransModel newTrans)
setTrans can be used to set the SphereParaTransModel that conrols this SphereParaTransModel. Note that this constructor can only be called if the file reading constructor was used.

Parameters:
newTrans - the new SphereParaTransModel to use for this SphereParaLineModel.

getTrans

public SphereParaTransModel getTrans()
getTrans will return the SphereParaTransModel that this is part of

Returns:
the SphereParaTransModel this SphereLineModel is part of.

getLength

public float getLength()
Description copied from class: SphereLineModel
getLength will return the length of this line

Specified by:
getLength in class SphereLineModel
Returns:
the length of the line

isIntersectionPtOnLine

public boolean isIntersectionPtOnLine(javax.vecmath.Point3f checkMe)
Description copied from class: SphereLineModel
This function is ONLY for use with getIntersectionPoints because it assumes the points passed in lies on the great circle formed by the line in question. It SHOULD NOT be used to try and tell if a point is on a line!

Specified by:
isIntersectionPtOnLine in class SphereLineModel
Parameters:
checkMe - The point to check against this line
Returns:
True if it's on the line false if it's not

getNumVerticies

public int getNumVerticies()
Description copied from class: SphereMultiPointBase
should return the number of vertices on this line

Specified by:
getNumVerticies in class SphereMultiPointBase