David Triple

Greenhorn

Posts: 20

Unnar Björnsson

Ranch Hand

Posts: 164

posted 6 years ago

The method addIndice() adds one integer number to the end of the vector by calling Vector.addElement(). The Vector method addElement takes an object reference (in this case Integer), so we start off with an empty vector then add '0' to it which increases it's size from 0 to 1 (since it has one element now), then '1' is added the the end of the vector increasing the size to 2, so the vector looks like this [0, 1] after those two steps.

After reading the code I gather that these numbers, stored in the vector are supposed to represent indices of a plane or face (geometry)

I been reading about arrays and indices but i cannot figure out what this means, and what the numbers in the indices represent:

face.addIndice(0);

face.addIndice(3);

face.addIndice(5);

The method addIndice() adds one integer number to the end of the vector by calling Vector.addElement(). The Vector method addElement takes an object reference (in this case Integer), so we start off with an empty vector then add '0' to it which increases it's size from 0 to 1 (since it has one element now), then '1' is added the the end of the vector increasing the size to 2, so the vector looks like this [0, 1] after those two steps.

After reading the code I gather that these numbers, stored in the vector are supposed to represent indices of a plane or face (geometry)