Class Point


  • public class Point
    extends Primitive
    A Point object has two integers that represent the location and color of a single Vertex. The first integer is an index into the Vertex list of a Model object and the second integer is an index into the Color list of that Model object.
    • Field Detail

    • Constructor Detail

      • Point

        public Point​(int i)
        Construct a Point object using an integer index. Use the given index for both the Vertex and the Color lists.

        NOTE: This constructor does not put a Vertex or a Color object into this Primitive's Model object. This constructor assumes that the given index is valid (or will be valid by the time this Primitive gets rendered).

        Parameters:
        i - index for the Vertex and Color of the new Point
      • Point

        public Point​(int v,
                     int c)
        Construct a Point object using two integer indices, one for the Vertex list and one for the Color list.

        NOTE: This constructor does not put a Vertex or a Color object into this Primitive's Model object. This constructor assumes that the given indices are valid (or will be valid by the time this Primitive gets rendered).

        Parameters:
        v - index for the Vertex of the new Point
        c - index for the Color of the new Point