public void fill( float val ) { synchronized( mutex ) { list.fill( val ); } } public void fill( int fromIndex, int toIndex, float val ) {
public void fill( int fromIndex, int toIndex, float val ) { synchronized( mutex ) { list.fill( fromIndex, toIndex, val ); } }
public void fill( float val ) { synchronized( mutex ) { list.fill( val ); } } public void fill( int fromIndex, int toIndex, float val ) {
@Override public void fill( float val ) { synchronized( mutex ) { list.fill( val ); } } @Override
public void fill( float val ) { synchronized( mutex ) { list.fill( val ); } } public void fill( int fromIndex, int toIndex, float val ) {
@Override public void fill( int fromIndex, int toIndex, float val ) { synchronized( mutex ) { list.fill( fromIndex, toIndex, val ); } }
public void fill( int fromIndex, int toIndex, float val ) { synchronized( mutex ) { list.fill( fromIndex, toIndex, val ); } }
public void fill( float val ) { synchronized( mutex ) { list.fill( val ); } } public void fill( int fromIndex, int toIndex, float val ) {
public void fill( int fromIndex, int toIndex, float val ) { synchronized( mutex ) { list.fill( fromIndex, toIndex, val ); } }
public void fill( int fromIndex, int toIndex, float val ) { synchronized( mutex ) { list.fill( fromIndex, toIndex, val ); } }
private static void loadIndices(int[] rawIndices, TObjectIntMap<String> offsets, TIntList indices, TFloatList rawTextureCoords, TFloatList textureCoords, TFloatList rawNormals, TFloatList normals) { final int positionOffset = offsets.get(SEMANTIC_VERTEX); final int texCoordsOffset = offsets.get(SEMANTIC_TEXCOORD); final int normalOffset = offsets.get(SEMANTIC_NORMAL); final int components = texCoordsOffset == -1 ? normalOffset == -1 ? 1 : 2 : 3; if (textureCoords != null && texCoordsOffset != -1) { textureCoords.fill(0, rawTextureCoords.size(), 0); } if (normals != null && normalOffset != -1) { normals.fill(0, rawNormals.size(), 0); } for (int i = 0; i < rawIndices.length; i += components) { final int positionIndex = rawIndices[i + positionOffset]; indices.add(positionIndex); if (textureCoords != null && texCoordsOffset != -1) { final int texCoordsIndex = rawIndices[i + texCoordsOffset] * STEP_TEXCOORD; for (int s = 0; s < STEP_TEXCOORD; s++) { textureCoords.set(positionIndex * STEP_TEXCOORD + s, rawTextureCoords.get(texCoordsIndex + s)); } } if (normals != null && normalOffset != -1) { final int normalIndex = rawIndices[i + normalOffset] * STEP_NORMAL; for (int s = 0; s < STEP_NORMAL; s++) { normals.set(positionIndex * STEP_NORMAL + s, rawNormals.get(normalIndex + s)); } } } }
final boolean hasNormals; if (!textureCoordIndices.isEmpty() && !rawTextureCoords.isEmpty()) { textureCoords.fill(0, positions.size() / positionSize * textureCoordSize, 0); hasTextureCoords = true; } else { normals.fill(0, positions.size() / positionSize * normalSize, 0); hasNormals = true; } else {
tangents.fill(0, size / 3 * 4, 0);
normals.fill(0, positions.size(), 0);