Remove MeshRenderer.addToBatch
@@ -182,43 +182,6 @@ public void render() {
}
}
- public int addToBatch(Transform transform, Transform normalTransform, TFloatList vertexData, TIntList indexData, int indexOffset) {
- int uv1 = 0;
- int uv2 = 0;
- int n = 0;
- int c = 0;
- for (int v = 0; v < data.getVertices().size(); v += VERTEX_SIZE) {
- Vector3f vert = new Vector3f(data.getVertices().get(v), data.getVertices().get(v + 1), data.getVertices().get(v + 2));
- transform.transform(vert);
- vertexData.add(vert.x);
- vertexData.add(vert.y);
- vertexData.add(vert.z);
- for (int i = 0; i < TEX_COORD_0_SIZE; ++i) {
- vertexData.add(data.getTexCoord0().get(uv1 + i));
- }
- for (int i = 0; i < TEX_COORD_1_SIZE; ++i) {
- vertexData.add(data.getTexCoord1().get(uv2 + i));
- }
- Vector3f norm = new Vector3f(data.getNormals().get(n), data.getNormals().get(n + 1), data.getNormals().get(n + 2));
- normalTransform.transform(norm);
- vertexData.add(norm.x);
- vertexData.add(norm.y);
- vertexData.add(norm.z);
- for (int i = 0; i < COLOR_SIZE; ++i) {
- vertexData.add(data.getColors().get(c + i));
- }
- uv1 += TEX_COORD_0_SIZE;
- uv2 += TEX_COORD_1_SIZE;
- n += NORMAL_SIZE;
- c += COLOR_SIZE;
- }
- TIntIterator indexIterator = data.getIndices().iterator();
- while (indexIterator.hasNext()) {
- indexData.add(indexIterator.next() + indexOffset);
- }
- return indexOffset + data.getVertices().size() / VERTEX_SIZE;
- }
-
private void buildMesh(MeshData newData) {
this.data = newData;
