backend.spheremodel
Class SphereIntrModel

java.lang.Object
  extended by backend.spheremodel.SphereIntrModel
Direct Known Subclasses:
CircleIntersectionBase, SphereLineIntrModel

public class SphereIntrModel
extends java.lang.Object

SphereIntrModel is a base class for intersections


Constructor Summary
SphereIntrModel(SphereModel theSphere, SphereMultiPointBase pb1, SphereMultiPointBase pb2, SpherePointIntrModel point1, SpherePointIntrModel point2)
          SphereIntrModel file reading constructor should only be called when reading intersections in from file.
SphereIntrModel(SphereWorldModel theWorld, SphereModel theSphere, SphereMultiPointBase pb1, SphereMultiPointBase pb2)
          SphereIntrModel default constructor should be called by any class which extends the SphereIntrModel
 
Method Summary
 boolean equals(SphereMultiPointBase pb1, SphereMultiPointBase pb2)
          this equals method can be used to see if two potentional intersection lines would create the same intersection as what already exists.
 SpherePointIntrModel getFirstPoint()
          getFirstPoint will return the first intersection point
 SphereMultiPointBase getFirstPointBase()
          getFirstPointBase will return the first point base that this SphereIntrModel is modeling
 SpherePointIntrModel getSecondPoint()
          getSecondPoint will return the second intersection point
 SphereMultiPointBase getSecondPointBase()
          getFirstPointBase will return the first point base that this SphereIntrModel is modeling
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphereIntrModel

public SphereIntrModel(SphereWorldModel theWorld,
                       SphereModel theSphere,
                       SphereMultiPointBase pb1,
                       SphereMultiPointBase pb2)
SphereIntrModel default constructor should be called by any class which extends the SphereIntrModel

Parameters:
theWorld - is the SphereWorldModel which this intersection is a part of
theSphere - is the SphereModel to deal with
pb1 - is the first SphereMultiPointBase used in this intersection
pb2 - is the second SphereMultiPointBase used in this intersection

SphereIntrModel

public SphereIntrModel(SphereModel theSphere,
                       SphereMultiPointBase pb1,
                       SphereMultiPointBase pb2,
                       SpherePointIntrModel point1,
                       SpherePointIntrModel point2)
SphereIntrModel file reading constructor should only be called when reading intersections in from file.

Parameters:
theSphere - is the SphereModel for us to gather sphere information from
pb1 - is the first SphereMultiPointBase for this intersection
pb2 - is the second SphereMultiPointBase for this intersection
point1 - is the first SphereIntrPointModel
point2 - is the second SphereIntrPointModel
Method Detail

getFirstPoint

public SpherePointIntrModel getFirstPoint()
getFirstPoint will return the first intersection point

Returns:
the first intersection point

getSecondPoint

public SpherePointIntrModel getSecondPoint()
getSecondPoint will return the second intersection point

Returns:
the second point of intersection

getFirstPointBase

public SphereMultiPointBase getFirstPointBase()
getFirstPointBase will return the first point base that this SphereIntrModel is modeling

Returns:
the first SphereMultiPointBase

getSecondPointBase

public SphereMultiPointBase getSecondPointBase()
getFirstPointBase will return the first point base that this SphereIntrModel is modeling

Returns:
the first SphereMultiPointBase

equals

public boolean equals(SphereMultiPointBase pb1,
                      SphereMultiPointBase pb2)
this equals method can be used to see if two potentional intersection lines would create the same intersection as what already exists. Please know that this method tries both combinations of firstLine and secondLine so you only need to call it once for a full comparison!

Parameters:
firstLine - the first line for comparison
secondLine - the second line for comparison
Returns:
true if the two lines passed in would create _this_ intersection false if not