Package com.sun.j3d.internal

Examples of com.sun.j3d.internal.ByteBufferWrapper.position()


/*     */
/* 437 */               break;
/*     */             case 2:
/* 440 */               ByteBufferWrapper bb = new ByteBufferWrapper(buf);
/* 441 */               byte[] c = new byte[valid * 4];
/* 442 */               bb.position(initial * 4);
/* 443 */               bb.get(c, 0, valid * 4);
/* 444 */               colors = new Color4f[valid];
/* 445 */               for (i = 0; i < valid; i++) {
/* 446 */                 colors[i] = new Color4f((c[(i * 4 + 0)] & 0xFF) / 255.0F, (c[(i * 4 + 1)] & 0xFF) / 255.0F, (c[(i * 4 + 2)] & 0xFF) / 255.0F, (c[(i * 4 + 3)] & 0xFF) / 255.0F);
/*     */               }
View Full Code Here


/* 514 */             switch (BufferWrapper.getBufferType(buf))
/*     */             {
/*     */             case 3:
/* 517 */               FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 518 */               float[] c = new float[valid * 3];
/* 519 */               bb.position(initial * 3);
/* 520 */               bb.get(c, 0, valid * 3);
/* 521 */               colors = new Color3f[valid];
/* 522 */               for (i = 0; i < valid; i++) {
/* 523 */                 colors[i] = new Color3f(c[(i * 3 + 0)], c[(i * 3 + 1)], c[(i * 3 + 2)]);
/*     */               }
View Full Code Here

/*     */
/* 528 */               break;
/*     */             case 2:
/* 531 */               ByteBufferWrapper bb = new ByteBufferWrapper(buf);
/* 532 */               byte[] c = new byte[valid * 3];
/* 533 */               bb.position(initial * 3);
/* 534 */               bb.get(c, 0, valid * 3);
/* 535 */               colors = new Color3f[valid];
/* 536 */               for (i = 0; i < valid; i++) {
/* 537 */                 colors[i] = new Color3f((c[(i * 3 + 0)] & 0xFF) / 255.0F, (c[(i * 3 + 1)] & 0xFF) / 255.0F, (c[(i * 3 + 2)] & 0xFF) / 255.0F);
/*     */               }
View Full Code Here

/* 603 */               J3DBuffer buf = geomArray.getTexCoordRefBuffer(i);
/*     */
/* 605 */               if (BufferWrapper.getBufferType(buf) == 3) {
/* 606 */                 FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 607 */                 float[] c = new float[valid * 4];
/* 608 */                 bb.position(initial * 4);
/* 609 */                 bb.get(c, 0, valid * 4);
/* 610 */                 tex = new TexCoord4f[valid];
/* 611 */                 for (int j = 0; j < valid; j++) {
/* 612 */                   tex[j] = new TexCoord4f(c[(j * 4 + 0)], c[(j * 4 + 1)], c[(j * 4 + 2)], c[(j * 4 + 3)]);
/*     */                 }
View Full Code Here

/* 657 */               J3DBuffer buf = geomArray.getTexCoordRefBuffer(i);
/*     */
/* 659 */               if (BufferWrapper.getBufferType(buf) == 3) {
/* 660 */                 FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 661 */                 float[] c = new float[valid * 3];
/* 662 */                 bb.position(initial * 3);
/* 663 */                 bb.get(c, 0, valid * 3);
/* 664 */                 tex = new TexCoord3f[valid];
/* 665 */                 for (int j = 0; j < valid; j++) {
/* 666 */                   tex[j] = new TexCoord3f(c[(j * 3 + 0)], c[(j * 3 + 1)], c[(j * 3 + 2)]);
/*     */                 }
View Full Code Here

/* 717 */               J3DBuffer buf = geomArray.getTexCoordRefBuffer(i);
/*     */
/* 719 */               if (BufferWrapper.getBufferType(buf) == 3) {
/* 720 */                 FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 721 */                 float[] c = new float[valid * 2];
/* 722 */                 bb.position(initial * 2);
/* 723 */                 bb.get(c, 0, valid * 2);
/* 724 */                 tex = new TexCoord2f[valid];
/* 725 */                 for (int j = 0; j < valid; j++) {
/* 726 */                   tex[j] = new TexCoord2f(c[(j * 2 + 0)], c[(j * 2 + 1)]);
/*     */                 }
View Full Code Here

/* 120 */             switch (BufferWrapper.getBufferType(buf)) {
/*     */             case 2:
/* 122 */               out.writeInt(1);
/* 123 */               ByteBufferWrapper bb = new ByteBufferWrapper(buf);
/* 124 */               byte[] bytes = new byte[bb.limit()];
/* 125 */               bb.position(0);
/* 126 */               bb.get(bytes);
/* 127 */               out.writeInt(bytes.length);
/* 128 */               out.write(bytes);
/*     */
/* 130 */               break;
View Full Code Here

/* 130 */               break;
/*     */             case 3:
/* 132 */               out.writeInt(2);
/* 133 */               FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 134 */               float[] floats = new float[bb.limit()];
/* 135 */               bb.position(0);
/* 136 */               bb.get(floats);
/* 137 */               writeFloatArray(out, floats);
/*     */
/* 139 */               break;
/*     */             case 0:
View Full Code Here

/* 191 */             switch (BufferWrapper.getBufferType(buf)) {
/*     */             case 2:
/* 193 */               out.writeInt(1);
/* 194 */               ByteBufferWrapper bb = new ByteBufferWrapper(buf);
/* 195 */               byte[] bytes = new byte[bb.limit()];
/* 196 */               bb.position(0);
/* 197 */               bb.get(bytes);
/* 198 */               out.writeInt(bytes.length);
/* 199 */               out.write(bytes);
/*     */
/* 201 */               break;
View Full Code Here

/* 201 */               break;
/*     */             case 3:
/* 203 */               out.writeInt(2);
/* 204 */               FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 205 */               float[] floats = new float[bb.limit()];
/* 206 */               bb.position(0);
/* 207 */               bb.get(floats);
/* 208 */               writeFloatArray(out, floats);
/*     */
/* 210 */               break;
/*     */             case 0:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.