edu.stanford.rsl.konrad.geometry.shapes.simple
Class Edge
java.lang.Object
edu.stanford.rsl.konrad.geometry.AbstractShape
edu.stanford.rsl.konrad.geometry.AbstractCurve
edu.stanford.rsl.konrad.geometry.shapes.simple.StraightLine
edu.stanford.rsl.konrad.geometry.shapes.simple.Edge
- All Implemented Interfaces:
- Transformable, java.io.Serializable
public class Edge
- extends StraightLine
- See Also:
- Serialized Form
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 java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Edge
public Edge(PointND point,
PointND point2)
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: