I currently have an interactive polygon maker on my map. After the user marks lat/long coordinates on the map, the PolygonGeometry class generates a polygon with those lat/long coordinates as its vertices.
I am trying to use Geometry.computeNumberOfVertices(geometry) to figure out how many vertices the user generated polygon has. However, it returns ridiculous numbers (like 97, 35, 12, etc.) for simple polygons like triangles and squares. I stepped into the method, computeNumberOfVertices(), and saw that the numOfVertices = numOfValues/componentsPerAttribute (values being a member in GeometryAttribute). However, even when I hardcoded 9 values in the values array with 3 components per attribute (like the first example here: http://cesium.agi.com/Cesium/Build/Documentation/GeometryAttribute.html?classFilter=attr&show=all), it still gives me 35 for the number of vertices because there are 105 values (according to the debugger).
My question is, how does the values array, in GeometryAttribute, get generated when it is not explicitly defined? How come this array length is ~100 when I am drawing a triangle or square with PolygonGeometry?
Thank you in advance,