Package javax.vecmath

Examples of javax.vecmath.Vector4f


      boolean textureCoordinatesDefined = (geometryArray.getVertexFormat() & GeometryArray.TEXTURE_COORDINATE_2) != 0;
      int [] textureCoordinatesIndexSubstitutes = new int [geometryArray.getVertexCount()];

      boolean textureCoordinatesGenerated = false;
      Vector4f planeS = null;
      Vector4f planeT = null;
      if (texCoordGeneration != null) {
        textureCoordinatesGenerated = texCoordGeneration.getGenMode() == TexCoordGeneration.OBJECT_LINEAR
            && texCoordGeneration.getEnable()
            && !(geometryArray instanceof IndexedLineArray)
            && !(geometryArray instanceof IndexedLineStripArray)
            && !(geometryArray instanceof LineArray)
            && !(geometryArray instanceof LineStripArray);
        if (textureCoordinatesGenerated) {
          planeS = new Vector4f();
          planeT = new Vector4f();
          texCoordGeneration.getPlaneS(planeS);
          texCoordGeneration.getPlaneT(planeT);
        }
      }
     
View Full Code Here


          } else if (color == null && texture != null) {
            // Change material to white then texture
            appearance.setMaterial(getMaterial(DEFAULT_COLOR, DEFAULT_AMBIENT_COLOR, materialShininess));
            TexCoordGeneration texCoordGeneration = new TexCoordGeneration(TexCoordGeneration.OBJECT_LINEAR,
                TexCoordGeneration.TEXTURE_COORDINATE_2,
                new Vector4f(-pieceSize.x / modelSize.x / texture.getWidth(), 0, 0, 0),
                new Vector4f(0, pieceSize.y / modelSize.y / texture.getHeight(), pieceSize.z / modelSize.z / texture.getHeight(), 0));
            appearance.setTexCoordGeneration(texCoordGeneration);
            appearance.setTextureAttributes(MODULATE_TEXTURE_ATTRIBUTES);
            TextureManager.getInstance().loadTexture(texture.getImage(), waitTextureLoadingEnd,
                new TextureManager.TextureObserver() {
                    public void textureUpdated(Texture texture) {
View Full Code Here

            renderSphere.draw(radius, slices, stacks);
            glPopMatrix();
        }

        Vector4f getColour() {
            return new Vector4f(colour);
        }
View Full Code Here

            renderSphere.draw(radius, slices, stacks);
            glPopMatrix();
        }

        Vector4f getColour() {
            return new Vector4f(colour);
        }
View Full Code Here

  {
    Sun sun = new Sun();
    sun.setId(1);
    sun.setName("Sun");
    sun.setSize(50);
    sun.setStartColor(new Vector4f(100,100,100,100));
    sun.setEndColor(new Vector4f(200,200,200,200));
   
    Planet merkury = new Planet();
    merkury.setId(1);
    merkury.setName("Merkury");
   
View Full Code Here

     * texture generation modes.
     * @param planeS plane equation for the S coordinate
     */
    final void setPlaneS(Vector4f planeS) {
  initPlaneS(planeS);
  sendMessage(PLANE_S_CHANGED, new Vector4f(planeS));
    }
View Full Code Here

     * texture generation modes.
     * @param planeT plane equation for the T coordinate
     */
    final void setPlaneT(Vector4f planeT) {
  initPlaneT(planeT);
  sendMessage(PLANE_T_CHANGED, new Vector4f(planeT));
    }
View Full Code Here

     * texture generation modes.
     * @param planeR plane equation for the R coordinate
     */
    final void setPlaneR(Vector4f planeR) {
  initPlaneR(planeR);
  sendMessage(PLANE_R_CHANGED, new Vector4f(planeR));
    }
View Full Code Here

     * texture generation modes.
     * @param planeQ plane equation for the Q coordinate
     */
    final void setPlaneQ(Vector4f planeQ) {
  initPlaneQ(planeQ);
  sendMessage(PLANE_Q_CHANGED, new Vector4f(planeQ));
    }
View Full Code Here

    }

    @Override
    protected Object clone() {
  TexCoordGenerationRetained tr = (TexCoordGenerationRetained)super.clone();
  tr.planeS = new Vector4f(planeS);
  tr.planeT = new Vector4f(planeT);
  tr.planeR = new Vector4f(planeR);
  // other attributes is copied in super.clone()
  return tr;

    }
View Full Code Here

TOP

Related Classes of javax.vecmath.Vector4f

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.