backend.spheremodel
Class SpherePointLineModel
java.lang.Object
java.util.Observable
backend.spheremodel.SphereBasicObject
backend.spheremodel.SpherePointModel
backend.spheremodel.SpherePointLineModel
- All Implemented Interfaces:
- java.util.Observer
public class SpherePointLineModel
- extends SpherePointModel
- implements java.util.Observer
SpherePointLineModel tries to model a point that is placed on a line. The
point should remain on the line when being moved around. That is its greatest
ability right now.
Method Summary |
SphereLineModel |
getLine()
getLine returns the line this point is part of. |
void |
setLine(SphereLineModel myLine)
setLine should be used when reading in a SpherePointLineModel from a
file. |
void |
setLocation(javax.vecmath.Point3f newLoc)
setLocation will change the location of this point |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
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 |
SpherePointLineModel
public SpherePointLineModel(javax.vecmath.Point3f loc,
SphereLineModel parent)
- SpherePointModel default constructor will make a point that will adhere
to the given live
- Parameters:
loc
- a point that is really really close to being on the line
alreadyparent
- the line to place the point on
SpherePointLineModel
public SpherePointLineModel(float x,
float y,
float z,
java.lang.String ptLbl)
setLine
public void setLine(SphereLineModel myLine)
- setLine should be used when reading in a SpherePointLineModel from a
file. This function will only work if the second constructor is used to
further try and enforce its usage for file reading ONLY
- Parameters:
myLine
- the line to make this point a parent of.
setLocation
public void setLocation(javax.vecmath.Point3f newLoc)
- Description copied from class:
SpherePointModel
- setLocation will change the location of this point
- Overrides:
setLocation
in class SpherePointModel
- Parameters:
newLoc
- - New location for the point
update
public void update(java.util.Observable o,
java.lang.Object arg)
- Specified by:
update
in interface java.util.Observer
getLine
public SphereLineModel getLine()
- getLine returns the line this point is part of. Truthfully this function
is meant for saving to files so please avoid using it if at all possible.
- Returns:
- the SphereLineModel of this SpherePointLine