edu.stanford.rsl.konrad.geometry.shapes.simple
Class Edge

java.lang.Object
  extended by edu.stanford.rsl.konrad.geometry.AbstractShape
      extended by edu.stanford.rsl.konrad.geometry.AbstractCurve
          extended by edu.stanford.rsl.konrad.geometry.shapes.simple.StraightLine
              extended by edu.stanford.rsl.konrad.geometry.shapes.simple.Edge
All Implemented Interfaces:
Transformable, java.io.Serializable

public class Edge
extends StraightLine

See Also:
Serialized Form

Constructor Summary
Edge(PointND point, PointND point2)
           
 
Method Summary
 void applyTransform(Transform t)
          Applies the Transform t to the object.
 boolean equals(java.lang.Object o)
           
 PointND evaluate(double u)
          Returns a point on the Curve at position u [0, 1];
 PointND getEnd()
           
 double getLastInternalIndex()
           
 double getLength()
          Returns length of edge in mm
 PointND[] getRasterPoints(int number)
          Rasters the shape with a given number of points or less.
 PointND intersect(StraightLine line)
           
 void setEnds(PointND point, PointND point2)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.shapes.simple.StraightLine
computeDistanceTo, getDimension, getDirection, getPoint, init, init, intersect, isBounded, normalize, setDirection, setPoint
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractCurve
evaluate, getInternalDimension
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractShape
getHitsOnBoundingBox_slow, getHitsOnBoundingBox, getMax, getMin
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Edge

public Edge(PointND point,
            PointND point2)
Method Detail

setEnds

public void setEnds(PointND point,
                    PointND point2)

getLastInternalIndex

public double getLastInternalIndex()

getEnd

public PointND getEnd()

intersect

public PointND intersect(StraightLine line)
Overrides:
intersect in class StraightLine

evaluate

public PointND evaluate(double u)
Description copied from class: AbstractCurve
Returns a point on the Curve at position u [0, 1];

Overrides:
evaluate in class StraightLine
Parameters:
u - the internal position
Returns:
the curve point

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class StraightLine

getRasterPoints

public PointND[] getRasterPoints(int number)
Description copied from class: AbstractShape
Rasters the shape with a given number of points or less. If the shape is not bounded null is returned.

Overrides:
getRasterPoints in class StraightLine
Parameters:
number - the number of points
Returns:
the raster points

applyTransform

public void applyTransform(Transform t)
Description copied from interface: Transformable
Applies the Transform t to the object.

Specified by:
applyTransform in interface Transformable
Overrides:
applyTransform in class StraightLine
Parameters:
t - the transform to apply to the object.

getLength

public double getLength()
Returns length of edge in mm

Returns: