optics
Class Mask

java.lang.Object
  extended by optics.Optics
      extended by optics.Mask
Direct Known Subclasses:
CircularMask

public abstract class Mask
extends Optics

Abstract class to represent a two dimensional mask. This class defines the centre, the shape of the mask defined by the extending classes.


Field Summary
protected  javax.vecmath.Point2d centre
          The centre of the mask
 
Fields inherited from class optics.Optics
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS
 
Constructor Summary
Mask()
           
 
Method Summary
 javax.vecmath.Point2d getCentre()
          Method to get the centre point
 boolean isClear(double x, double y)
          Method to test of mask is clear
 boolean isClear(javax.vecmath.Point2d p)
          Boolean methor to test of mask is clear
protected abstract  boolean isClearAbs(double x, double y)
          Abstract class to define the actual mask
 void scale(double a)
          Method to scale the mask by factor a
 void setCentre(double x, double y)
          Method to set centre of the mask double x the x location double y the y location
 void setCentre(javax.vecmath.Point2d p)
          Method to set the centre with a Point2d
 
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

centre

protected javax.vecmath.Point2d centre
The centre of the mask

Constructor Detail

Mask

public Mask()
Method Detail

isClear

public boolean isClear(double x,
                       double y)
Method to test of mask is clear

Parameters:
x - the x location
y - the y location
Returns:
boolean true if transparent

isClear

public boolean isClear(javax.vecmath.Point2d p)
Boolean methor to test of mask is clear

Parameters:
p - the two-dimensional point
Returns:
boolean true if transparent

isClearAbs

protected abstract boolean isClearAbs(double x,
                                      double y)
Abstract class to define the actual mask

Parameters:
x - the x location
y - the y location
Returns:
boolean true if transparent

setCentre

public void setCentre(double x,
                      double y)
Method to set centre of the mask double x the x location double y the y location


setCentre

public void setCentre(javax.vecmath.Point2d p)
Method to set the centre with a Point2d

Parameters:
p - the centre

scale

public void scale(double a)
Method to scale the mask by factor a

Parameters:
a - the scale factor

getCentre

public javax.vecmath.Point2d getCentre()
Method to get the centre point

Returns:
Point2d the centre