Package com.sun.j3d.internal

Examples of com.sun.j3d.internal.FloatBufferWrapper.limit()


/* 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;
View Full Code Here


/*  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

/*  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();
View Full Code Here

/*  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

/*     */         }
/*     */       }
/*  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());
/*     */       }
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;
View Full Code Here

/* 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);
/*     */
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;
View Full Code Here

/* 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;
View Full Code Here

/*     */
/* 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;
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.