I am pretty sure I am doing it wrong but I don’t understand how this works. Please anyone explain to me what are indices and how are they calculated and how to get this example to work.
var vertexes:Vector.<Number> = new Vector.<Number>;
vertexes.push(4,0,-4);
vertexes.push(1014,0,-4);
vertexes.push(1014,0,-1623);
vertexes.push(727,0,-1794);
vertexes.push(291,0,-1794);
vertexes.push(4,0,-1623);
var normals:Vector.<Number> = new Vector.<Number>;
normals.push(0,1,0);
normals.push(0,1,0);
normals.push(0,1,0);
normals.push(0,1,0);
normals.push(0,1,0);
normals.push(0,1,0);
var uvs:Vector.<Number> = new Vector.<Number>;
uvs.push(0,1);
uvs.push(0,1);
uvs.push(0,1);
uvs.push(0,1);
uvs.push(0,1);
uvs.push(0,1);
var indices:Vector.<uint> = Vector.<uint>([0,1,2,3,4,5]);
var subGeometry:SubGeometry = new SubGeometry();
subGeometry.updateVertexData(vertexes);
subGeometry.updateVertexNormalData(normals);
subGeometry.updateUVData(uvs);
subGeometry.updateIndexData(indices);
var geometry:Geometry = new Geometry();
geometry.addSubGeometry(subGeometry);
var sphere:SphereGeometry = new SphereGeometry();
var mesh:Mesh = new Mesh(geometry, floorMat);
scene.addChild(mesh);