org.kabeja.dxf.helpers
Class HatchLineIterator

java.lang.Object
  extended by org.kabeja.dxf.helpers.HatchLineIterator
All Implemented Interfaces:
java.util.Iterator

public class HatchLineIterator
extends java.lang.Object
implements java.util.Iterator

Author:
Field Summary
protected  double angle
           
protected  java.util.List bounderyEdges
           
protected  double currentWalkingStep
           
protected  Bounds hatchBounds
           
protected  double length
           
static double LIMIT
           
protected  HatchLineFamily pattern
           
protected  ParametricLine patternLine
           
protected  Vector r
           
protected  double tmax
           
protected  double tmin
           
protected  Vector v
           
protected  double walkingLength
           
 
Constructor Summary
HatchLineIterator(DXFHatch hatch, HatchLineFamily pattern)
           
 
Method Summary
protected  void calculateIntersection(double x, double y)
           
protected  Point getPoint(double m, double n)
           
protected  double[] getRasterValues(double x, double y)
          calculate the m and n raster values of a given point.
 boolean hasNext()
           
protected  void initialize()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIMIT

public static final double LIMIT
See Also:
Constant Field Values

angle

protected double angle

hatchBounds

protected Bounds hatchBounds

pattern

protected HatchLineFamily pattern

length

protected double length

v

protected Vector v

r

protected Vector r

bounderyEdges

protected java.util.List bounderyEdges

patternLine

protected ParametricLine patternLine

tmin

protected double tmin

tmax

protected double tmax

walkingLength

protected double walkingLength

currentWalkingStep

protected double currentWalkingStep
Constructor Detail

HatchLineIterator

public HatchLineIterator(DXFHatch hatch,
                         HatchLineFamily pattern)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

initialize

protected void initialize()

calculateIntersection

protected void calculateIntersection(double x,
                                     double y)

getRasterValues

protected double[] getRasterValues(double x,
                                   double y)
calculate the m and n raster values of a given point.

Returns:
the raster values, where v[0]=m and v[1]=n

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

getPoint

protected Point getPoint(double m,
                         double n)