Package com.sun.j3d.internal

Examples of com.sun.j3d.internal.FloatBufferWrapper


/* 182 */       break;
/*     */     case 7:
/* 184 */       FloatBuffer floatBuffer = ((FloatBuffer)buffer).asReadOnlyBuffer();
/*     */
/* 186 */       floatBuffer.rewind();
/* 187 */       this.bufferImpl = new FloatBufferWrapper(floatBuffer);
/* 188 */       break;
/*     */     case 8:
/* 190 */       DoubleBuffer doubleBuffer = ((DoubleBuffer)buffer).asReadOnlyBuffer();
/*     */
/* 192 */       doubleBuffer.rewind();
View Full Code Here


/* 1677 */       J3DBuffer buffer = ga.getCoordRefBuffer();
/* 1678 */       this.initialPositionIndex = ga.getInitialCoordIndex();
/*      */
/* 1680 */       switch (BufferWrapper.getBufferType(buffer)) {
/*      */       case 3:
/* 1682 */         this.positionsF = new FloatBufferWrapper(buffer);
/*      */
/* 1684 */         break;
/*      */       case 4:
/* 1686 */         this.positionsD = new DoubleBufferWrapper(buffer);
/*      */
/* 1688 */         break;
/*      */       default:
/* 1690 */         throw new IllegalArgumentException("\nposition buffer must be FloatBuffer or DoubleBuffer");
/*      */       }
/*      */
/* 1694 */       if (CompressionStream.this.vertexColors) {
/* 1695 */         buffer = ga.getColorRefBuffer();
/* 1696 */         this.initialColorIndex = ga.getInitialColorIndex();
/*      */
/* 1698 */         switch (BufferWrapper.getBufferType(buffer)) {
/*      */         case 2:
/* 1700 */           this.colorsB = new ByteBufferWrapper(buffer);
/*      */
/* 1702 */           break;
/*      */         case 3:
/* 1704 */           this.colorsF = new FloatBufferWrapper(buffer);
/*      */
/* 1706 */           break;
/*      */         default:
/* 1708 */           throw new IllegalArgumentException("\ncolor buffer must be ByteBuffer or FloatBuffer");
/*      */         }
/*      */
/*      */       }
/*      */
/* 1713 */       if (CompressionStream.this.vertexNormals) {
/* 1714 */         buffer = ga.getNormalRefBuffer();
/* 1715 */         this.initialNormalIndex = ga.getInitialNormalIndex();
/*      */
/* 1717 */         switch (BufferWrapper.getBufferType(buffer)) {
/*      */         case 3:
/* 1719 */           this.normals = new FloatBufferWrapper(buffer);
/*      */
/* 1721 */           break;
/*      */         default:
/* 1723 */           throw new IllegalArgumentException("\nnormal buffer must be FloatBuffer");
/*      */         }
View Full Code Here

/*      */     InterleavedGeometryNIO(GeometryArray ga) {
/* 1451 */       super(ga);
/* 1452 */       J3DBuffer buffer = ga.getInterleavedVertexBuffer();
/* 1453 */       if (BufferWrapper.getBufferType(buffer) == 3)
/*      */       {
/* 1455 */         this.fbw = new FloatBufferWrapper(buffer);
/*      */       }
/*      */       else
/* 1458 */         throw new IllegalArgumentException("\ninterleaved vertex buffer must be FloatBuffer");
/*      */     }
View Full Code Here

/*  355 */       if ((this.vertexFormat & 0x800) != 0) {
/*  356 */         if ((this.vertexFormat & 0x100) == 0) {
/*  357 */           switch (this.vertexType & 0x7000)
/*      */           {
/*      */           case 4096:
/*  360 */             FloatBufferWrapper texBuffer = (FloatBufferWrapper)((J3DBuffer)this.refTexCoordsBuffer[texCoordSet]).getBufferImpl();
/*  361 */             if ((this.refTexCoords[texCoordSet] != null) && (multiplier * newMax >= texBuffer.limit())) {
/*  362 */               throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray25"));
/*      */             }
/*      */             break;
/*      */           }
/*      */
View Full Code Here

/*  9691 */       throw new IllegalArgumentException(J3dI18N.getString("GeometryArray103"));
/*       */     }
/*       */
/*  9694 */     if ((this.vertexFormat & 0x800) != 0) {
/*  9695 */       if ((this.vertexType & 0x7000) == 4096) {
/*  9696 */         FloatBufferWrapper texBuffer = (FloatBufferWrapper)((J3DBuffer)this.refTexCoordsBuffer[texCoordSet]).getBufferImpl();
/*  9697 */         if ((this.vertexFormat & 0x20) != 0) {
/*  9698 */           if (texBuffer.limit() < 2 * (initialTexCoordIndex + this.validVertexCount)) {
/*  9699 */             throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("GeometryArray113"));
/*       */           }
/*       */         }
/*  9702 */         else if ((this.vertexFormat & 0x40) != 0) {
/*  9703 */           if (texBuffer.limit() < 3 * (initialTexCoordIndex + this.validVertexCount)) {
/*  9704 */             throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("GeometryArray113"));
/*       */           }
/*       */         }
/*  9707 */         else if (((this.vertexFormat & 0x400) != 0) &&
/*  9708 */           (texBuffer.limit() < 4 * (initialTexCoordIndex + this.validVertexCount))) {
/*  9709 */           throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("GeometryArray113"));
/*       */         }
/*       */       }
/*       */     }
/*       */     else
View Full Code Here

/*       */         }
/*       */
/*       */       }
/* 10401 */       else if ((this.vertexFormat & 0x100) == 0) {
/* 10402 */         if ((this.vertexType & 0x7000) == 4096) {
/* 10403 */           FloatBufferWrapper texBuffer = (FloatBufferWrapper)((J3DBuffer)this.refTexCoordsBuffer[i]).getBufferImpl();
/* 10404 */           if ((this.vertexFormat & 0x20) != 0)
/* 10405 */             count = texBuffer.limit() / 2;
/* 10406 */           else if ((this.vertexFormat & 0x40) != 0)
/* 10407 */             count = texBuffer.limit() / 3;
/* 10408 */           else if ((this.vertexFormat & 0x400) != 0) {
/* 10409 */             count = texBuffer.limit() / 4;
/*       */           }
/*       */         }
/*       */       }
/*       */       else {
/* 10414 */         count = this.interleavedFloatBufferImpl.limit() / this.stride;
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.