diff options
15 files changed, 56 insertions, 56 deletions
diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Box.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Box.java index 4b4bfdd..c4f630b 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Box.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Box.java @@ -271,7 +271,7 @@ public class Box extends Mesh { * box. */ private void setIndexData() { - if (_meshData.getIndexBuffer() == null) { + if (_meshData.getIndices() == null) { final byte[] indices = { 2, 1, 0, 3, 2, 0, 6, 5, 4, 7, 6, 4, 10, 9, 8, 11, 10, 8, 14, 13, 12, 15, 14, 12, 18, 17, 16, 19, 18, 16, 22, 21, 20, 23, 22, 20 }; final ByteBuffer buf = BufferUtils.createByteBuffer(indices.length); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Capsule.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Capsule.java index fb184d4..7dce5dd 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Capsule.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Capsule.java @@ -221,7 +221,7 @@ public class Capsule extends Mesh { } private void setIndexData() { - _meshData.getIndexBuffer().rewind(); + _meshData.getIndices().rewind(); // start with top of top dome. for (int samples = 1; samples <= radialSamples; samples++) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Cylinder.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Cylinder.java index 5b4c7f7..fd56cb6 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Cylinder.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Cylinder.java @@ -322,7 +322,7 @@ public class Cylinder extends Mesh { } private void setIndexData() { - _meshData.getIndexBuffer().rewind(); + _meshData.getIndices().rewind(); // generate connectivity for (int axisCount = 0, axisStart = 0; axisCount < _axisSamples - 1; axisCount++) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Dodecahedron.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Dodecahedron.java index 11e00e9..adf1ce5 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Dodecahedron.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Dodecahedron.java @@ -11,12 +11,12 @@ package com.ardor3d.scenegraph.shape; import java.io.IOException; -import java.nio.ByteBuffer; import java.nio.FloatBuffer; import com.ardor3d.math.MathUtils; import com.ardor3d.math.Vector2; import com.ardor3d.math.Vector3; +import com.ardor3d.scenegraph.IndexBufferData; import com.ardor3d.scenegraph.Mesh; import com.ardor3d.util.export.InputCapsule; import com.ardor3d.util.export.OutputCapsule; @@ -58,44 +58,44 @@ public class Dodecahedron extends Mesh { } private void setIndexData() { - final ByteBuffer indices = (ByteBuffer) _meshData.getIndexBuffer(); + final IndexBufferData<?> indices = _meshData.getIndices(); indices.rewind(); - indices.put((byte) 0).put((byte) 8).put((byte) 9); - indices.put((byte) 0).put((byte) 9).put((byte) 4); - indices.put((byte) 0).put((byte) 4).put((byte) 16); - indices.put((byte) 0).put((byte) 12).put((byte) 13); - indices.put((byte) 0).put((byte) 13).put((byte) 1); - indices.put((byte) 0).put((byte) 1).put((byte) 8); - indices.put((byte) 0).put((byte) 16).put((byte) 17); - indices.put((byte) 0).put((byte) 17).put((byte) 2); - indices.put((byte) 0).put((byte) 2).put((byte) 12); - indices.put((byte) 8).put((byte) 1).put((byte) 18); - indices.put((byte) 8).put((byte) 18).put((byte) 5); - indices.put((byte) 8).put((byte) 5).put((byte) 9); - indices.put((byte) 12).put((byte) 2).put((byte) 10); - indices.put((byte) 12).put((byte) 10).put((byte) 3); - indices.put((byte) 12).put((byte) 3).put((byte) 13); - indices.put((byte) 16).put((byte) 4).put((byte) 14); - indices.put((byte) 16).put((byte) 14).put((byte) 6); - indices.put((byte) 16).put((byte) 6).put((byte) 17); - indices.put((byte) 9).put((byte) 5).put((byte) 15); - indices.put((byte) 9).put((byte) 15).put((byte) 14); - indices.put((byte) 9).put((byte) 14).put((byte) 4); - indices.put((byte) 6).put((byte) 11).put((byte) 10); - indices.put((byte) 6).put((byte) 10).put((byte) 2); - indices.put((byte) 6).put((byte) 2).put((byte) 17); - indices.put((byte) 3).put((byte) 19).put((byte) 18); - indices.put((byte) 3).put((byte) 18).put((byte) 1); - indices.put((byte) 3).put((byte) 1).put((byte) 13); - indices.put((byte) 7).put((byte) 15).put((byte) 5); - indices.put((byte) 7).put((byte) 5).put((byte) 18); - indices.put((byte) 7).put((byte) 18).put((byte) 19); - indices.put((byte) 7).put((byte) 11).put((byte) 6); - indices.put((byte) 7).put((byte) 6).put((byte) 14); - indices.put((byte) 7).put((byte) 14).put((byte) 15); - indices.put((byte) 7).put((byte) 19).put((byte) 3); - indices.put((byte) 7).put((byte) 3).put((byte) 10); - indices.put((byte) 7).put((byte) 10).put((byte) 11); + indices.put(0).put(8).put(9); + indices.put(0).put(9).put(4); + indices.put(0).put(4).put(16); + indices.put(0).put(12).put(13); + indices.put(0).put(13).put(1); + indices.put(0).put(1).put(8); + indices.put(0).put(16).put(17); + indices.put(0).put(17).put(2); + indices.put(0).put(2).put(12); + indices.put(8).put(1).put(18); + indices.put(8).put(18).put(5); + indices.put(8).put(5).put(9); + indices.put(12).put(2).put(10); + indices.put(12).put(10).put(3); + indices.put(12).put(3).put(13); + indices.put(16).put(4).put(14); + indices.put(16).put(14).put(6); + indices.put(16).put(6).put(17); + indices.put(9).put(5).put(15); + indices.put(9).put(15).put(14); + indices.put(9).put(14).put(4); + indices.put(6).put(11).put(10); + indices.put(6).put(10).put(2); + indices.put(6).put(2).put(17); + indices.put(3).put(19).put(18); + indices.put(3).put(18).put(1); + indices.put(3).put(1).put(13); + indices.put(7).put(15).put(5); + indices.put(7).put(5).put(18); + indices.put(7).put(18).put(19); + indices.put(7).put(11).put(6); + indices.put(7).put(6).put(14); + indices.put(7).put(14).put(15); + indices.put(7).put(19).put(3); + indices.put(7).put(3).put(10); + indices.put(7).put(10).put(11); } private void setTextureData() { diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Extrusion.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Extrusion.java index c6c2c13..6fb83ae 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Extrusion.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Extrusion.java @@ -138,9 +138,9 @@ public class Extrusion extends Mesh { final int numIndices = (path.size() - 1) * 2 * shapeBuffer.limit(); IndexBufferData<?> indices; - if (_meshData.getIndexBuffer() != null && _meshData.getIndexBuffer().limit() == numIndices) { + if (_meshData.getIndices() != null && _meshData.getIndices().limit() == numIndices) { indices = _meshData.getIndices(); - indices.getBuffer().rewind(); + indices.rewind(); } else { indices = BufferUtils.createIndexBufferData(numIndices, numVertices - 1); } diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Hexagon.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Hexagon.java index 361fbb1..f6592ef 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Hexagon.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Hexagon.java @@ -78,7 +78,7 @@ public class Hexagon extends Mesh { */ private void setIndexData() { - _meshData.getIndexBuffer().rewind(); + _meshData.getIndices().rewind(); // tri 1 _meshData.getIndices().put(0); _meshData.getIndices().put(6); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/OrientedBox.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/OrientedBox.java index c24b3b5..6983a9c 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/OrientedBox.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/OrientedBox.java @@ -90,7 +90,7 @@ public class OrientedBox extends Mesh { * Sets the correct indices array for the box. */ private void setIndexData() { - if (_meshData.getIndexBuffer() == null) { + if (_meshData.getIndices() == null) { _meshData.setIndexBuffer(BufferUtils.createByteBuffer(36)); for (int i = 0; i < 6; i++) { diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/RoundedBox.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/RoundedBox.java index 1f252e7..31b52d1 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/RoundedBox.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/RoundedBox.java @@ -160,7 +160,7 @@ public class RoundedBox extends Mesh { } private void setIndexData() { - if (_meshData.getIndexBuffer() == null) { + if (_meshData.getIndices() == null) { final IndexBufferData<?> buff = BufferUtils.createIndexBufferData(180, 48 - 1); final int[] data = new int[] { 0, 4, 1, 1, 4, 5, 1, 5, 3, 3, 5, 7, 3, 7, 2, 2, 7, 6, 2, 6, 0, 0, 6, 4, 4, 6, 5, 5, 6, 7 }; diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/StripBox.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/StripBox.java index 9c98bee..3515494 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/StripBox.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/StripBox.java @@ -201,7 +201,7 @@ public class StripBox extends Mesh { */ private void setIndexData() { _meshData.setIndexMode(IndexMode.TriangleStrip); - if (_meshData.getIndexBuffer() == null) { + if (_meshData.getIndices() == null) { final byte[] indices = new byte[] { 2, 3, 6, 7, 5, 3, 0, 2, 1, 6, 4, 5, 1, 0 }; final ByteBuffer buf = BufferUtils.createByteBuffer(indices.length); buf.put(indices); diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Tube.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Tube.java index 4f8773f..898f9e9 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Tube.java +++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/shape/Tube.java @@ -202,7 +202,7 @@ public class Tube extends Mesh { } private void setIndexData() { - _meshData.getIndexBuffer().rewind(); + _meshData.getIndices().rewind(); final int outerCylinder = (_axisSamples + 1) * (_radialSamples + 1); final int bottomEdge = 2 * outerCylinder; diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java b/ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java index 87a3573..fdc3f7c 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/geom/MeshCombiner.java @@ -264,9 +264,9 @@ public class MeshCombiner { totalVertices += md.getVertexCount(); // check for indices - if (useIndices || md.getIndexBuffer() != null) { + if (useIndices || md.getIndices() != null) { useIndices = true; - if (md.getIndexBuffer() != null) { + if (md.getIndices() != null) { totalIndices += md.getIndices().capacity(); } else { totalIndices += md.getVertexCount(); @@ -304,7 +304,7 @@ class IndexCombiner { public void addEntry(final MeshData source, final int vertexOffset) { // arrays or elements? - if (source.getIndexBuffer() == null) { + if (source.getIndices() == null) { // arrays... int offset = 0; int indexModeCounter = 0; diff --git a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TimedAreaGrapher.java b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TimedAreaGrapher.java index 73637b8..bc336d5 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TimedAreaGrapher.java +++ b/ardor3d-core/src/main/java/com/ardor3d/util/stat/graph/TimedAreaGrapher.java @@ -172,7 +172,7 @@ public class TimedAreaGrapher extends AbstractStatGrapher implements TableLinkab fb.rewind(); entry.area.getMeshData().setVertexBuffer(fb); entry.area.setScale(new Vector3(scaleWidth, scaleHeight, 1)); - entry.area.getMeshData().getIndexBuffer().limit(entry.verts.size()); + entry.area.getMeshData().getIndices().limit(entry.verts.size()); // - attach to root as needed if (!_graphRoot.equals(entry.area.getParent())) { diff --git a/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/particle/ParticleMesh.java b/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/particle/ParticleMesh.java index c700471..2d70080 100644 --- a/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/particle/ParticleMesh.java +++ b/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/particle/ParticleMesh.java @@ -126,7 +126,7 @@ public class ParticleMesh extends ParticleSystem { if (_particleType == ParticleSystem.ParticleType.GeomMesh && _useMeshTexCoords) { final MeshEmitter source = (MeshEmitter) getParticleEmitter(); final Mesh sourceMesh = source.getSource(); - final int index = sourceMesh.getMeshData().getIndexBuffer() != null ? sourceMesh.getMeshData() + final int index = sourceMesh.getMeshData().getIndices() != null ? sourceMesh.getMeshData() .getIndices().get(ind) : ind; BufferUtils.populateFromBuffer(temp, sourceMesh.getMeshData().getTextureCoords(0).getBuffer(), index); diff --git a/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/particle/ParticleSystem.java b/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/particle/ParticleSystem.java index aa41a49..493e0f4 100644 --- a/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/particle/ParticleSystem.java +++ b/ardor3d-effects/src/main/java/com/ardor3d/extension/effect/particle/ParticleSystem.java @@ -659,8 +659,8 @@ public abstract class ParticleSystem extends Node { vertices[x] = new Vector3();
final int vertIndex = mData.getVertexIndex(index, x, 0);
- BufferUtils.populateFromBuffer(vertices[x], mData.getVertexBuffer(),
- mData.getIndexBuffer() != null ? mData.getIndices().get(vertIndex) : vertIndex);
+ BufferUtils.populateFromBuffer(vertices[x], mData.getVertexBuffer(), mData.getIndices() != null ? mData
+ .getIndices().get(vertIndex) : vertIndex);
}
Triangle t = p.getTriangleModel();
if (t == null) {
diff --git a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java index 3b0afea..5da7e51 100644 --- a/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java +++ b/ardor3d-terrain/src/main/java/com/ardor3d/extension/terrain/client/Terrain.java @@ -278,7 +278,7 @@ public class Terrain extends Node implements Pickable { for (int i = _clips.size() - 1; i >= _visibleLevels; i--) {
final ClipmapLevel clip = _clips.get(i);
- clip.getMeshData().getIndexBuffer().limit(clip.getMeshData().getIndexBuffer().capacity());
+ clip.getMeshData().getIndices().limit(clip.getMeshData().getIndices().capacity());
}
_initialized = true;
|