Skip to content
wang429 edited this page Oct 31, 2011 · 10 revisions

General info

  • Array refers to the std::vector class.
  • Vector refers to the Framework class representing vertices in (x,y) format

Public class members

void insertPointAt(Vector &, int);

  • Takes in a Vector and an integer index as arguments. Inserts Vector into array at index. Returns nothing.

void removePoint(int);

  • Take in an integer index as an argument. Removes Vector at index from array. Returns nothing.

int countVertices();

  • Takes in nothing as an argument. Returns the number of Vectors in the array

Vector & pointAt(int);

  • Takes in an integer index as an argument. Returns the reference to the Vector at index in the array.

Vector & operator;

  • Takes in an integer index as an argument. Returns the reference to the Vector at index in the array.

Private class members

std::vector(Vector) vertices

*The array of Vectors representing the vertices of the shape.

Clone this wiki locally