| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoptics.Optics
optics.Ray
public abstract class Ray
Abstract class to represent a ray. All other rays
     types extend this class. The only ray attributes implemented
     here are wavelength, intensity and the RayMonitor.
| Field Summary | |
|---|---|
| protected  double | intensityThe intensity of the ray, defaults to unity. | 
| protected  RayMonitor | monitorThe RayMonitor, defaults tonull | 
| protected  double | waveLengthWavelength of the ray in microns, defaults to current default wavelength Optics.DEFAULT_WAVELENGTH | 
| Fields inherited from class optics.Optics | 
|---|
| DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS | 
| Constructor Summary | |
|---|---|
| Ray() | |
| Method Summary | |
|---|---|
|  void | addMonitor(RayMonitor m)Method to add a RayMonitorto this ray. | 
|  void | clearMonitor()Method to remove the RayMonitorfrom this ray. | 
|  double | getIntensity()Method to get the ray intensity | 
|  RayMonitor | getMonitor()Method to get the RayMonitor, which may be nullif not set. | 
| abstract  Position | getPosition()Abstract method to get the Ray Position in three dimensions. | 
|  double | getWaveLength()Method to get the wavelength in microns. | 
| abstract  boolean | isInvalid()Method to test if a ray is invalid. | 
|  boolean | isValid()Method to test if a ray is valid. | 
|  void | monitorUpdate()Method to update RayMonitor(if it is defines). | 
| abstract  javax.vecmath.Point2d | pointInPlane(double plane)Abstract method to calculate the point where this ray will intersect a x/y plane specified by it location on the optical z-axis. | 
|  void | setIntensity(double i)Method to set the ray intensity | 
| abstract  void | setInvalid()Method to set the ray as invalid. | 
|  void | setWaveLength(double lambda)Method to set the wavelength specified in microns. | 
| Methods inherited from class optics.Optics | 
|---|
| getDefaultWaveLength, getErrorStream, getFormatString, getName, getStaticName, getVersion, printError, setDefaultWaveLength, setErrorStream, setFormatString, setMicrons | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected double waveLength
Optics.DEFAULT_WAVELENGTH
protected double intensity
protected RayMonitor monitor
RayMonitor, defaults to null
| Constructor Detail | 
|---|
public Ray()
| Method Detail | 
|---|
public void setWaveLength(double lambda)
lambda - the wavelength in microns.public double getWaveLength()
double the wavelength in microns.public void setIntensity(double i)
i - the intensitypublic double getIntensity()
double the intensitypublic abstract void setInvalid()
public abstract boolean isInvalid()
boolean true if ray is NOT valid.public boolean isValid()
boolean true if ray is NOT validpublic void addMonitor(RayMonitor m)
RayMonitor to this ray. The 
     RayMonitor
     is automatically called every-time the ray position changes.
m - the monitorRayMonitorpublic RayMonitor getMonitor()
null
     if not set.
RayMonitor the current RayMonitor.public void clearMonitor()
RayMonitor 
     from this ray. The RayMonitor
     will be set null and further calls to
     monitorUpdate() will be ignored.
public void monitorUpdate()
RayMonitor (if it is defines). 
      This is automatically called every time the position
      of the Ray changes. This method is not normally called by 
      users, but may be useful in real-time or graphical applications.
      If the RayMonitor is null, then this 
      call is ignored without error.
public abstract Position getPosition()
Position the ray position.public abstract javax.vecmath.Point2d pointInPlane(double plane)
plane - the z location of the plane
Point2d the location in the plane.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||