public class LineSegment extends java.lang.Object
Constructor and Description |
---|
LineSegment(int i0,
int i1,
Model model)
|
LineSegment(LineSegment ls,
Model model)
|
Modifier and Type | Method and Description |
---|---|
void |
setColor(java.awt.Color c)
Give this
LineSegment a uniform Color . |
void |
setColorRainbow()
|
void |
setColorRandom()
Give this
LineSegment a uniform,
but randomly chosen, Color . |
java.lang.String |
toString()
For debugging.
|
public LineSegment(int i0, int i1, Model model)
public LineSegment(LineSegment ls, Model model)
LineSegment
object with the same two indices
from the given LineSegment
object but referring to
the Vertex
list from another Model
.ls
- LineSegment
to make a copy ofmodel
- Model
that the new LineSegment
is part ofpublic void setColor(java.awt.Color c)
LineSegment
a uniform Color
.c
- Color
for this LineSegmentpublic void setColorRainbow()
Vertex
of this LineSegment
a randomly chosen Color
.
NOTE: This works best when this LineSegment
object does not share its Vertex
objects
with another LineSegment
object..
public void setColorRandom()
LineSegment
a uniform,
but randomly chosen, Color
.public java.lang.String toString()
toString
in class java.lang.Object
String
representation of this LineSegment
object