|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Wave2D
Programm: Wave
Copyright: 2002 Andreas Gohr, Frank Schubert
License: GPL2 or higher
Info: Creates a Wave Shape
Constructor Summary | |
Wave2D()
empty Constructor - initializes the wave with the values of a normal sinus curve |
|
Wave2D(double A,
double lambda,
double phi)
constructor - takes amplitude, wavelength and phaseshift |
|
Wave2D(double A,
double lambda,
double phi,
double start,
double end)
constructor - takes amplitude, wavelength, phaseshift, start- and endpoint |
Method Summary | |
double |
calcWave(double x)
calculates the amplitude for x |
boolean |
contains(double x,
double y)
the wave has no inside this returns always false |
boolean |
contains(double x,
double y,
double w,
double h)
the wave has no inside this returns always false |
boolean |
contains(java.awt.geom.Point2D p)
the wave has no inside this returns always false |
boolean |
contains(java.awt.geom.Rectangle2D r)
the wave has no inside this returns always false |
java.awt.Rectangle |
getBounds()
returns the bounding box |
java.awt.geom.Rectangle2D |
getBounds2D()
returns the bounding box |
double |
getEnd()
gets last point to draw |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
returns new WaveIterator |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
returns new WaveIterator |
double |
getScale()
returns the actual scale |
double |
getStart()
gets first point to draw |
boolean |
intersects(double x,
double y,
double w,
double h)
returns always true - this may be wrong? |
boolean |
intersects(java.awt.geom.Rectangle2D r)
returns always true - this may be wrong? |
void |
setAmplitude(double A)
sets amplitude |
void |
setEnd(double end)
sets last point to draw |
void |
setPhase(double phi)
sets phaseshift |
void |
setScale(double scale)
sets scale - the wave is calculated in 0.1 steps to calculate the x-value of the point where the actual amplitude is to be drawn the current index is multiplicated by this value. |
void |
setStart(double start)
sets first point to draw |
void |
setWaveLength(double lambda)
sets wavelength |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Wave2D()
public Wave2D(double A, double lambda, double phi)
public Wave2D(double A, double lambda, double phi, double start, double end)
Method Detail |
public void setEnd(double end)
public double getEnd()
public void setStart(double start)
public double getStart()
public void setAmplitude(double A)
public void setWaveLength(double lambda)
public void setPhase(double phi)
public void setScale(double scale)
public double getScale()
public double calcWave(double x)
public java.awt.Rectangle getBounds()
getBounds
in interface java.awt.Shape
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
public boolean contains(double x, double y)
contains
in interface java.awt.Shape
public boolean contains(java.awt.geom.Point2D p)
contains
in interface java.awt.Shape
public boolean contains(double x, double y, double w, double h)
contains
in interface java.awt.Shape
public boolean contains(java.awt.geom.Rectangle2D r)
contains
in interface java.awt.Shape
public boolean intersects(double x, double y, double w, double h)
intersects
in interface java.awt.Shape
public boolean intersects(java.awt.geom.Rectangle2D r)
intersects
in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
getPathIterator
in interface java.awt.Shape
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |