Package com.sun.j3d.internal

Examples of com.sun.j3d.internal.FloatBufferWrapper


/* 2292 */         d[(offset++)] = this.coordinates[i].z;
/*      */       }
/*      */
/* 2295 */       if (nio) {
/* 2296 */         ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(d.length * 4);
/* 2297 */         FloatBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/*      */
/* 2299 */         f.put(d);
/* 2300 */         ga.setInterleavedVertexBuffer(f.getJ3DBuffer()); } else {
/* 2301 */         ga.setInterleavedVertices(d);
/*      */       } } else if (nio)
/*      */     {
/* 2304 */       ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(this.coordinates.length * 4 * 3);
/*      */
/* 2306 */       FloatBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/*      */
/* 2308 */       f.put(vecmathToFloat(this.coordinates));
/* 2309 */       ga.setCoordRefBuffer(f.getJ3DBuffer());
/*      */
/* 2311 */       if (this.colors3 != null) {
/* 2312 */         b = ByteBufferWrapper.allocateDirect(this.colors3.length * 4 * 3);
/* 2313 */         f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/* 2314 */         f.put(vecmathToFloat(this.colors3));
/* 2315 */         ga.setColorRefBuffer(f.getJ3DBuffer());
/* 2316 */       } else if (this.colors4 != null) {
/* 2317 */         b = ByteBufferWrapper.allocateDirect(this.colors4.length * 4 * 4);
/* 2318 */         f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/* 2319 */         f.put(vecmathToFloat(this.colors4));
/* 2320 */         ga.setColorRefBuffer(f.getJ3DBuffer());
/*      */       }
/*      */
/* 2323 */       if (this.normals != null) {
/* 2324 */         b = ByteBufferWrapper.allocateDirect(this.normals.length * 4 * 3);
/* 2325 */         f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/* 2326 */         f.put(vecmathToFloat(this.normals));
/* 2327 */         ga.setNormalRefBuffer(f.getJ3DBuffer());
/*      */       }
/*      */
/* 2330 */       for (int i = 0; i < this.texCoordSetCount; i++) {
/* 2331 */         b = ByteBufferWrapper.allocateDirect(this.texCoordSets[i].length * 4 * this.texCoordDim);
/*      */
/* 2333 */         f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/* 2334 */         f.put(vecmathToFloat(this.texCoordSets[i]));
/* 2335 */         ga.setTexCoordRefBuffer(i, f.getJ3DBuffer());
/*      */       }
/* 2337 */     } else if (byRef)
/*      */     {
/* 2340 */       ga.setCoordRefFloat(vecmathToFloat(this.coordinates));
/* 2341 */       if (this.colors3 != null) ga.setColorRefFloat(vecmathToFloat(this.colors3));
View Full Code Here


/* 165 */         initial = geomArray.getInitialVertexIndex();
/* 166 */       else initial = 0;
/*     */       float[] d;
/* 169 */       if ((vertexFormat & 0x800) != 0) {
/* 170 */         J3DBuffer b = geomArray.getInterleavedVertexBuffer();
/* 171 */         FloatBufferWrapper w = new FloatBufferWrapper(b);
/* 172 */         float[] d = new float[w.limit()];
/* 173 */         w.position(0);
/* 174 */         w.get(d); } else {
/* 175 */         d = geomArray.getInterleavedVertices();
/*     */       }
/* 177 */       int offset = 0;
/* 178 */       if ((vertexFormat & 0x20) != 0) {
/* 179 */         geomInfo.setTextureCoordinateParams(texSets, 2);
/* 180 */         int[] map = new int[geomArray.getTexCoordSetMapLength()];
/* 181 */         geomArray.getTexCoordSetMap(map);
/* 182 */         geomInfo.setTexCoordSetMap(map);
/* 183 */         for (int i = 0; i < texSets; i++) {
/* 184 */           TexCoord2f[] tex = new TexCoord2f[valid];
/* 185 */           for (int j = 0; j < valid; j++) {
/* 186 */             tex[j] = new TexCoord2f(d[(wpv * (j + initial) + offset)], d[(wpv * (j + initial) + offset + 1)]);
/*     */           }
/*     */
/* 189 */           geomInfo.setTextureCoordinates(i, tex);
/* 190 */           offset += 2;
/*     */         }
/* 192 */       } else if ((vertexFormat & 0x40) != 0) {
/* 193 */         geomInfo.setTextureCoordinateParams(texSets, 3);
/* 194 */         int[] map = new int[geomArray.getTexCoordSetMapLength()];
/* 195 */         geomArray.getTexCoordSetMap(map);
/* 196 */         geomInfo.setTexCoordSetMap(map);
/* 197 */         for (int i = 0; i < texSets; i++) {
/* 198 */           TexCoord3f[] tex = new TexCoord3f[valid];
/* 199 */           for (int j = 0; j < valid; j++) {
/* 200 */             tex[j] = new TexCoord3f(d[(wpv * (j + initial) + offset)], d[(wpv * (j + initial) + offset + 1)], d[(wpv * (j + initial) + offset + 2)]);
/*     */           }
/*     */
/* 204 */           geomInfo.setTextureCoordinates(i, tex);
/* 205 */           offset += 3;
/*     */         }
/* 207 */       } else if ((vertexFormat & 0x400) != 0) {
/* 208 */         geomInfo.setTextureCoordinateParams(texSets, 4);
/* 209 */         int[] map = new int[geomArray.getTexCoordSetMapLength()];
/* 210 */         geomArray.getTexCoordSetMap(map);
/* 211 */         geomInfo.setTexCoordSetMap(map);
/* 212 */         for (int i = 0; i < texSets; i++) {
/* 213 */           TexCoord4f[] tex = new TexCoord4f[valid];
/* 214 */           for (int j = 0; j < valid; j++) {
/* 215 */             tex[j] = new TexCoord4f(d[(wpv * (j + initial) + offset)], d[(wpv * (j + initial) + offset + 1)], d[(wpv * (j + initial) + offset + 2)], d[(wpv * (j + initial) + offset + 3)]);
/*     */           }
/*     */
/* 220 */           geomInfo.setTextureCoordinates(i, tex);
/* 221 */           offset += 4;
/*     */         }
/*     */       }
/*     */
/* 225 */       if ((vertexFormat & 0xC) == 12) {
/* 226 */         Color4f[] color = new Color4f[valid];
/* 227 */         for (int i = 0; i < valid; i++) {
/* 228 */           color[i] = new Color4f(d[(wpv * (i + initial) + offset)], d[(wpv * (i + initial) + offset + 1)], d[(wpv * (i + initial) + offset + 2)], d[(wpv * (i + initial) + offset + 3)]);
/*     */         }
/*     */
/* 233 */         geomInfo.setColors(color);
/* 234 */         offset += 4;
/* 235 */       } else if ((vertexFormat & 0x4) != 0) {
/* 236 */         Color3f[] color = new Color3f[valid];
/* 237 */         for (int i = 0; i < valid; i++) {
/* 238 */           color[i] = new Color3f(d[(wpv * (i + initial) + offset)], d[(wpv * (i + initial) + offset + 1)], d[(wpv * (i + initial) + offset + 2)]);
/*     */         }
/*     */
/* 242 */         geomInfo.setColors(color);
/* 243 */         offset += 3;
/*     */       }
/*     */
/* 246 */       if ((vertexFormat & 0x2) != 0) {
/* 247 */         Vector3f[] normals = new Vector3f[valid];
/* 248 */         for (int i = 0; i < valid; i++) {
/* 249 */           normals[i] = new Vector3f(d[(wpv * (i + initial) + offset)], d[(wpv * (i + initial) + offset + 1)], d[(wpv * (i + initial) + offset + 2)]);
/*     */         }
/*     */
/* 253 */         geomInfo.setNormals(normals);
/* 254 */         offset += 3;
/*     */       }
/*     */
/* 257 */       Point3f[] coords = new Point3f[valid];
/* 258 */       for (int i = 0; i < valid; i++) {
/* 259 */         coords[i] = new Point3f(d[(wpv * (i + initial) + offset)], d[(wpv * (i + initial) + offset + 1)], d[(wpv * (i + initial) + offset + 2)]);
/*     */       }
/*     */
/* 263 */       geomInfo.setCoordinates(coords);
/*     */     }
/*     */     else {
/* 266 */       boolean byRef = (vertexFormat & 0x80) != 0;
/* 267 */       boolean nio = (vertexFormat & 0x800) != 0;
/*     */
/* 269 */       Point3f[] coords = null;
/* 270 */       if (byRef)
/*     */       {
/*     */         int initial;
/*     */         int initial;
/* 273 */         if (!(geomArray instanceof IndexedGeometryArray))
/* 274 */           initial = geomArray.getInitialCoordIndex();
/* 275 */         else initial = 0;
/*     */         int i;
/* 277 */         if (nio) {
/* 278 */           J3DBuffer buf = geomArray.getCoordRefBuffer();
/*     */
/* 280 */           switch (BufferWrapper.getBufferType(buf))
/*     */           {
/*     */           case 3:
/* 283 */             FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 284 */             float[] c = new float[valid * 3];
/* 285 */             bb.position(initial * 3);
/* 286 */             bb.get(c, 0, valid * 3);
/* 287 */             coords = new Point3f[valid];
/* 288 */             for (i = 0; i < valid; i++) {
/* 289 */               coords[i] = new Point3f(c[(i * 3 + 0)], c[(i * 3 + 1)], c[(i * 3 + 2)]);
/*     */             }
/*     */
/* 294 */             break;
/*     */           case 4:
/* 297 */             DoubleBufferWrapper bb = new DoubleBufferWrapper(buf);
/* 298 */             double[] c = new double[valid * 3];
/* 299 */             bb.position(initial * 3);
/* 300 */             bb.get(c, 0, valid * 3);
/* 301 */             coords = new Point3f[valid];
/* 302 */             for (i = 0; i < valid; i++) {
/* 303 */               coords[i] = new Point3f((float)c[(i * 3 + 0)], (float)c[(i * 3 + 1)], (float)c[(i * 3 + 2)]);
/*     */             }
/*     */
/*     */           }
/*     */
/*     */         }
/* 310 */         else if (geomArray.getCoordRef3f() != null) {
/* 311 */           if (initial != 0) {
/* 312 */             Point3f[] c = geomArray.getCoordRef3f();
/* 313 */             coords = new Point3f[valid];
/* 314 */             for (i = 0; i < valid; i++)
/* 315 */               coords[i] = new Point3f(c[(i + initial)]);
/*     */           } else {
/* 317 */             coords = geomArray.getCoordRef3f();
/*     */           } } else if (geomArray.getCoordRef3d() != null) {
/* 319 */           Point3d[] c = geomArray.getCoordRef3d();
/* 320 */           coords = new Point3f[valid];
/* 321 */           for (int i = 0; i < valid; i++)
/* 322 */             coords[i] = new Point3f(c[(i + initial)]);
/*     */         }
/* 324 */         else if (geomArray.getCoordRefFloat() != null) {
/* 325 */           float[] c = geomArray.getCoordRefFloat();
/* 326 */           coords = new Point3f[valid];
/* 327 */           for (int i = 0; i < valid; i++) {
/* 328 */             coords[i] = new Point3f(c[((i + initial) * 3)], c[((i + initial) * 3 + 1)], c[((i + initial) * 3 + 2)]);
/*     */           }
/*     */
/*     */         }
/* 332 */         else if (geomArray.getCoordRefDouble() != null) {
/* 333 */           double[] c = geomArray.getCoordRefDouble();
/* 334 */           coords = new Point3f[valid];
/* 335 */           for (int i = 0; i < valid; i++)
/* 336 */             coords[i] = new Point3f((float)c[((i + initial) * 3)], (float)c[((i + initial) * 3 + 1)], (float)c[((i + initial) * 3 + 2)]);
/*     */         }
/*     */       }
/*     */       else
/*     */       {
/*     */         int initial;
/*     */         int initial;
/* 345 */         if (!(geomArray instanceof IndexedGeometryArray))
/* 346 */           initial = geomArray.getInitialVertexIndex();
/* 347 */         else initial = 0;
/* 348 */         coords = new Point3f[valid];
/* 349 */         for (int i = 0; i < valid; i++) coords[i] = new Point3f();
/* 350 */         geomArray.getCoordinates(initial, coords);
/*     */       }
/* 352 */       geomInfo.setCoordinates(coords);
/*     */
/* 354 */       if ((vertexFormat & 0x2) != 0) {
/* 355 */         Vector3f[] normals = null;
/* 356 */         if (byRef)
/*     */         {
/*     */           int initial;
/*     */           int initial;
/* 359 */           if (!(geomArray instanceof IndexedGeometryArray))
/* 360 */             initial = geomArray.getInitialNormalIndex();
/* 361 */           else initial = 0;
/*     */
/* 363 */           if (nio) {
/* 364 */             J3DBuffer buf = geomArray.getNormalRefBuffer();
/*     */
/* 366 */             if (BufferWrapper.getBufferType(buf) == 3) {
/* 367 */               FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 368 */               float[] c = new float[valid * 3];
/* 369 */               bb.position(initial * 3);
/* 370 */               bb.get(c, 0, valid * 3);
/* 371 */               normals = new Vector3f[valid];
/* 372 */               for (int i = 0; i < valid; i++) {
/* 373 */                 normals[i] = new Vector3f(c[(i * 3 + 0)], c[(i * 3 + 1)], c[(i * 3 + 2)]);
/*     */               }
/*     */
/*     */             }
/*     */
/*     */           }
/* 379 */           else if (geomArray.getNormalRef3f() != null) {
/* 380 */             if (initial != 0) {
/* 381 */               Vector3f[] n = geomArray.getNormalRef3f();
/* 382 */               normals = new Vector3f[valid];
/* 383 */               for (int i = 0; i < valid; i++)
/* 384 */                 normals[i] = new Vector3f(n[(i + initial)]);
/*     */             } else {
/* 386 */               normals = geomArray.getNormalRef3f();
/*     */             } } else if (geomArray.getNormalRefFloat() != null) {
/* 388 */             float[] n = geomArray.getNormalRefFloat();
/* 389 */             normals = new Vector3f[valid];
/* 390 */             for (int i = 0; i < valid; i++)
/* 391 */               normals[i] = new Vector3f(n[((i + initial) * 3)], n[((i + initial) * 3 + 1)], n[((i + initial) * 3 + 2)]);
/*     */           }
/*     */         }
/*     */         else
/*     */         {
/*     */           int initial;
/*     */           int initial;
/* 400 */           if (!(geomArray instanceof IndexedGeometryArray))
/* 401 */             initial = geomArray.getInitialVertexIndex();
/* 402 */           else initial = 0;
/* 403 */           normals = new Vector3f[valid];
/* 404 */           for (int i = 0; i < valid; i++) normals[i] = new Vector3f();
/* 405 */           geomArray.getNormals(initial, normals);
/*     */         }
/* 407 */         geomInfo.setNormals(normals);
/*     */       }
/*     */
/* 410 */       if ((vertexFormat & 0xC) == 12) {
/* 411 */         Color4f[] colors = null;
/* 412 */         if (byRef)
/*     */         {
/*     */           int initial;
/*     */           int initial;
/* 415 */           if (!(geomArray instanceof IndexedGeometryArray))
/* 416 */             initial = geomArray.getInitialColorIndex();
/* 417 */           else initial = 0;
/*     */           int i;
/* 419 */           if (nio) {
/* 420 */             J3DBuffer buf = geomArray.getColorRefBuffer();
/*     */
/* 422 */             switch (BufferWrapper.getBufferType(buf))
/*     */             {
/*     */             case 3:
/* 425 */               FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 426 */               float[] c = new float[valid * 4];
/* 427 */               bb.position(initial * 4);
/* 428 */               bb.get(c, 0, valid * 4);
/* 429 */               colors = new Color4f[valid];
/* 430 */               for (i = 0; i < valid; i++) {
/* 431 */                 colors[i] = new Color4f(c[(i * 4 + 0)], c[(i * 4 + 1)], c[(i * 4 + 2)], c[(i * 4 + 3)]);
/*     */               }
/*     */
/* 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);
/*     */               }
/*     */
/*     */             }
/*     */
/*     */           }
/* 454 */           else if (geomArray.getColorRef4f() != null) {
/* 455 */             if (initial != 0) {
/* 456 */               Color4f[] c = geomArray.getColorRef4f();
/* 457 */               colors = new Color4f[valid];
/* 458 */               for (i = 0; i < valid; i++)
/* 459 */                 colors[i] = new Color4f(c[(i + initial)]);
/*     */             } else {
/* 461 */               colors = geomArray.getColorRef4f();
/*     */             } } else if (geomArray.getColorRefFloat() != null) {
/* 463 */             float[] c = geomArray.getColorRefFloat();
/* 464 */             colors = new Color4f[valid];
/* 465 */             for (int i = 0; i < valid; i++) {
/* 466 */               colors[i] = new Color4f(c[((i + initial) * 4 + 0)], c[((i + initial) * 4 + 1)], c[((i + initial) * 4 + 2)], c[((i + initial) * 4 + 3)]);
/*     */             }
/*     */
/*     */           }
/* 471 */           else if (geomArray.getColorRefByte() != null) {
/* 472 */             byte[] c = geomArray.getColorRefByte();
/* 473 */             colors = new Color4f[valid];
/* 474 */             for (int i = 0; i < valid; i++) {
/* 475 */               colors[i] = new Color4f((c[((i + initial) * 4 + 0)] & 0xFF) / 255.0F, (c[((i + initial) * 4 + 1)] & 0xFF) / 255.0F, (c[((i + initial) * 4 + 2)] & 0xFF) / 255.0F, (c[((i + initial) * 4 + 3)] & 0xFF) / 255.0F);
/*     */             }
/*     */
/*     */           }
/* 480 */           else if (geomArray.getColorRef4b() != null) {
/* 481 */             Color4b[] c = geomArray.getColorRef4b();
/* 482 */             colors = new Color4f[valid];
/* 483 */             for (int i = 0; i < valid; i++)
/* 484 */               colors[i] = new Color4f((c[(i + initial)].x & 0xFF) / 255.0F, (c[(i + initial)].y & 0xFF) / 255.0F, (c[(i + initial)].z & 0xFF) / 255.0F, (c[(i + initial)].w & 0xFF) / 255.0F);
/*     */           }
/*     */         }
/*     */         else
/*     */         {
/*     */           int initial;
/*     */           int initial;
/* 494 */           if (!(geomArray instanceof IndexedGeometryArray))
/* 495 */             initial = geomArray.getInitialVertexIndex();
/* 496 */           else initial = 0;
/* 497 */           colors = new Color4f[valid];
/* 498 */           for (int i = 0; i < valid; i++) colors[i] = new Color4f();
/* 499 */           geomArray.getColors(initial, colors);
/*     */         }
/* 501 */         geomInfo.setColors(colors);
/* 502 */       } else if ((vertexFormat & 0x4) != 0) {
/* 503 */         Color3f[] colors = null;
/* 504 */         if (byRef)
/*     */         {
/*     */           int initial;
/*     */           int initial;
/* 507 */           if (!(geomArray instanceof IndexedGeometryArray))
/* 508 */             initial = geomArray.getInitialColorIndex();
/* 509 */           else initial = 0;
/*     */           int i;
/* 511 */           if (nio) {
/* 512 */             J3DBuffer buf = geomArray.getColorRefBuffer();
/*     */
/* 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)]);
/*     */               }
/*     */
/* 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);
/*     */               }
/*     */
/*     */             }
/*     */
/*     */           }
/* 544 */           else if (geomArray.getColorRef3f() != null) {
/* 545 */             if (initial != 0) {
/* 546 */               Color3f[] c = geomArray.getColorRef3f();
/* 547 */               colors = new Color3f[valid];
/* 548 */               for (i = 0; i < valid; i++)
/* 549 */                 colors[i] = new Color3f(c[(i + initial)]);
/*     */             } else {
/* 551 */               colors = geomArray.getColorRef3f();
/*     */             } } else if (geomArray.getColorRefFloat() != null) {
/* 553 */             float[] c = geomArray.getColorRefFloat();
/* 554 */             colors = new Color3f[valid];
/* 555 */             for (int i = 0; i < valid; i++) {
/* 556 */               colors[i] = new Color3f(c[((i + initial) * 3 + 0)], c[((i + initial) * 3 + 1)], c[((i + initial) * 3 + 2)]);
/*     */             }
/*     */
/*     */           }
/* 560 */           else if (geomArray.getColorRefByte() != null) {
/* 561 */             byte[] c = geomArray.getColorRefByte();
/* 562 */             colors = new Color3f[valid];
/* 563 */             for (int i = 0; i < valid; i++) {
/* 564 */               colors[i] = new Color3f((c[((i + initial) * 3 + 0)] & 0xFF) / 255.0F, (c[((i + initial) * 3 + 1)] & 0xFF) / 255.0F, (c[((i + initial) * 3 + 2)] & 0xFF) / 255.0F);
/*     */             }
/*     */
/*     */           }
/* 568 */           else if (geomArray.getColorRef3b() != null) {
/* 569 */             Color3b[] c = geomArray.getColorRef3b();
/* 570 */             colors = new Color3f[valid];
/* 571 */             for (int i = 0; i < valid; i++)
/* 572 */               colors[i] = new Color3f((c[(i + initial)].x & 0xFF) / 255.0F, (c[(i + initial)].y & 0xFF) / 255.0F, (c[(i + initial)].z & 0xFF) / 255.0F);
/*     */           }
/*     */         }
/*     */         else
/*     */         {
/*     */           int initial;
/*     */           int initial;
/* 581 */           if (!(geomArray instanceof IndexedGeometryArray))
/* 582 */             initial = geomArray.getInitialVertexIndex();
/* 583 */           else initial = 0;
/* 584 */           colors = new Color3f[valid];
/* 585 */           for (int i = 0; i < valid; i++) colors[i] = new Color3f();
/* 586 */           geomArray.getColors(initial, colors);
/*     */         }
/* 588 */         geomInfo.setColors(colors);
/*     */       }
/*     */
/* 591 */       if ((vertexFormat & 0x400) != 0) {
/* 592 */         geomInfo.setTextureCoordinateParams(texSets, 4);
/* 593 */         for (int i = 0; i < texSets; i++) {
/* 594 */           TexCoord4f[] tex = null;
/* 595 */           if (byRef)
/*     */           {
/*     */             int initial;
/*     */             int initial;
/* 598 */             if (!(geomArray instanceof IndexedGeometryArray))
/* 599 */               initial = geomArray.getInitialTexCoordIndex(i);
/* 600 */             else initial = 0;
/*     */
/* 602 */             if (nio) {
/* 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)]);
/*     */                 }
/*     */
/*     */               }
/*     */
/*     */             }
/*     */             else
/*     */             {
/* 621 */               float[] t = geomArray.getTexCoordRefFloat(i);
/* 622 */               tex = new TexCoord4f[valid];
/* 623 */               for (int j = 0; j < valid; j++)
/* 624 */                 tex[j] = new TexCoord4f(t[((j + initial) * 4)], t[((j + initial) * 4 + 1)], t[((j + initial) * 4 + 2)], t[((j + initial) * 4 + 3)]);
/*     */             }
/*     */           }
/*     */           else
/*     */           {
/*     */             int initial;
/*     */             int initial;
/* 633 */             if (!(geomArray instanceof IndexedGeometryArray))
/* 634 */               initial = geomArray.getInitialVertexIndex();
/* 635 */             else initial = 0;
/* 636 */             tex = new TexCoord4f[valid];
/* 637 */             for (int j = 0; j < valid; j++) tex[j] = new TexCoord4f();
/* 638 */             geomArray.getTextureCoordinates(i, initial, tex);
/*     */           }
/* 640 */           geomInfo.setTextureCoordinates(i, tex);
/*     */         }
/* 642 */         int[] map = new int[geomArray.getTexCoordSetMapLength()];
/* 643 */         geomArray.getTexCoordSetMap(map);
/* 644 */         geomInfo.setTexCoordSetMap(map);
/* 645 */       } else if ((vertexFormat & 0x40) != 0) {
/* 646 */         geomInfo.setTextureCoordinateParams(texSets, 3);
/* 647 */         for (int i = 0; i < texSets; i++) {
/* 648 */           TexCoord3f[] tex = null;
/* 649 */           if (byRef)
/*     */           {
/*     */             int initial;
/*     */             int initial;
/* 652 */             if (!(geomArray instanceof IndexedGeometryArray))
/* 653 */               initial = geomArray.getInitialTexCoordIndex(i);
/* 654 */             else initial = 0;
/*     */
/* 656 */             if (nio) {
/* 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)]);
/*     */                 }
/*     */
/*     */               }
/*     */
/*     */             }
/* 672 */             else if (geomArray.getTexCoordRef3f(i) != null) {
/* 673 */               if (initial != 0) {
/* 674 */                 TexCoord3f[] t = geomArray.getTexCoordRef3f(i);
/* 675 */                 tex = new TexCoord3f[valid];
/* 676 */                 for (int j = 0; j < valid; j++)
/* 677 */                   tex[j] = new TexCoord3f(t[(j + initial)]);
/*     */               } else {
/* 679 */                 tex = geomArray.getTexCoordRef3f(i);
/*     */               } } else if (geomArray.getTexCoordRefFloat(i) != null) {
/* 681 */               float[] t = geomArray.getTexCoordRefFloat(i);
/* 682 */               tex = new TexCoord3f[valid];
/* 683 */               for (int j = 0; j < valid; j++)
/* 684 */                 tex[j] = new TexCoord3f(t[((j + initial) * 3)], t[((j + initial) * 3 + 1)], t[((j + initial) * 3 + 2)]);
/*     */             }
/*     */           }
/*     */           else
/*     */           {
/*     */             int initial;
/*     */             int initial;
/* 693 */             if (!(geomArray instanceof IndexedGeometryArray))
/* 694 */               initial = geomArray.getInitialVertexIndex();
/* 695 */             else initial = 0;
/* 696 */             tex = new TexCoord3f[valid];
/* 697 */             for (int j = 0; j < valid; j++) tex[j] = new TexCoord3f();
/* 698 */             geomArray.getTextureCoordinates(i, initial, tex);
/*     */           }
/* 700 */           geomInfo.setTextureCoordinates(i, tex);
/*     */         }
/* 702 */         int[] map = new int[geomArray.getTexCoordSetMapLength()];
/* 703 */         geomArray.getTexCoordSetMap(map);
/* 704 */         geomInfo.setTexCoordSetMap(map);
/* 705 */       } else if ((vertexFormat & 0x20) != 0) {
/* 706 */         geomInfo.setTextureCoordinateParams(texSets, 2);
/* 707 */         for (int i = 0; i < texSets; i++) {
/* 708 */           TexCoord2f[] tex = null;
/* 709 */           if (byRef)
/*     */           {
/*     */             int initial;
/*     */             int initial;
/* 712 */             if (!(geomArray instanceof IndexedGeometryArray))
/* 713 */               initial = geomArray.getInitialTexCoordIndex(i);
/* 714 */             else initial = 0;
/*     */
/* 716 */             if (nio) {
/* 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

/*       */
/*  3169 */       if ((src.vertexType & 0x7000) != 0)
/*  3170 */         for (index = start; index < end; index++) {
/*  3171 */           int i = 0; tOffset = vOffset;
/*  3172 */           for (; i < this.texCoordSetCount; i++) {
/*  3173 */             FloatBufferWrapper texBuffer = (FloatBufferWrapper)((J3DBuffer)src.refTexCoordsBuffer[i]).getBufferImpl();
/*  3174 */             texBuffer.position(((int[])(int[])src.indexTexCoord[i])[index] * this.texCoordStride);
/*  3175 */             texBuffer.get(this.vertexData, tOffset, this.texCoordStride);
/*  3176 */             tOffset += this.texCoordStride;
/*       */           }
/*  3178 */           vOffset += this.stride;
/*       */         }
/*       */     }
View Full Code Here

/*  8744 */     return this.floatRefNormals;
/*       */   }
/*       */
/*       */   void setNormalRefBuffer(J3DBuffer normals)
/*       */   {
/*  8750 */     FloatBufferWrapper bufferImpl = null;
/*       */
/*  8752 */     if (normals != null) {
/*  8753 */       if (normals.getBufferType() != 7) {
/*  8754 */         throw new IllegalArgumentException(J3dI18N.getString("GeometryArray116"));
/*       */       }
/*  8756 */       bufferImpl = (FloatBufferWrapper)normals.getBufferImpl();
/*       */
/*  8758 */       if (!bufferImpl.isDirect()) {
/*  8759 */         throw new IllegalArgumentException(J3dI18N.getString("GeometryArray120"));
/*       */       }
/*  8761 */       if ((this.vertexFormat & 0x2) == 0) {
/*  8762 */         throw new IllegalStateException(J3dI18N.getString("GeometryArray122"));
/*       */       }
/*       */
/*  8765 */       if ((this instanceof IndexedGeometryArrayRetained)) {
/*  8766 */         IndexedGeometryArrayRetained idx = (IndexedGeometryArrayRetained)this;
/*  8767 */         if (idx.maxNormalIndex * 3 >= ((FloatBufferWrapper)normals.getBufferImpl()).limit())
/*       */         {
/*  8769 */           throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray26"));
/*       */         }
/*  8771 */       } else if (bufferImpl.limit() < 3 * (this.initialNormalIndex + this.validVertexCount)) {
/*  8772 */         throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("GeometryArray111"));
/*       */       }
/*       */     }
/*  8775 */     this.geomLock.getLock();
/*  8776 */     this.dirtyFlag |= 2;
View Full Code Here

/*  8905 */     return (float[])this.refTexCoords[texCoordSet];
/*       */   }
/*       */
/*       */   void setTexCoordRefBuffer(int texCoordSet, J3DBuffer texCoords)
/*       */   {
/*  8911 */     FloatBufferWrapper bufferImpl = null;
/*       */
/*  8913 */     if (texCoords != null) {
/*  8914 */       if (texCoords.getBufferType() != 7) {
/*  8915 */         throw new IllegalArgumentException(J3dI18N.getString("GeometryArray116"));
/*       */       }
/*  8917 */       bufferImpl = (FloatBufferWrapper)texCoords.getBufferImpl();
/*  8918 */       int bufferSize = bufferImpl.limit();
/*       */
/*  8920 */       if (!bufferImpl.isDirect()) {
/*  8921 */         throw new IllegalArgumentException(J3dI18N.getString("GeometryArray120"));
/*       */       }
/*  8923 */       int ts = getTexStride();
/*       */
/*  8925 */       if ((this instanceof IndexedGeometryArrayRetained)) {
/*  8926 */         IndexedGeometryArrayRetained idx = (IndexedGeometryArrayRetained)this;
/*  8927 */         if (idx.maxTexCoordIndices[texCoordSet] * ts >= bufferSize)
/*  8928 */           throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray25"));
/*       */       }
/*  8930 */       else if (bufferSize < ts * (this.initialTexCoordIndex[texCoordSet] + this.validVertexCount)) {
/*  8931 */         throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("GeometryArray113"));
/*       */       }
/*       */     }
/*       */
/*  8935 */     this.geomLock.getLock();
/*  8936 */     this.dirtyFlag |= 8;
/*       */
/*  8938 */     this.refTexCoordsBuffer[texCoordSet] = texCoords;
/*  8939 */     if (texCoords == null) {
/*  8940 */       this.vertexType &= -4097;
/*  8941 */       this.refTexCoords[texCoordSet] = null;
/*       */     }
/*       */     else {
/*  8944 */       this.vertexType |= 4096;
/*       */
/*  8946 */       this.refTexCoords[texCoordSet] = bufferImpl.getBufferAsObject();
/*       */     }
/*  8948 */     this.geomLock.unLock();
/*  8949 */     if ((!this.inUpdater) && (this.source != null) && (this.source.isLive()))
/*  8950 */       sendDataChangedMessage(false);
/*       */   }
View Full Code Here

