|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsddl.hierarchy.Shape
sddl.hierarchy.Path
public class Path
Describes a general path in space. A Path can be linear or curved and can have determined starting and ending tangent.
Constructor Summary | |
---|---|
Path()
Standard SDDL constructor |
|
Path(java.util.LinkedList<AbstractPoint> list)
Java-only constructor |
|
Path(java.util.LinkedList<AbstractPoint> list,
Point startingTangent,
Point endingTangent)
Java-only constructor with determined tangents |
Method Summary | |
---|---|
void |
addPoint(AbstractPoint point)
Adds a point at the end of the Path |
Path |
copy()
Returns a copy of this Path |
void |
cycle()
Forms a cycle with the Path by adding the first point at the end of the Path |
void |
draw(AbstractPoint location,
java.io.PrintWriter out)
Standard SDDL draw function. |
Point |
getEndingTangent()
Gets the ending tangent of the Path, if there is one explicitly set |
int |
getNumberOfPoints()
Returns the number of Points in the Path |
AbstractPoint |
getPoint(int i)
Returns the Point at the position i |
java.util.LinkedList<AbstractPoint> |
getPoints()
Returns a list of all points in the Path |
Point |
getStartingTangent()
Gets the starting tangent of the Path, if there is one explicitly set |
boolean |
hasAEndingTangent()
Verifies if the Path has an ending tangent |
boolean |
hasAStartingTangent()
Verifies if the Path has a starting tangent |
boolean |
isLinear()
Returns if a path is a linear one |
Path |
obtainPath()
Returns itself |
java.lang.String |
pathValue()
Returns an Asymptote string describing the Path |
void |
setEndingTangent(Point endingTangent)
Sets the ending tangent of the Path |
void |
setLinear()
Sets a Path to be linear |
void |
setStartingTangent(Point startingTangent)
Sets the starting tangent of the Path |
Path |
translate(AbstractPoint translated)
Translate a Path by translated |
Methods inherited from class sddl.hierarchy.Shape |
---|
isVisible, setVisible |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Path()
public Path(java.util.LinkedList<AbstractPoint> list)
list
- List of points in the Pathpublic Path(java.util.LinkedList<AbstractPoint> list, Point startingTangent, Point endingTangent)
list
- The list of points in the PathstartingTangent
- Starting tangent of the PathendingTangent
- Ending tangent of the PathMethod Detail |
---|
public Path copy()
copy
in class Shape
public void addPoint(AbstractPoint point)
point
- The point to addpublic void setLinear()
public boolean isLinear()
public AbstractPoint getPoint(int i)
i
- The index of the point in the list (starting from 0)
public java.util.LinkedList<AbstractPoint> getPoints()
public int getNumberOfPoints()
public void cycle()
public boolean hasAStartingTangent()
public boolean hasAEndingTangent()
public Point getStartingTangent()
public Point getEndingTangent()
public void setStartingTangent(Point startingTangent)
startingTangent
- The starting tangent of the Pathpublic void setEndingTangent(Point endingTangent)
endingTangent
- The ending tangent of the Pathpublic java.lang.String pathValue()
public void draw(AbstractPoint location, java.io.PrintWriter out)
Shape
draw
in class Shape
location
- The location of the Shape on the main drawingout
- The file to be written topublic Path obtainPath()
obtainPath
in class Shape
public Path translate(AbstractPoint translated)
translated
- The translation to apply to the Path
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |