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 aLineSegmentobject using two integer indices.LineSegment(int i0, int i1, int c)Construct aLineSegmentobject using two integer indices for the vertices and one integer index for the colors.LineSegment(int i0, int i1, int c0, int c1)Construct aLineSegmentobject using two integer indices for the vertices and two integer indices for the colors.LineSegment(List<Integer> vIndexList, List<Integer> cIndexList)Construct aLineSegmentobject using the two givenLists of integer indices.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()For debugging.-
Methods inherited from class renderer.scene.primitives.Primitive
addIndex, addIndices, setColorIndex, setColorIndices
-
-
-
-
Constructor Detail
-
LineSegment
public LineSegment(int i0, int i1)
Construct aLineSegmentobject 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 aLineSegmentobject 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 aLineSegmentobject using two integer indices for the vertices and two integer indices for the colors.NOTE: This constructor does not put any
VertexorColorobjects into thisPrimitive'sModelobject. This constructor assumes that the given indices are valid (or will be valid by the time thisPrimitivegets rendered).
-
LineSegment
public LineSegment(List<Integer> vIndexList, List<Integer> cIndexList)
Construct aLineSegmentobject using the two givenLists of integer indices.NOTE: This constructor does not put any
VertexorColorobjects into thisPrimitive'sModelobject. This constructor assumes that the given indices are valid (or will be valid by the time thisPrimitivegets rendered).- Parameters:
vIndexList-Listof integer indices into aVertexlistcIndexList-Listof integer indices into aColorlist- Throws:
NullPointerException- ifvIndexListisnullNullPointerException- ifcIndexListisnullIllegalArgumentException- if the size ofvIndexListorcIndexListis not 2
-
-