Package renderer.scene.primitives
Class LineSegment
- java.lang.Object
-
- renderer.scene.primitives.Primitive
-
- renderer.scene.primitives.LineSegment
-
public class LineSegment extends Primitive
-
-
Field Summary
-
Fields inherited from class renderer.scene.primitives.Primitive
cIndexList, vIndexList
-
-
Constructor Summary
Constructors Constructor Description LineSegment(int i0, int i1)
Construct aLineSegment
object using two integer indices.LineSegment(int i0, int i1, int c)
Construct aLineSegment
object using two integer indices for the vertices and one integer index for the colors.LineSegment(int i0, int i1, int c0, int c1)
Construct aLineSegment
object using two integer indices for the vertices and two integer indices for the colors.LineSegment(List<Integer> vIndexList, List<Integer> cIndexList)
Construct aLineSegment
object using the two givenList
s of integer indices.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
For debugging.-
Methods inherited from class renderer.scene.primitives.Primitive
addIndex, addIndices, setColorIndex, setColorIndices
-
-
-
-
Constructor Detail
-
LineSegment
public LineSegment(int i0, int i1)
Construct aLineSegment
object using two integer indices. Use the given indices for both the vertex and the color lists.
-
LineSegment
public LineSegment(int i0, int i1, int c)
Construct aLineSegment
object using two integer indices for the vertices and one integer index for the colors.
-
LineSegment
public LineSegment(int i0, int i1, int c0, int c1)
Construct aLineSegment
object using two integer indices for the vertices and two integer indices for the colors.NOTE: This constructor does not put any
Vertex
orColor
objects into thisPrimitive
'sModel
object. This constructor assumes that the given indices are valid (or will be valid by the time thisPrimitive
gets rendered).
-
LineSegment
public LineSegment(List<Integer> vIndexList, List<Integer> cIndexList)
Construct aLineSegment
object using the two givenList
s of integer indices.NOTE: This constructor does not put any
Vertex
orColor
objects into thisPrimitive
'sModel
object. This constructor assumes that the given indices are valid (or will be valid by the time thisPrimitive
gets rendered).- Parameters:
vIndexList
-List
of integer indices into aVertex
listcIndexList
-List
of integer indices into aColor
list- Throws:
NullPointerException
- ifvIndexList
isnull
NullPointerException
- ifcIndexList
isnull
IllegalArgumentException
- if the size ofvIndexList
orcIndexList
is not 2
-
-