motris.model
Class ImageEdge

java.lang.Object
  extended bymotris.model.ImageEdge

public class ImageEdge
extends java.lang.Object

Represents a 2-dimensional edge between two Vertices in the image plane

Author:
dahlkamp, preuter

Field Summary
(package private)  double angleCache
           
 ImageVertex end
           
(package private)  java.util.Vector intervals
           
 SceneEdge originatingSceneEdge
           
 ImageVertex start
           
 
Constructor Summary
ImageEdge()
           
ImageEdge(ImageVertex _start, ImageVertex _end)
           
ImageEdge(ImageVertex _start, ImageVertex _end, java.util.Vector _intervals)
           
 
Method Summary
 void addInterval(EdgeInterval add)
           
 double getAngle()
           
 DoubleMatrix getDerivedPoint(double param)
           
 java.util.Vector getIntervals()
           
 double getLength()
           
 Double2Vector getPoint(double param)
           
 double getPointX(double param)
           
 double getPointY(double param)
           
 boolean isCompletelyInvisible()
           
 double isIntersecting(double startX, double startY, double endX, double endY)
           
 double isVisiblyIntersecting(double startX, double startY, double endX, double endY, double[] intersectWhere)
          Compute Interval point (0<=pt<=1) at which this edge intersects the supplied edge
 void markInvisible(EdgeInterval _intervals)
          Mark the supplied interval list as invisible in the Edge
private  void sortAndCheckIntervals()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

start

public ImageVertex start

end

public ImageVertex end

intervals

java.util.Vector intervals

originatingSceneEdge

public SceneEdge originatingSceneEdge

angleCache

double angleCache
Constructor Detail

ImageEdge

public ImageEdge()

ImageEdge

public ImageEdge(ImageVertex _start,
                 ImageVertex _end,
                 java.util.Vector _intervals)

ImageEdge

public ImageEdge(ImageVertex _start,
                 ImageVertex _end)
Method Detail

isIntersecting

public double isIntersecting(double startX,
                             double startY,
                             double endX,
                             double endY)

isVisiblyIntersecting

public double isVisiblyIntersecting(double startX,
                                    double startY,
                                    double endX,
                                    double endY,
                                    double[] intersectWhere)
Compute Interval point (0<=pt<=1) at which this edge intersects the supplied edge

Returns:
percent point of intersection (measured on THIS ImageEdge)

getPoint

public Double2Vector getPoint(double param)

getPointX

public double getPointX(double param)

getPointY

public double getPointY(double param)

getDerivedPoint

public DoubleMatrix getDerivedPoint(double param)

getAngle

public double getAngle()
Returns:
angle between edge and x-axis range: 0 .. 2*PI

getLength

public double getLength()
Returns:
length of the image edge

markInvisible

public final void markInvisible(EdgeInterval _intervals)
Mark the supplied interval list as invisible in the Edge

Parameters:
_intervals -

isCompletelyInvisible

public final boolean isCompletelyInvisible()

addInterval

public void addInterval(EdgeInterval add)

sortAndCheckIntervals

private void sortAndCheckIntervals()

getIntervals

public java.util.Vector getIntervals()

toString

public java.lang.String toString()