/*       */     }
/*       */   }
/*       */
/*       */   void setInterleavedVertexBuffer(J3DBuffer vertexData)
/*       */   {
/*  9126 */     FloatBufferWrapper bufferImpl = null;
/*       */
/*  9128 */     if (vertexData != null)
/*       */     {
/*  9130 */       if (vertexData.getBufferType() != 7) {
/*  9131 */         throw new IllegalArgumentException(J3dI18N.getString("GeometryArray116"));
/*       */       }
/*  9133 */       bufferImpl = (FloatBufferWrapper)vertexData.getBufferImpl();
/*       */
/*  9135 */       if (!bufferImpl.isDirect()) {
/*  9136 */         throw new IllegalArgumentException(J3dI18N.getString("GeometryArray120"));
/*       */       }
/*  9138 */       int bufferSize = bufferImpl.limit();
/*       */
/*  9140 */       if ((this instanceof IndexedGeometryArrayRetained)) {
/*  9141 */         IndexedGeometryArrayRetained idx = (IndexedGeometryArrayRetained)this;
/*       */
/*  9143 */         if (this.stride * idx.maxCoordIndex >= bufferSize) {
View Full Code Here

/*       */
/*  9293 */         switch (this.vertexType & 0x7000)
/*       */         {
/*       */         case 4096:
/*  9296 */           for (int i = 0; i < this.texCoordSetCount; i++) {
/*  9297 */             FloatBufferWrapper texBuffer = (FloatBufferWrapper)((J3DBuffer)this.refTexCoordsBuffer[i]).getBufferImpl();
/*  9298 */             if ((this.vertexFormat & 0x20) != 0) {
/*  9299 */               if (texBuffer.limit() < 2 * (this.initialTexCoordIndex[i] + validVertexCount)) {
/*  9300 */                 throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("GeometryArray113"));
/*       */               }
/*       */             }
/*  9303 */             else if ((this.vertexFormat & 0x40) != 0) {
/*  9304 */               if (texBuffer.limit() < 3 * (this.initialTexCoordIndex[i] + validVertexCount)) {
/*  9305 */                 throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("GeometryArray113"));
/*       */               }
/*       */             }
/*  9308 */             else if (((this.vertexFormat & 0x400) != 0) &&
/*  9309 */               (texBuffer.limit() < 4 * (this.initialTexCoordIndex[i] + validVertexCount))) {
/*  9310 */               throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("GeometryArray113"));
/*       */             }
/*       */
/*       */           }
/*       */
View Full Code Here

/* 606 */           for (j = 0; j < src.stripIndexCounts[i]; j++) {
/* 607 */             int index = j + base;
/*     */
/* 609 */             int k = 0; tOffset = vOffset;
/* 610 */             for (; k < this.texCoordSetCount; k++) {
/* 611 */               FloatBufferWrapper texBuffer = (FloatBufferWrapper)((J3DBuffer)src.refTexCoordsBuffer[k]).getBufferImpl();
/* 612 */               texBuffer.position(((int[])(int[])src.indexTexCoord[k])[index] * this.texCoordStride);
/* 613 */               texBuffer.get(this.vertexData, tOffset, this.texCoordStride);
/* 614 */               tOffset += this.texCoordStride;
/*     */             }
/* 616 */             vOffset += this.stride;
/*     */           }
/* 618 */           base += src.stripIndexCounts[i];
View Full Code Here

/*  89 */         if (!(this.node instanceof GeometryStripArray)) {
/*  90 */           out.writeInt(((GeometryArray)this.node).getValidVertexCount());
/*     */         }
/*     */       }
/*  93 */       if (nio) {
/*  94 */         FloatBufferWrapper x = new FloatBufferWrapper(((GeometryArray)this.node).getInterleavedVertexBuffer());
/*     */
/*  96 */         float[] f = new float[x.limit()];
/*  97 */         x.position(0);
/*  98 */         x.get(f);
/*  99 */         writeFloatArray(out, f); } else {
/* 100 */         writeFloatArray(out, ((GeometryArray)this.node).getInterleavedVertices());
/*     */       }
/*     */     } else { boolean byRef = (this.vertexFormat & 0x80) != 0;
/*     */
/* 104 */       if (!(this.node instanceof IndexedGeometryArray)) {
/* 105 */         if (!byRef)
/* 106 */           out.writeInt(((GeometryArray)this.node).getInitialVertexIndex());
/* 107 */         if (!(this.node instanceof GeometryStripArray)) {
/* 108 */           out.writeInt(((GeometryArray)this.node).getValidVertexCount());
/*     */         }
/*     */       }
/* 111 */       if ((this.vertexFormat & 0xC) == 12)
/*     */       {
/* 113 */         if (byRef) {
/* 114 */           if (!(this.node instanceof IndexedGeometryArray)) {
/* 115 */             out.writeInt(((GeometryArray)this.node).getInitialColorIndex());
/*     */           }
/*     */
/* 118 */           if (nio) {
/* 119 */             J3DBuffer buf = ((GeometryArray)this.node).getColorRefBuffer();
/* 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;
/*     */             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:
/* 141 */               out.writeInt(0);
/*     */             case 1:
/*     */             }
/*     */           }
/* 145 */           else if (((GeometryArray)this.node).getColorRef4f() != null) {
/* 146 */             out.writeInt(8);
/* 147 */             Color4f[] colors = ((GeometryArray)this.node).getColorRef4f();
/* 148 */             float[] data = new float[colors.length * 4];
/* 149 */             for (int i = 0; i < colors.length; i++) {
/* 150 */               data[(i * 4 + 0)] = colors[i].x;
/* 151 */               data[(i * 4 + 1)] = colors[i].y;
/* 152 */               data[(i * 4 + 2)] = colors[i].z;
/* 153 */               data[(i * 4 + 3)] = colors[i].w;
/*     */             }
/* 155 */             writeFloatArray(out, data);
/* 156 */           } else if (((GeometryArray)this.node).getColorRefFloat() != null) {
/* 157 */             out.writeInt(2);
/* 158 */             writeFloatArray(out, ((GeometryArray)this.node).getColorRefFloat());
/* 159 */           } else if (((GeometryArray)this.node).getColorRefByte() != null) {
/* 160 */             out.writeInt(1);
/* 161 */             byte[] colors = ((GeometryArray)this.node).getColorRefByte();
/* 162 */             out.writeInt(colors.length);
/* 163 */             out.write(colors);
/* 164 */           } else if (((GeometryArray)this.node).getColorRef4b() != null) {
/* 165 */             out.writeInt(5);
/* 166 */             Color4b[] colors = ((GeometryArray)this.node).getColorRef4b();
/* 167 */             out.writeInt(colors.length);
/* 168 */             byte[] data = new byte[colors.length * 4];
/* 169 */             for (int i = 0; i < colors.length; i++) {
/* 170 */               data[(i * 4 + 0)] = colors[i].x;
/* 171 */               data[(i * 4 + 1)] = colors[i].y;
/* 172 */               data[(i * 4 + 2)] = colors[i].z;
/* 173 */               data[(i * 4 + 3)] = colors[i].w;
/*     */             }
/* 175 */             out.write(data); } else {
/* 176 */             out.writeInt(0);
/*     */           }
/*     */         } else { byte[] colors = new byte[this.vertexCount * 4];
/* 179 */           ((GeometryArray)this.node).getColors(0, colors);
/* 180 */           out.write(colors); }
/*     */       }
/* 182 */       else if ((this.vertexFormat & 0x4) == 4)
/*     */       {
/* 184 */         if (byRef) {
/* 185 */           if (!(this.node instanceof IndexedGeometryArray)) {
/* 186 */             out.writeInt(((GeometryArray)this.node).getInitialColorIndex());
/*     */           }
/*     */
/* 189 */           if (nio) {
/* 190 */             J3DBuffer buf = ((GeometryArray)this.node).getColorRefBuffer();
/* 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;
/*     */             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:
/* 212 */               out.writeInt(0);
/*     */             case 1:
/*     */             }
/*     */           }
/* 216 */           else if (((GeometryArray)this.node).getColorRef3f() != null) {
/* 217 */             out.writeInt(7);
/* 218 */             Color3f[] colors = ((GeometryArray)this.node).getColorRef3f();
/* 219 */             float[] data = new float[colors.length * 3];
/* 220 */             for (int i = 0; i < colors.length; i++) {
/* 221 */               data[(i * 3 + 0)] = colors[i].x;
/* 222 */               data[(i * 3 + 1)] = colors[i].y;
/* 223 */               data[(i * 3 + 2)] = colors[i].z;
/*     */             }
/* 225 */             writeFloatArray(out, data);
/* 226 */           } else if (((GeometryArray)this.node).getColorRefFloat() != null) {
/* 227 */             out.writeInt(2);
/* 228 */             writeFloatArray(out, ((GeometryArray)this.node).getColorRefFloat());
/* 229 */           } else if (((GeometryArray)this.node).getColorRefByte() != null) {
/* 230 */             out.writeInt(1);
/* 231 */             byte[] colors = ((GeometryArray)this.node).getColorRefByte();
/* 232 */             out.writeInt(colors.length);
/* 233 */             out.write(colors);
/* 234 */           } else if (((GeometryArray)this.node).getColorRef3b() != null) {
/* 235 */             out.writeInt(4);
/* 236 */             Color3b[] colors = ((GeometryArray)this.node).getColorRef3b();
/* 237 */             out.writeInt(colors.length);
/* 238 */             byte[] data = new byte[colors.length * 3];
/* 239 */             for (int i = 0; i < colors.length; i++) {
/* 240 */               data[(i * 3 + 0)] = colors[i].x;
/* 241 */               data[(i * 3 + 1)] = colors[i].y;
/* 242 */               data[(i * 3 + 2)] = colors[i].z;
/*     */             }
/* 244 */             out.write(data); } else {
/* 245 */             out.writeInt(0);
/*     */           }
/*     */         } else { byte[] colors3 = new byte[this.vertexCount * 3];
/* 248 */           ((GeometryArray)this.node).getColors(0, colors3);
/* 249 */           out.write(colors3);
/*     */         }
/*     */
/*     */       }
/*     */
/* 254 */       if ((this.vertexFormat & 0x1) != 0)
/*     */       {
/* 256 */         if (byRef) {
/* 257 */           if (!(this.node instanceof IndexedGeometryArray)) {
/* 258 */             out.writeInt(((GeometryArray)this.node).getInitialCoordIndex());
/*     */           }
/*     */
/* 261 */           if (nio) {
/* 262 */             J3DBuffer buf = ((GeometryArray)this.node).getCoordRefBuffer();
/* 263 */             switch (BufferWrapper.getBufferType(buf)) {
/*     */             case 3:
/* 265 */               out.writeInt(2);
/* 266 */               FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 267 */               float[] floats = new float[bb.limit()];
/* 268 */               bb.position(0);
/* 269 */               bb.get(floats);
/* 270 */               writeFloatArray(out, floats);
/*     */
/* 272 */               break;
/*     */             case 4:
/* 274 */               out.writeInt(3);
/* 275 */               DoubleBufferWrapper bb = new DoubleBufferWrapper(buf);
/* 276 */               double[] doubles = new double[bb.limit()];
/* 277 */               bb.position(0);
/* 278 */               bb.get(doubles);
/* 279 */               writeDoubleArray(out, doubles);
/*     */
/* 281 */               break;
/*     */             case 0:
/* 283 */               out.writeInt(0);
/*     */             case 1:
/*     */             case 2:
/*     */             }
/* 287 */           } else if (((GeometryArray)this.node).getCoordRef3f() != null) {
/* 288 */             out.writeInt(7);
/* 289 */             Point3f[] coords = ((GeometryArray)this.node).getCoordRef3f();
/* 290 */             float[] data = new float[coords.length * 3];
/* 291 */             for (int i = 0; i < coords.length; i++) {
/* 292 */               data[(i * 3 + 0)] = coords[i].x;
/* 293 */               data[(i * 3 + 1)] = coords[i].y;
/* 294 */               data[(i * 3 + 2)] = coords[i].z;
/*     */             }
/* 296 */             writeFloatArray(out, data);
/* 297 */           } else if (((GeometryArray)this.node).getCoordRef3d() != null) {
/* 298 */             out.writeInt(10);
/* 299 */             Point3d[] coords = ((GeometryArray)this.node).getCoordRef3d();
/* 300 */             double[] data = new double[coords.length * 3];
/* 301 */             for (int i = 0; i < coords.length; i++) {
/* 302 */               data[(i * 3 + 0)] = coords[i].x;
/* 303 */               data[(i * 3 + 1)] = coords[i].y;
/* 304 */               data[(i * 3 + 2)] = coords[i].z;
/*     */             }
/* 306 */             writeDoubleArray(out, data);
/* 307 */           } else if (((GeometryArray)this.node).getCoordRefFloat() != null) {
/* 308 */             out.writeInt(2);
/* 309 */             writeFloatArray(out, ((GeometryArray)this.node).getCoordRefFloat());
/* 310 */           } else if (((GeometryArray)this.node).getCoordRefDouble() != null) {
/* 311 */             out.writeInt(3);
/* 312 */             writeDoubleArray(out, ((GeometryArray)this.node).getCoordRefDouble()); } else {
/* 313 */             out.writeInt(0);
/*     */           }
/*     */         } else { float[] points = new float[this.vertexCount * 3];
/* 316 */           ((GeometryArray)this.node).getCoordinates(0, points);
/* 317 */           writeFloatArray(out, points);
/*     */         }
/*     */       }
/*     */
/* 321 */       if ((this.vertexFormat & 0x2) != 0)
/*     */       {
/* 323 */         if (byRef) {
/* 324 */           if (!(this.node instanceof IndexedGeometryArray)) {
/* 325 */             out.writeInt(((GeometryArray)this.node).getInitialNormalIndex());
/*     */           }
/*     */
/* 328 */           if (nio) {
/* 329 */             J3DBuffer buf = ((GeometryArray)this.node).getNormalRefBuffer();
/* 330 */             if (BufferWrapper.getBufferType(buf) == 0) {
/* 331 */               out.writeInt(0);
/*     */             } else {
/* 333 */               out.writeInt(2);
/* 334 */               FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 335 */               float[] floats = new float[bb.limit()];
/* 336 */               bb.position(0);
/* 337 */               bb.get(floats);
/* 338 */               writeFloatArray(out, floats);
/*     */             }
/* 340 */           } else if (((GeometryArray)this.node).getNormalRef3f() != null) {
/* 341 */             out.writeInt(7);
/* 342 */             Vector3f[] norms = ((GeometryArray)this.node).getNormalRef3f();
/* 343 */             float[] data = new float[norms.length * 3];
/* 344 */             for (int i = 0; i < norms.length; i++) {
/* 345 */               data[(i * 3 + 0)] = norms[i].x;
/* 346 */               data[(i * 3 + 1)] = norms[i].y;
/* 347 */               data[(i * 3 + 2)] = norms[i].z;
/*     */             }
/* 349 */             writeFloatArray(out, data);
/* 350 */           } else if (((GeometryArray)this.node).getNormalRefFloat() != null) {
/* 351 */             out.writeInt(2);
/* 352 */             writeFloatArray(out, ((GeometryArray)this.node).getNormalRefFloat()); } else {
/* 353 */             out.writeInt(0);
/*     */           }
/*     */         } else { float[] normals = new float[this.vertexCount * 3];
/* 356 */           ((GeometryArray)this.node).getNormals(0, normals);
/* 357 */           writeFloatArray(out, normals);
/*     */         }
/*     */       }
/*     */
/* 361 */       if ((this.vertexFormat & 0x20) != 0)
/*     */       {
/* 363 */         for (int set = 0; set < this.texCoordSetCount; set++)
/* 364 */           if (byRef) {
/* 365 */             if (!(this.node instanceof IndexedGeometryArray)) {
/* 366 */               out.writeInt(((GeometryArray)this.node).getInitialTexCoordIndex(set));
/*     */             }
/*     */
/* 369 */             if (nio) {
/* 370 */               J3DBuffer buf = ((GeometryArray)this.node).getTexCoordRefBuffer(set);
/* 371 */               if (BufferWrapper.getBufferType(buf) == 0) {
/* 372 */                 out.writeInt(0);
/*     */               } else {
/* 374 */                 out.writeInt(2);
/* 375 */                 FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 376 */                 float[] floats = new float[bb.limit()];
/* 377 */                 bb.position(0);
/* 378 */                 bb.get(floats);
/* 379 */                 writeFloatArray(out, floats);
/*     */               }
/* 381 */             } else if (((GeometryArray)this.node).getTexCoordRef2f(set) != null) {
/* 382 */               out.writeInt(6);
/* 383 */               TexCoord2f[] tcoords = ((GeometryArray)this.node).getTexCoordRef2f(set);
/* 384 */               float[] data = new float[tcoords.length * 2];
/* 385 */               for (int i = 0; i < tcoords.length; i++) {
/* 386 */                 data[(i * 2 + 0)] = tcoords[i].x;
/* 387 */                 data[(i * 2 + 1)] = tcoords[i].y;
/*     */               }
/* 389 */               writeFloatArray(out, data);
/* 390 */             } else if (((GeometryArray)this.node).getTexCoordRefFloat(set) != null) {
/* 391 */               out.writeInt(2);
/* 392 */               writeFloatArray(out, ((GeometryArray)this.node).getTexCoordRefFloat(set)); } else {
/* 393 */               out.writeInt(0);
/*     */             }
/*     */           } else { float[] textureCoords = new float[this.vertexCount * 2];
/* 396 */             ((GeometryArray)this.node).getTextureCoordinates(set, 0, textureCoords);
/* 397 */             writeFloatArray(out, textureCoords);
/*     */           }
/*     */       }
/* 400 */       else if ((this.vertexFormat & 0x40) != 0)
/*     */       {
/* 402 */         for (int set = 0; set < this.texCoordSetCount; set++)
/* 403 */           if (byRef) {
/* 404 */             if (!(this.node instanceof IndexedGeometryArray)) {
/* 405 */               out.writeInt(((GeometryArray)this.node).getInitialTexCoordIndex(set));
/*     */             }
/*     */
/* 408 */             if (nio) {
/* 409 */               J3DBuffer buf = ((GeometryArray)this.node).getTexCoordRefBuffer(set);
/* 410 */               if (BufferWrapper.getBufferType(buf) == 0) {
/* 411 */                 out.writeInt(0);
/*     */               } else {
/* 413 */                 out.writeInt(2);
/* 414 */                 FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 415 */                 float[] floats = new float[bb.limit()];
/* 416 */                 bb.position(0);
/* 417 */                 bb.get(floats);
/* 418 */                 writeFloatArray(out, floats);
/*     */               }
/* 420 */             } else if (((GeometryArray)this.node).getTexCoordRef3f(set) != null) {
/* 421 */               out.writeInt(7);
/* 422 */               TexCoord3f[] tcoords = ((GeometryArray)this.node).getTexCoordRef3f(set);
/* 423 */               float[] data = new float[tcoords.length * 3];
/* 424 */               for (int i = 0; i < tcoords.length; i++) {
/* 425 */                 data[(i * 3 + 0)] = tcoords[i].x;
/* 426 */                 data[(i * 3 + 1)] = tcoords[i].y;
/* 427 */                 data[(i * 3 + 2)] = tcoords[i].z;
/*     */               }
/* 429 */               writeFloatArray(out, data);
/* 430 */             } else if (((GeometryArray)this.node).getTexCoordRefFloat(set) != null) {
/* 431 */               out.writeInt(2);
/* 432 */               writeFloatArray(out, ((GeometryArray)this.node).getTexCoordRefFloat(set)); } else {
/* 433 */               out.writeInt(0);
/*     */             }
/*     */           } else { float[] textureCoords = new float[this.vertexCount * 3];
/* 436 */             ((GeometryArray)this.node).getTextureCoordinates(set, 0, textureCoords);
/* 437 */             writeFloatArray(out, textureCoords);
/*     */           }
/*     */       }
/* 440 */       else if ((this.vertexFormat & 0x400) != 0)
/*     */       {
/* 442 */         for (int set = 0; set < this.texCoordSetCount; set++)
/* 443 */           if (byRef) {
/* 444 */             if (!(this.node instanceof IndexedGeometryArray)) {
/* 445 */               out.writeInt(((GeometryArray)this.node).getInitialTexCoordIndex(set));
/*     */             }
/*     */
/* 448 */             if (nio) {
/* 449 */               J3DBuffer buf = ((GeometryArray)this.node).getTexCoordRefBuffer(set);
/* 450 */               if (BufferWrapper.getBufferType(buf) == 0) {
/* 451 */                 out.writeInt(0);
/*     */               } else {
/* 453 */                 out.writeInt(2);
/* 454 */                 FloatBufferWrapper bb = new FloatBufferWrapper(buf);
/* 455 */                 float[] floats = new float[bb.limit()];
/* 456 */                 bb.position(0);
/* 457 */                 bb.get(floats);
/* 458 */                 writeFloatArray(out, floats);
/*     */               }
/*     */             }
/* 461 */             else if (((GeometryArray)this.node).getTexCoordRefFloat(set) != null) {
/* 462 */               out.writeInt(2);
View Full Code Here

/*     */       }
/* 486 */       if (nio) {
/* 487 */         float[] floats = readFloatArray(in);
/* 488 */         ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(floats.length * 4);
/*     */
/* 490 */         FloatBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/*     */
/* 492 */         f.put(floats);
/* 493 */         ((GeometryArray)this.node).setInterleavedVertexBuffer(f.getJ3DBuffer()); } else {
/* 494 */         ((GeometryArray)this.node).setInterleavedVertices(readFloatArray(in));
/*     */       }
/*     */     } else { boolean byRef = (this.vertexFormat & 0x80) != 0;
/*     */
/* 501 */       if (!(this.node instanceof IndexedGeometryArray)) {
/* 502 */         if (!byRef)
/* 503 */           ((GeometryArray)this.node).setInitialVertexIndex(in.readInt());
/* 504 */         if (!(this.node instanceof GeometryStripArray)) {
/* 505 */           ((GeometryArray)this.node).setValidVertexCount(in.readInt());
/*     */         }
/*     */       }
/* 508 */       if ((this.vertexFormat & 0xC) == 12) {
/* 509 */         if (byRef) {
/* 510 */           if (!(this.node instanceof IndexedGeometryArray)) {
/* 511 */             ((GeometryArray)this.node).setInitialColorIndex(in.readInt());
/*     */           }
/*     */
/* 514 */           if (nio) {
/* 515 */             switch (in.readInt()) {
/*     */             case 1:
/* 517 */               byte[] bytes = new byte[in.readInt()];
/* 518 */               in.readFully(bytes);
/* 519 */               ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(bytes.length);
/*     */
/* 521 */               b.put(bytes);
/* 522 */               ((GeometryArray)this.node).setColorRefBuffer(b.getJ3DBuffer());
/*     */
/* 524 */               break;
/*     */             case 2:
/* 526 */               float[] floats = readFloatArray(in);
/* 527 */               ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(floats.length * 4);
/*     */
/* 529 */               FloatBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/*     */
/* 531 */               f.put(floats);
/* 532 */               ((GeometryArray)this.node).setColorRefBuffer(f.getJ3DBuffer());
/*     */             }
/*     */           }
/*     */           else
/*     */           {
/* 537 */             switch (in.readInt()) {
/*     */             case 8:
/* 539 */               float[] data = readFloatArray(in);
/* 540 */               Color4f[] colors = new Color4f[data.length / 4];
/* 541 */               for (int i = 0; i < colors.length; i++) {
/* 542 */                 colors[i].x = data[(i * 4 + 0)];
/* 543 */                 colors[i].y = data[(i * 4 + 1)];
/* 544 */                 colors[i].z = data[(i * 4 + 2)];
/* 545 */                 colors[i].w = data[(i * 4 + 3)];
/*     */               }
/* 547 */               ((GeometryArray)this.node).setColorRef4f(colors);
/*     */
/* 549 */               break;
/*     */             case 2:
/* 551 */               ((GeometryArray)this.node).setColorRefFloat(readFloatArray(in));
/* 552 */               break;
/*     */             case 1:
/* 554 */               byte[] data = new byte[in.readInt()];
/* 555 */               in.readFully(data);
/* 556 */               ((GeometryArray)this.node).setColorRefByte(data);
/*     */
/* 558 */               break;
/*     */             case 5:
/* 560 */               Color4b[] colors = new Color4b[in.readInt()];
/* 561 */               byte[] data = new byte[colors.length * 4];
/* 562 */               in.readFully(data);
/* 563 */               for (int i = 0; i < colors.length; i++) {
/* 564 */                 colors[i].x = data[(i * 4 + 0)];
/* 565 */                 colors[i].y = data[(i * 4 + 1)];
/* 566 */                 colors[i].z = data[(i * 4 + 2)];
/* 567 */                 colors[i].w = data[(i * 4 + 3)];
/*     */               }
/* 569 */               ((GeometryArray)this.node).setColorRef4b(colors);
/*     */             case 3:
/*     */             case 4:
/*     */             case 6:
/*     */             case 7:
/*     */             }
/*     */           }
/*     */         } else { byte[] colors = new byte[this.vertexCount * 4];
/* 577 */           in.readFully(colors);
/* 578 */           ((GeometryArray)this.node).setColors(0, colors); }
/*     */       }
/* 580 */       else if ((this.vertexFormat & 0x4) == 4) {
/* 581 */         if (byRef) {
/* 582 */           if (!(this.node instanceof IndexedGeometryArray)) {
/* 583 */             ((GeometryArray)this.node).setInitialColorIndex(in.readInt());
/*     */           }
/*     */
/* 586 */           if (nio) {
/* 587 */             switch (in.readInt()) {
/*     */             case 1:
/* 589 */               byte[] bytes = new byte[in.readInt()];
/* 590 */               in.readFully(bytes);
/* 591 */               ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(bytes.length);
/*     */
/* 593 */               b.put(bytes);
/* 594 */               ((GeometryArray)this.node).setColorRefBuffer(b.getJ3DBuffer());
/*     */
/* 596 */               break;
/*     */             case 2:
/* 598 */               float[] floats = readFloatArray(in);
/* 599 */               ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(floats.length * 4);
/*     */
/* 601 */               FloatBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/*     */
/* 603 */               f.put(floats);
/* 604 */               ((GeometryArray)this.node).setColorRefBuffer(f.getJ3DBuffer());
/*     */             }
/*     */           }
/*     */           else
/*     */           {
/* 609 */             switch (in.readInt()) {
/*     */             case 7:
/* 611 */               float[] data = readFloatArray(in);
/* 612 */               Color3f[] colors = new Color3f[data.length / 3];
/* 613 */               for (int i = 0; i < colors.length; i++) {
/* 614 */                 colors[i].x = data[(i * 3 + 0)];
/* 615 */                 colors[i].y = data[(i * 3 + 1)];
/* 616 */                 colors[i].z = data[(i * 3 + 2)];
/*     */               }
/* 618 */               ((GeometryArray)this.node).setColorRef3f(colors);
/*     */
/* 620 */               break;
/*     */             case 2:
/* 622 */               ((GeometryArray)this.node).setColorRefFloat(readFloatArray(in));
/* 623 */               break;
/*     */             case 1:
/* 625 */               byte[] data = new byte[in.readInt()];
/* 626 */               in.readFully(data);
/* 627 */               ((GeometryArray)this.node).setColorRefByte(data);
/*     */
/* 629 */               break;
/*     */             case 4:
/* 631 */               Color3b[] colors = new Color3b[in.readInt()];
/* 632 */               byte[] data = new byte[colors.length * 3];
/* 633 */               in.readFully(data);
/* 634 */               for (int i = 0; i < colors.length; i++) {
/* 635 */                 colors[i].x = data[(i * 3 + 0)];
/* 636 */                 colors[i].y = data[(i * 3 + 1)];
/* 637 */                 colors[i].z = data[(i * 3 + 2)];
/*     */               }
/* 639 */               ((GeometryArray)this.node).setColorRef3b(colors);
/*     */             case 3:
/*     */             case 5:
/*     */             case 6:
/*     */             }
/*     */           }
/*     */         } else {
/* 646 */           byte[] colors = new byte[this.vertexCount * 3];
/* 647 */           in.readFully(colors);
/* 648 */           ((GeometryArray)this.node).setColors(0, colors);
/*     */         }
/*     */       }
/*     */
/* 652 */       if ((this.vertexFormat & 0x1) != 0) {
/* 653 */         if (byRef) {
/* 654 */           if (!(this.node instanceof IndexedGeometryArray)) {
/* 655 */             ((GeometryArray)this.node).setInitialCoordIndex(in.readInt());
/*     */           }
/*     */
/* 658 */           if (nio) {
/* 659 */             switch (in.readInt()) {
/*     */             case 2:
/* 661 */               float[] floats = readFloatArray(in);
/* 662 */               ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(floats.length * 4);
/*     */
/* 664 */               FloatBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/*     */
/* 666 */               f.put(floats);
/* 667 */               ((GeometryArray)this.node).setCoordRefBuffer(f.getJ3DBuffer());
/*     */
/* 669 */               break;
/*     */             case 3:
/* 671 */               double[] doubles = readDoubleArray(in);
/* 672 */               ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(doubles.length * 4);
/*     */
/* 674 */               DoubleBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asDoubleBuffer();
/*     */
/* 676 */               f.put(doubles);
/* 677 */               ((GeometryArray)this.node).setCoordRefBuffer(f.getJ3DBuffer());
/*     */             }
/*     */           }
/*     */           else
/*     */           {
/* 682 */             switch (in.readInt()) {
/*     */             case 7:
/* 684 */               float[] data = readFloatArray(in);
/* 685 */               Point3f[] coords = new Point3f[data.length / 3];
/* 686 */               for (int i = 0; i < coords.length; i++) {
/* 687 */                 coords[i].x = data[(i * 3 + 0)];
/* 688 */                 coords[i].y = data[(i * 3 + 1)];
/* 689 */                 coords[i].z = data[(i * 3 + 2)];
/*     */               }
/* 691 */               ((GeometryArray)this.node).setCoordRef3f(coords);
/*     */
/* 693 */               break;
/*     */             case 10:
/* 695 */               double[] data = readDoubleArray(in);
/* 696 */               Point3d[] coords = new Point3d[data.length / 3];
/* 697 */               for (int i = 0; i < coords.length; i++) {
/* 698 */                 coords[i].x = data[(i * 3 + 0)];
/* 699 */                 coords[i].y = data[(i * 3 + 1)];
/* 700 */                 coords[i].z = data[(i * 3 + 2)];
/*     */               }
/* 702 */               ((GeometryArray)this.node).setCoordRef3d(coords);
/*     */
/* 704 */               break;
/*     */             case 2:
/* 706 */               ((GeometryArray)this.node).setCoordRefFloat(readFloatArray(in));
/* 707 */               break;
/*     */             case 3:
/* 709 */               ((GeometryArray)this.node).setCoordRefDouble(readDoubleArray(in));
/*     */             case 4:
/*     */             case 5:
/*     */             case 6:
/*     */             case 8:
/*     */             case 9: }
/*     */           } } else { float[] points = readFloatArray(in);
/* 716 */           ((GeometryArray)this.node).setCoordinates(0, points);
/*     */         }
/*     */       }
/*     */
/* 720 */       if ((this.vertexFormat & 0x2) != 0) {
/* 721 */         if (byRef) {
/* 722 */           if (!(this.node instanceof IndexedGeometryArray)) {
/* 723 */             ((GeometryArray)this.node).setInitialNormalIndex(in.readInt());
/*     */           }
/*     */
/* 726 */           if (nio) {
/* 727 */             if (in.readInt() == 2) {
/* 728 */               float[] floats = readFloatArray(in);
/* 729 */               ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(floats.length * 4);
/*     */
/* 731 */               FloatBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/*     */
/* 733 */               f.put(floats);
/* 734 */               ((GeometryArray)this.node).setNormalRefBuffer(f.getJ3DBuffer());
/*     */             }
/*     */           }
/* 737 */           else switch (in.readInt()) {
/*     */             case 7:
/* 739 */               float[] data = readFloatArray(in);
/* 740 */               Vector3f[] norms = new Vector3f[data.length / 3];
/* 741 */               for (int i = 0; i < norms.length; i++) {
/* 742 */                 norms[i].x = data[(i * 3 + 0)];
/* 743 */                 norms[i].y = data[(i * 3 + 1)];
/* 744 */                 norms[i].z = data[(i * 3 + 2)];
/*     */               }
/* 746 */               ((GeometryArray)this.node).setNormalRef3f(norms);
/*     */
/* 748 */               break;
/*     */             case 2:
/* 750 */               ((GeometryArray)this.node).setNormalRefFloat(readFloatArray(in));
/*     */             }
/*     */
/*     */         }
/*     */         else
/*     */         {
/* 756 */           float[] normals = readFloatArray(in);
/* 757 */           ((GeometryArray)this.node).setNormals(0, normals);
/*     */         }
/*     */       }
/*     */
/* 761 */       if (((this.vertexFormat & 0x20) != 0) || ((this.vertexFormat & 0x40) != 0) || ((this.vertexFormat & 0x400) != 0))
/*     */       {
/* 764 */         if (byRef) {
/* 765 */           for (int set = 0; set < this.texCoordSetCount; set++) {
/* 766 */             if (!(this.node instanceof IndexedGeometryArray)) {
/* 767 */               ((GeometryArray)this.node).setInitialTexCoordIndex(set, in.readInt());
/*     */             }
/*     */
/* 770 */             if (nio) {
/* 771 */               if (in.readInt() == 2) {
/* 772 */                 float[] floats = readFloatArray(in);
/* 773 */                 ByteBufferWrapper b = ByteBufferWrapper.allocateDirect(floats.length * 4);
/*     */
/* 775 */                 FloatBufferWrapper f = b.order(ByteOrderWrapper.nativeOrder()).asFloatBuffer();
/*     */
/* 777 */                 f.put(floats);
/* 778 */                 ((GeometryArray)this.node).setTexCoordRefBuffer(set, f.getJ3DBuffer());
/*     */               }
/*     */             }
/*     */             else {
/* 782 */               switch (in.readInt()) {
/*     */               case 6:
View Full Code Here

TOP

Related Classes of com.sun.j3d.internal.FloatBufferWrapper

Copyright © 2018 www.massapicom. 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.