optics
Class CircularMask

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

public class CircularMask
extends Mask

Method to implement a circular mask, being s cirle of fixed radius.


Field Summary
protected  double outerRadius
          Outer radius of mask.
 
Fields inherited from class optics.Mask
centre
 
Fields inherited from class optics.Optics
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS
 
Constructor Summary
CircularMask(double r)
          Form a circular mask of specified radius with a default origin at (0,0).
CircularMask(double r, javax.vecmath.Point2d c)
          Form a circular mask of specified radius with a specified centre.
 
Method Summary
 double getOuterRadius()
          Method to get the outer radius
protected  boolean isClearAbs(double x, double y)
          Method to specify the mask wrt to the centre
 void scale(double a)
          Method to scale by a factor a
 void setOuterRadius(double r)
          Method to set the radius of the mask
 
Methods inherited from class optics.Mask
getCentre, isClear, isClear, setCentre, setCentre
 
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

outerRadius

protected double outerRadius
Outer radius of mask.

Constructor Detail

CircularMask

public CircularMask(double r)
Form a circular mask of specified radius with a default origin at (0,0).

Parameters:
r - the outer radius

CircularMask

public CircularMask(double r,
                    javax.vecmath.Point2d c)
Form a circular mask of specified radius with a specified centre.

Parameters:
r - the outer radius.
c - the centre of the mask.
Method Detail

setOuterRadius

public void setOuterRadius(double r)
Method to set the radius of the mask

Parameters:
r - the radius

getOuterRadius

public double getOuterRadius()
Method to get the outer radius

Returns:
double the outer radius

scale

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

Overrides:
scale in class Mask
Parameters:
a - the scale factor

isClearAbs

protected boolean isClearAbs(double x,
                             double y)
Method to specify the mask wrt to the centre

Specified by:
isClearAbs in class Mask
Parameters:
x - the x location
y - the y location
Returns:
boolean true if transparent