Examples of Vector4f


Examples of crazypants.vecmath.Vector4f

  }

 
  private void renderBar(int y, double maxDam, double dispDamage, Color full, Color empty) {
    double ratio = dispDamage / maxDam;
    Vector4f fg = ColorUtil.toFloat(full);
    Vector4f ec = ColorUtil.toFloat(empty);

    fg.interpolate(ec, (float) ratio);

    Vector4f bg = new Vector4f(0.17, 0.3, 0.1, 0);

    int barLength = (int) Math.round(12.0 * (1 - ratio));
    RenderUtil.renderQuad2D(2, y, 0, 12, 1, bg);
    RenderUtil.renderQuad2D(2, y, 0, barLength, 1, fg);
  }
View Full Code Here

Examples of crazypants.vecmath.Vector4f

    @Override
    public void draw(int mouseX, int mouseY, float partialTick) {     
      RenderHelper.enableGUIStandardItemLighting();
      GL11.glEnable(GL11.GL_BLEND);
      RenderUtil.renderQuad2D(4, 4, 0, gui.getXSize() - 9, gui.getYSize() - 8, new Vector4f(0,0,0,1));
      RenderUtil.renderQuad2D(6, 6, 0, gui.getXSize() - 13, gui.getYSize() - 12, new Vector4f(0.6,0.6,0.6,1));
     
      Minecraft mc = Minecraft.getMinecraft();
      RenderItem itemRenderer = new RenderItem();
           
      GL11.glEnable(GL11.GL_DEPTH_TEST);
View Full Code Here

Examples of info.ata4.unity.engine.struct.Vector4f

                                uv2.add(vt);
                            }
                            break;

                        case CHANNEL_TANGENTS:
                            Vector4f t = new Vector4f();
                            t.setHalf(half);
                            t.read(in);
                            tangents.add(t);
                            break;
                    }
                }
               
View Full Code Here

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

Examples of javax.vecmath.Vector4f

          } 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

Examples of javax.vecmath.Vector4f

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

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

Examples of javax.vecmath.Vector4f

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

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

Examples of javax.vecmath.Vector4f

  {
    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

Examples of javax.vecmath.Vector4f

     * 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

Examples of javax.vecmath.Vector4f

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