Package com.jme.scene

Examples of com.jme.scene.TexCoords


        FloatBuffer buff = BufferUtils.createVector2Buffer(4);
        buff.put(0).put(1);
        buff.put(0).put(0);
        buff.put(1).put(0)
        buff.put(1).put(1);
        VEGETATION_QUAD_TEXCOORDS = new TexCoords(buff);
    }
View Full Code Here


        mesh.setNormalBuffer(BufferUtils.createVector3Buffer(creator.getNumVertices()));
        for (int normalIndex = 0; normalIndex < verticeSize; normalIndex++) {
            BufferUtils.setInBuffer(Vector3f.UNIT_Y, mesh.getNormalBuffer(), normalIndex);
        }

        mesh.setTextureCoords(new TexCoords(BufferUtils.createVector2Buffer(creator.getNumVertices())), 0);
        mesh.setColorBuffer(BufferUtils.createFloatBuffer(creator.getNumVertices() * 4));

        mesh.updateModelBound();

        // Commit the instances to the mesh batch
View Full Code Here

        // allocate normals if requested
        setNormalBuffer(BufferUtils.createVector3Buffer(getNormalBuffer(), getVertexCount()));

        // allocate texture coordinates
        setTextureCoords(new TexCoords(BufferUtils.createVector2Buffer(getVertexCount())));

        // generate geometry
        final float fInvRS = 1.0f / radialSamples;
        final float fZFactor = 2.0f / (zSamples - 1);
View Full Code Here

                getNormalBuffer().put(0).put(0).put(1);
    }

    private void setTextureData() {
        if (getTextureCoords().get(0) == null) {
            getTextureCoords().set(0, new TexCoords(BufferUtils.createVector2Buffer(4)));
            FloatBuffer tex = getTextureCoords().get(0).coords;

            for (int i = 0; i < 1; i++) {
                tex.put(1).put(0);
                tex.put(0).put(0);
View Full Code Here

        setVertexCount(4);
        setVertexBuffer(BufferUtils.createVector3Buffer(getVertexCount()));
        setNormalBuffer(BufferUtils.createVector3Buffer(getVertexCount()));
        FloatBuffer tbuf = BufferUtils.createVector2Buffer(getVertexCount());
        setTextureCoords(new TexCoords(tbuf));
        setTriangleQuantity(2);
        setIndexBuffer(BufferUtils.createIntBuffer(getTriangleCount() * 3));
        float dx = 0, dy = 0;
        switch (orientation) {
        case NORTH:
View Full Code Here

      setModelBound(new BoundingBox());
      updateModelBound();
  }

        FloatBuffer tbuf = BufferUtils.createVector2Buffer(4);
        setTextureCoords(new TexCoords(tbuf));
  tbuf.put(0).put(0);
  tbuf.put(0).put(1);
  tbuf.put(1).put(1);
  tbuf.put(1).put(0);
    }
View Full Code Here

  for (int i = 0; i < 6; i++, mask <<= 1) {
            triMesh = faces[i];
      if ((texturedFaces & mask) != 0) {
    FloatBuffer tbuf = BufferUtils.createVector2Buffer(4);
    triMesh.setTextureCoords(new TexCoords(tbuf));
    tbuf.put(1).put(0);
    tbuf.put(0).put(0);
    tbuf.put(0).put(1);
    tbuf.put(1).put(1);
      } else {
    triMesh.setTextureCoords(new TexCoords(null));
      }
  }
    }
View Full Code Here

        FloatBuffer tbuf = BufferUtils.createVector2Buffer(4);
        tbuf.put(0f).put(0);
        tbuf.put(0f).put(heightRatio);
        tbuf.put(widthRatio).put(heightRatio);
        tbuf.put(widthRatio).put(0);
        quad.setTextureCoords(new TexCoords(tbuf));
    }
View Full Code Here

TOP

Related Classes of com.jme.scene.TexCoords

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.