backend.spheremodel
Class SphereLineIntrModel

java.lang.Object
  extended by backend.spheremodel.SphereIntrModel
      extended by backend.spheremodel.SphereLineIntrModel
All Implemented Interfaces:
java.util.Observer

public class SphereLineIntrModel
extends SphereIntrModel
implements java.util.Observer

SphereLineIntersectionModel models the internal details of an intersection


Constructor Summary
SphereLineIntrModel(SphereLineModel line1, SphereLineModel line2, SphereWorldModel theWorld)
          This is the main constructor for the SphereLineIntrModel and should be used for everything except when a sphere is being read in from a file where it is impossible to use this constructor
SphereLineIntrModel(SphereModel theModel, SphereLineModel line1, SphereLineModel line2, SpherePointModel p1, SpherePointModel p2)
          This constructor is ONLY meant to be used when reading a sphere in from a file because it does not do certain steps the normal constructor does .
 
Method Summary
 boolean equals(java.lang.Object checkMe)
           
 SphereLineModel getLineOne()
          getLineOne will get the first line of the intersection
 SphereLineModel getLineTwo()
          getLineTwo will get the second line of intersection
 void update(java.util.Observable arg0, java.lang.Object arg1)
           
 
Methods inherited from class backend.spheremodel.SphereIntrModel
equals, getFirstPoint, getFirstPointBase, getSecondPoint, getSecondPointBase
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphereLineIntrModel

public SphereLineIntrModel(SphereLineModel line1,
                           SphereLineModel line2,
                           SphereWorldModel theWorld)
This is the main constructor for the SphereLineIntrModel and should be used for everything except when a sphere is being read in from a file where it is impossible to use this constructor

Parameters:
line1 - the first line of the intersection
line2 - the second line of the intersection
theWorld - is the SphereWolrdModel that this will be placed in

SphereLineIntrModel

public SphereLineIntrModel(SphereModel theModel,
                           SphereLineModel line1,
                           SphereLineModel line2,
                           SpherePointModel p1,
                           SpherePointModel p2)
This constructor is ONLY meant to be used when reading a sphere in from a file because it does not do certain steps the normal constructor does . So please, do me, and yourself a favor and DON'T use this unless you know EXACTLY what you are doing. I promise you can break things by using this wrong :)

Parameters:
theModel - is the SphereModel that this should be concerned with
line1 - is the first line of the intersection
line2 - is the second line of the intersection
p1 - is the first intersection point of the two lines. It is assumed that this has been setup correctly
p2 - is the second intersection point, but can also be null if no such intersection exists
Method Detail

update

public void update(java.util.Observable arg0,
                   java.lang.Object arg1)
Specified by:
update in interface java.util.Observer

getLineOne

public SphereLineModel getLineOne()
getLineOne will get the first line of the intersection

Returns:
the first line of the intersection

getLineTwo

public SphereLineModel getLineTwo()
getLineTwo will get the second line of intersection

Returns:
the second line of intersection

equals

public boolean equals(java.lang.Object checkMe)
Overrides:
equals in class java.lang.Object