getData function
dynamic
getData(
- dynamic polygonVertexIndex,
- dynamic polygonIndex,
- dynamic vertexIndex,
- dynamic infoObject,
Implementation
getData(polygonVertexIndex, polygonIndex, vertexIndex, infoObject) {
var index;
switch (infoObject["mappingType"]) {
case 'ByPolygonVertex':
index = polygonVertexIndex;
break;
case 'ByPolygon':
index = polygonIndex;
break;
case 'ByVertice':
index = vertexIndex;
break;
case 'AllSame':
index = infoObject.indices[0];
break;
default:
print('THREE.FBXLoader: unknown attribute mapping type ' +
infoObject["mappingType"]);
}
if (infoObject["referenceType"] == 'IndexToDirect')
index = infoObject["indices"][index];
var from = index * infoObject["dataSize"];
var to = from + infoObject["dataSize"];
return slice(dataArray, infoObject["buffer"], from, to);
}