Package com.jme3.font

Examples of com.jme3.font.BitmapText


    @Override
    public void simpleUpdate(float tpf){
        angle += tpf;
        angle %= FastMath.TWO_PI;
       
        pl.setPosition(new Vector3f(FastMath.cos(angle) * 2f, 0.5f, FastMath.sin(angle) * 2f));
        lightMdl.setLocalTranslation(pl.getPosition());
    }
View Full Code Here


    app.start();
  }

  @Override
  public void simpleInitApp() {
        cam.setLocation(new Vector3f(3, 3, 3));
        cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
       
    Bubble b = new Bubble(1f, 4f);
    /*
    b.setMode(Mesh.Mode.Points);
 
View Full Code Here

    for (int i = 0; i <= samples; i++) {
      float x = FastMath.cos(angle);
      float z = FastMath.sin(angle);
      int verticesBase = i+1;
      int indicesBase = (i-1)*3;
      vertices[verticesBase] = new Vector3f((x * radius) + ref.x, ref.y, (z * radius) + ref.z);
      texCoord[verticesBase] = new Vector2f((x * 0.5f) + 0.5f, rw-(z * rw));
      System.out.println(texCoord[verticesBase]);
      if (lastPoint > 0) {
        indices[indicesBase] = 0;
        indices[indicesBase+1] = verticesBase;
        indices[indicesBase+2] = lastPoint;
      }
      lastPoint = verticesBase;
      angle += rate;
    }
   
    // right center
    ref.z = radius-width/2f;
    int base2 = samples+2;
    vertices[base2] = ref.clone();
   
    float rbw = (width-radius)/width;
    texCoord[base2] = new Vector2f(0.5f, rbw);
    angle = FastMath.PI;
    lastPoint = 0;
   
    // draw right half circle
    for (int i = 0; i <= samples; i++) {
      float x = FastMath.cos(angle);
      float z = FastMath.sin(angle);
      int verticesBase = i+samples+3;
      int indicesBase = (i+samples)*3;
      vertices[verticesBase] = new Vector3f((x * radius) + ref.x, ref.y, (z * radius) + ref.z);
      texCoord[verticesBase] = new Vector2f((x * 0.5f) + 0.5f, 1 - (z * rw));
      if (lastPoint > 0) {
        indices[indicesBase] = base2;
        indices[indicesBase+1] = verticesBase;
        indices[indicesBase+2] = lastPoint;
View Full Code Here

    for (int i = 0; i < samples; i++) {
      float x = FastMath.cos(angle) + center.x;
      float y = FastMath.sin(angle) + center.y;
      int base = i*2;
      int indicesBase = i*6;
      vertices[base] = new Vector3f(x * radius, y * radius, center.z);
      vertices[base+1] = new Vector3f(x * (radius-width), y * (radius-width), center.z);
      texCoord[base] = new Vector2f(x * radius, y * radius);
      texCoord[base+1] = new Vector2f(x * (radius-width), y * (radius-width));
     
      indices[indicesBase] = base;
      indices[indicesBase+1] = calc(base+1);
View Full Code Here

  }

  @Override
  public void onCamLocationChange(Vector3f camLoaction) {
   
        Vector3f newDirection = new Vector3f();
        Vector3f newUp = new Vector3f();
        Vector3f newLeft = new Vector3f();
       
        newDirection.set(camLoaction).subtractLocal(getLocalTranslation()).normalizeLocal();

        newUp.set(Vector3f.UNIT_Y);
       

        newLeft.set(newUp).crossLocal(newDirection).normalizeLocal();
        if (newLeft.equals(Vector3f.ZERO)) {
            if (newDirection.x != 0) {
                newLeft.set(newDirection.y, -newDirection.x, 0f);
            } else {
                newLeft.set(0f, newDirection.z, -newDirection.y);
            }
        }

        newUp.set(newDirection).crossLocal(newLeft).normalizeLocal();
       
View Full Code Here

    for (int i = 0; i <= samples; i++) {
      float x = FastMath.cos(angle);
      float z = FastMath.sin(angle);
      int verticesBase = i+1;
      int indicesBase = (i-1)*3;
      vertices[verticesBase] = new Vector3f((x * radius) + ref.x, ref.y, (z * radius) + ref.z);
      texCoord[verticesBase] = new Vector2f(1-rw+(z * rw), (x * 0.5f) + 0.5f);
      if (lastPoint > 0) {
        indices[indicesBase] = 0;
        indices[indicesBase+1] = verticesBase;
        indices[indicesBase+2] = lastPoint;
      }
      lastPoint = verticesBase;
      angle += rate;
    }
   
    // right center
    ref.z = radius-width/2f;
    int base2 = samples+2;
    vertices[base2] = ref.clone();
   
   
    texCoord[base2] = new Vector2f(rw, 0.5f);
    angle = FastMath.PI;
    lastPoint = 0;
   
    // draw right half circle
    for (int i = 0; i <= samples; i++) {
      float x = FastMath.cos(angle);
      float z = FastMath.sin(angle);
      int verticesBase = i+samples+3;
      int indicesBase = (i+samples)*3;
      vertices[verticesBase] = new Vector3f((x * radius) + ref.x, ref.y, (z * radius) + ref.z);
      texCoord[verticesBase] = new Vector2f(rw + (z * rw), (x * 0.5f) + 0.5f);
      System.out.println(texCoord[verticesBase]);
      if (lastPoint > 0) {
        indices[indicesBase] = base2;
        indices[indicesBase+1] = verticesBase;
View Full Code Here

 
  public void update(float tpf) {
    if (!isFinished()) {
      updateTimer(tpf);
      float p = getProgress();
      Vector3f tar = target.getLocalTranslation();
      Vector3f route = tar.subtract(start);
      route.multLocal(p);
      Vector3f newPos = start.add(route);
      position.setLocalTranslation(newPos);
    }
  }
View Full Code Here

  public void addBloomFilter() {
    this.enqueue(new Callable<Integer>(){

      public Integer call() throws Exception {
        if (bloomFilter == null) {
          bloomFilter = new FilterPostProcessor(assetManager);
          BloomFilter bf = new BloomFilter(BloomFilter.GlowMode.Objects);
          bf.setBloomIntensity(2.0f);
          bf.setExposurePower(1.3f);
          bloomFilter.addFilter(bf);
          @SuppressWarnings("unused")
View Full Code Here

    this.enqueue(new Callable<Integer>(){

      public Integer call() throws Exception {
        if (bloomFilter == null) {
          bloomFilter = new FilterPostProcessor(assetManager);
          BloomFilter bf = new BloomFilter(BloomFilter.GlowMode.Objects);
          bf.setBloomIntensity(2.0f);
          bf.setExposurePower(1.3f);
          bloomFilter.addFilter(bf);
          @SuppressWarnings("unused")
          BloomUI bui = new BloomUI(inputManager, bf);
        }
        viewPort.addProcessor(bloomFilter);
View Full Code Here

    }

    @Override
    public void simpleInitApp() {
        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
        Geometry geom = new Geometry("Box", b);
        geom.updateModelBound();

        Material mat = new Material(assetManager, "Common/MatDefs/Misc/SolidColor.j3md");
        mat.setColor("m_Color", ColorRGBA.Blue);
        geom.setMaterial(mat);

        rootNode.attachChild(geom);
    }
View Full Code Here

TOP

Related Classes of com.jme3.font.BitmapText

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.