backend.spheremodel
Class SphereRotatedPointModel
java.lang.Object
java.util.Observable
backend.spheremodel.SphereBasicObject
backend.spheremodel.SpherePointModel
backend.spheremodel.SphereRotatedPointModel
- All Implemented Interfaces:
- java.util.Observer
public class SphereRotatedPointModel
- extends SpherePointModel
- implements java.util.Observer
SphereRotatedPointModel represents a point that has been rotated a fixed
distance from a reference point and with repespect to an axis of rotation.
The SphereRotatedPointModel properly respects the fact that without the axis
of rotation or reference point it is meaningless so if either of those is
removed. The SphereRotatedPointModel will also be removed.
Method Summary |
java.lang.String |
getFileInformation()
getFileInformation will return the correct information that needs to be
written to the file that information is: the label of the axis point, a
space, the label of the reference point, a space, and finally the angle
this point is rotated at. |
void |
setFileInformation(SpherePointModel axis,
SpherePointModel reference,
float rotAngle)
setFileInformation should be used only when reading SphereRotatedPoints
in from a file. |
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 |
SphereRotatedPointModel
public SphereRotatedPointModel(SpherePointModel axis,
SpherePointModel reference,
float rotationAngle)
- SphereRotatedPointModel represents a point that has been rotated via an
axis and with respect to another point. It will stay automagically
updated as either the axis or point of reference move
- Parameters:
axis
- the axis of rotationreference
- the point to rotaterotationAngle
- the angle by which this point should be rotated
SphereRotatedPointModel
public SphereRotatedPointModel(float x,
float y,
float z,
java.lang.String ptLbl)
- This constructor is meant 100% for reading in data from files. It SHOULD
NOT be used for anything else if you use this constructor for another
purpose the code will break and FreeBSD daemons have been known to come
and run unecessary processes on your system. YOU HAVE BEEN WARNED!
SERIOUSLY! As a small side note this function is meant to be used in
combination with setFileInformation. It will not be complete or function
properly if you don't make the proper call to setFileInformation after
this object is constructed.
- Parameters:
x
- the x coordinate for this pointy
- the y coordinate for this pointz
- the z coordinate for this pointptLbl
- is the point label to use for labeling this point
setFileInformation
public void setFileInformation(SpherePointModel axis,
SpherePointModel reference,
float rotAngle)
- setFileInformation should be used only when reading SphereRotatedPoints
in from a file. This function will only work once and with the correct
parameters.
- Parameters:
axis
- is the axis of rotatation for this pointreference
- is the reference point for this pointrotAngle
- is the angle this point is rotated with respect to the
reference
update
public void update(java.util.Observable o,
java.lang.Object arg)
- Specified by:
update
in interface java.util.Observer
getFileInformation
public java.lang.String getFileInformation()
- getFileInformation will return the correct information that needs to be
written to the file that information is: the label of the axis point, a
space, the label of the reference point, a space, and finally the angle
this point is rotated at.
- Returns:
- what the function description says it does