|
@@ -71,7 +71,7 @@ public class TestTexture3D extends SimpleApplication {
|
|
BoundingBox bb = (BoundingBox) sphere.getBound();
|
|
BoundingBox bb = (BoundingBox) sphere.getBound();
|
|
Vector3f min = bb.getMin(null);
|
|
Vector3f min = bb.getMin(null);
|
|
float[] ext = new float[]{bb.getXExtent() * 2, bb.getYExtent() * 2, bb.getZExtent() * 2};
|
|
float[] ext = new float[]{bb.getXExtent() * 2, bb.getYExtent() * 2, bb.getZExtent() * 2};
|
|
- //we need to change the UV coordinates (the sphere is assumet to be inside the 3D image box)
|
|
|
|
|
|
+ //we need to change the UV coordinates (the sphere is assumed to be inside the 3D image box)
|
|
sphere.clearBuffer(Type.TexCoord);
|
|
sphere.clearBuffer(Type.TexCoord);
|
|
VertexBuffer vb = sphere.getBuffer(Type.Position);
|
|
VertexBuffer vb = sphere.getBuffer(Type.Position);
|
|
FloatBuffer fb = (FloatBuffer) vb.getData();
|
|
FloatBuffer fb = (FloatBuffer) vb.getData();
|
|
@@ -112,7 +112,7 @@ public class TestTexture3D extends SimpleApplication {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * This method creates a RGB8 texture with the sizes of 10x10x10 pixels.
|
|
|
|
|
|
+ * This method creates an RGB8 texture with the sizes of 10x10x10 pixels.
|
|
*/
|
|
*/
|
|
private Texture getTexture() throws IOException {
|
|
private Texture getTexture() throws IOException {
|
|
ArrayList<ByteBuffer> data = new ArrayList<>(1);
|
|
ArrayList<ByteBuffer> data = new ArrayList<>(1);
|