|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
backend.spheremodel.SphereWorldModel
public class SphereWorldModel
SphereWorldModel is a model of the sphere as well as objects that would placed on the sphere points, lines, etc...
Constructor Summary | |
---|---|
SphereWorldModel(float sphereRad)
SphereWorldModel constructor takes a radius to ouse for he radius of the sphere to model |
Method Summary | |
---|---|
boolean |
addCircle(SphereCircleModel addMe)
addCircle will add the given SphereCircleModel into the model |
void |
addGreatCircle(SpherePointModel firstPoint,
SpherePointModel secondPoint)
addGreatCircle adds a great circle to the model based on the given points |
boolean |
addIntersection(SphereMultiPointBase firstLine,
SphereMultiPointBase secondLine)
addIntersection will add an intersection to the SphereWorldModel |
void |
addLongLine(SpherePointModel firstPoint,
SpherePointModel secondPoint)
addLongLine will add a long line to the sphere given the two points |
boolean |
addParaTrans(SphereParaTransModel newTrans)
addParaTrans will allow a parallel transport model to be added to the backend while allowing the frontend to now have to change :) |
boolean |
addPoint(float x,
float y,
float z)
addPoint needs to be given an x y and z coordinate in world coordinates and it will be added to the sphere If either x or y or z is NaN it will not plot a point. |
boolean |
addPoint(javax.vecmath.Point3f addMe)
addPoint will add a Point3f as a point after checking if it's a duplicate |
boolean |
addPoint(SpherePointModel addMe)
addPoint will add a point to the model |
boolean |
addPotentialDuplicatePoint(SpherePointModel addMe)
addPotentialDuplicatePoint will add a point that might be a duplicate. |
void |
addShortLine(SpherePointModel firstPoint,
SpherePointModel secondPoint)
addShortLine will add a short line to the sphere given two points |
SphereBasicObject |
getLastAdded()
getLastAdded returns the last SphereBasicObject added to the world |
SphereBasicObject |
getLastObjectRemoved()
getLastObjectRemoved returns the last SphereBasicObject removed from the SphereWorldModel |
SphereModel |
getSphereModel()
getLastRemoved returns the SphereModel we are using to model our sphere |
void |
readDataFromFile(SphereFileReader myFileReader)
readDataFromFile will take the data out of a SphereFileReader and set the sphere up correctly with it |
void |
removeObject(SphereBasicObject removeMe)
removeObject will remove a given SphereBasicObject from the model if it exists otherwise it won't do anything all children of the object will also be removed. |
void |
reset()
reset will reset the SphereWorldModel and sent out a RESET_NOT notification |
void |
writeSphereToFile(SphereFileWriter writeToMe)
writeSphereToFile will take the contents of this sphere and write it out to a file |
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SphereWorldModel(float sphereRad)
sphereRad
- Method Detail |
---|
public boolean addCircle(SphereCircleModel addMe)
addMe
- the SphereCircleModel to add
public boolean addPotentialDuplicatePoint(SpherePointModel addMe)
addMe
-
public boolean addParaTrans(SphereParaTransModel newTrans)
newTrans
- is the new SphereParaTransModel to add
public boolean addPoint(float x, float y, float z)
x
- - x value in world coordinatesy
- - y value in world coordinatesz
- - z value in world coordinates
public boolean addPoint(SpherePointModel addMe)
addMe
-
public boolean addPoint(javax.vecmath.Point3f addMe)
addMe
- the Point3f to addpublic void addGreatCircle(SpherePointModel firstPoint, SpherePointModel secondPoint)
firstPoint
- is the first point to be added to the modelsecondPoint
- is the second point to be added to the modelpublic void addLongLine(SpherePointModel firstPoint, SpherePointModel secondPoint)
firstPoint
- is the first point defining the linesecondPoint
- is the second point defining the linepublic void addShortLine(SpherePointModel firstPoint, SpherePointModel secondPoint)
firstPoint
- is the first point defining the linesecondPoint
- is the second point defining the linepublic boolean addIntersection(SphereMultiPointBase firstLine, SphereMultiPointBase secondLine)
firstLine
- is the first line of the intersection to addsecondLine
- is the second line of the intersection to add
public void removeObject(SphereBasicObject removeMe)
removeMe
- the object to removepublic SphereBasicObject getLastObjectRemoved()
public SphereBasicObject getLastAdded()
public SphereModel getSphereModel()
public void writeSphereToFile(SphereFileWriter writeToMe)
writeToMe
- is the SphereFileWriter to write data topublic void readDataFromFile(SphereFileReader myFileReader)
myFileReader
- is the file reader to get the data frompublic void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |