|
@@ -525,11 +525,10 @@ public class Mesh implements Savable, Cloneable {
|
|
|
return collisionTree.collideWith(other, worldMatrix, worldBound, results);
|
|
return collisionTree.collideWith(other, worldMatrix, worldBound, results);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// public void setLodData(ShortBuffer[] lodData){
|
|
|
|
|
-// this.lodData = lodData;
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
public void setBuffer(Type type, int components, FloatBuffer buf) {
|
|
public void setBuffer(Type type, int components, FloatBuffer buf) {
|
|
|
|
|
+ if (components < 1 || components > 4)
|
|
|
|
|
+ throw new IllegalArgumentException("components must be between 1 and 4");
|
|
|
|
|
+
|
|
|
// VertexBuffer vb = buffers.get(type);
|
|
// VertexBuffer vb = buffers.get(type);
|
|
|
VertexBuffer vb = buffers.get(type.ordinal());
|
|
VertexBuffer vb = buffers.get(type.ordinal());
|
|
|
if (vb == null){
|
|
if (vb == null){
|
|
@@ -551,6 +550,9 @@ public class Mesh implements Savable, Cloneable {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void setBuffer(Type type, int components, IntBuffer buf) {
|
|
public void setBuffer(Type type, int components, IntBuffer buf) {
|
|
|
|
|
+ if (components < 1 || components > 4)
|
|
|
|
|
+ throw new IllegalArgumentException("components must be between 1 and 4");
|
|
|
|
|
+
|
|
|
VertexBuffer vb = buffers.get(type.ordinal());
|
|
VertexBuffer vb = buffers.get(type.ordinal());
|
|
|
if (vb == null){
|
|
if (vb == null){
|
|
|
vb = new VertexBuffer(type);
|
|
vb = new VertexBuffer(type);
|
|
@@ -565,6 +567,9 @@ public class Mesh implements Savable, Cloneable {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void setBuffer(Type type, int components, ShortBuffer buf) {
|
|
public void setBuffer(Type type, int components, ShortBuffer buf) {
|
|
|
|
|
+ if (components < 1 || components > 4)
|
|
|
|
|
+ throw new IllegalArgumentException("components must be between 1 and 4");
|
|
|
|
|
+
|
|
|
VertexBuffer vb = buffers.get(type.ordinal());
|
|
VertexBuffer vb = buffers.get(type.ordinal());
|
|
|
if (vb == null){
|
|
if (vb == null){
|
|
|
vb = new VertexBuffer(type);
|
|
vb = new VertexBuffer(type);
|
|
@@ -579,6 +584,9 @@ public class Mesh implements Savable, Cloneable {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void setBuffer(Type type, int components, ByteBuffer buf) {
|
|
public void setBuffer(Type type, int components, ByteBuffer buf) {
|
|
|
|
|
+ if (components < 1 || components > 4)
|
|
|
|
|
+ throw new IllegalArgumentException("components must be between 1 and 4");
|
|
|
|
|
+
|
|
|
VertexBuffer vb = buffers.get(type.ordinal());
|
|
VertexBuffer vb = buffers.get(type.ordinal());
|
|
|
if (vb == null){
|
|
if (vb == null){
|
|
|
vb = new VertexBuffer(type);
|
|
vb = new VertexBuffer(type);
|