fi.jyu.phys.grain.sort.gates
Class GrainGate2D

java.lang.Object
  extended by fi.jyu.phys.grain.sort.gates.GrainGate2D

public class GrainGate2D
extends java.lang.Object

A simple 2-dimensional gate. These gates can be created through the Grain Analyser. Right-click a matrix, select Gates-Define 2D gate. Left-click around your gate, middle-click to end. A file chooser is used to save a file into which the gate is saved.

Author:
pajura

Constructor Summary
GrainGate2D(java.lang.String name)
          Creates a new instance of GrainGate1D
 
Method Summary
 boolean passes(double x, double y)
          Tests the x,y coordinate pair against this gate.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrainGate2D

public GrainGate2D(java.lang.String name)
Creates a new instance of GrainGate1D

Parameters:
name - Name of a file containing a serialised java.awt.Shape. If file name is not absolute, it is searched from the Sort Directory specified in the preferences.
Method Detail

passes

public boolean passes(double x,
                      double y)
Tests the x,y coordinate pair against this gate.

Parameters:
x - The x-coordinate to be tested.
y - The y-coordinate to be tested.
Returns:
True, if the point lies inside the gate, otherwise false.