Package org.lwjgl.util.vector

Examples of org.lwjgl.util.vector.Vector3f


    return addVertexToMesh(point, new Vector3f(0.0f, 0.0f, 0.0f), new Vector2f(0.0f, 0.0f), color);
  }

  @Override
  public int addVertexToMesh(Vector3f point,  Vector2f texture) {
    return addVertexToMesh(point, new Vector3f(0.0f, 0.0f, 0.0f), texture, Color.WHITE);
  }
View Full Code Here


    return addVertexToMesh(point, normal, new Vector2f(0.0f, 0.0f), color);
  }

  @Override
  public int addVertexToMesh(Vector3f point, Vector2f texture, Color color) {
    return addVertexToMesh(point, new Vector3f(0.0f, 0.0f, 0.0f), texture, color);
  }
View Full Code Here

  @Override
  public int getQuad(float x, float y, float z, float width, float height) {
   
    int mesh = beginMesh();
   
    int v1 = addVertexToMesh(new Vector3f(x, y, z), new Vector2f(0.0f, 0.0f));
    int v2 = addVertexToMesh(new Vector3f(x + width, y, z), new Vector2f(1.0f, 0.0f));
    int v3 = addVertexToMesh(new Vector3f(x + width, y + height, z), new Vector2f(1.0f, 1.0f));
    int v4 = addVertexToMesh(new Vector3f(x, y + height, z), new Vector2f(0.0f, 1.0f));
   
    addTriangleToMesh(v1, v2, v3);
    addTriangleToMesh(v1, v3, v4);
   
    finishMesh();
View Full Code Here

    _bandWhite.setRotationPoint(0,0,0);
    _bandWhite.setTextureSize(64, 32);
    _bandWhite.mirror = true;
    setRotation(_bandWhite, 0F, 0F, 0F);
   
    _bandColors[0= new Vector3f(255.0f/255.0f, 255.0f/255.0f, 255.0f/255.0f); // white
    _bandColors[1= new Vector3f(255.0f/255.0f, 128.0f/255.0f64.0f/255.0f); // orange
    _bandColors[2= new Vector3f(255.0f/255.0f64.0f/255.0f, 255.0f/255.0f); // magenta
    _bandColors[3= new Vector3f(128.0f/255.0f, 128.0f/255.0f, 255.0f/255.0f); // light blue
    _bandColors[4= new Vector3f(255.0f/255.0f, 255.0f/255.0f,   0.0f/255.0f); // yellow
    _bandColors[5= new Vector3f( 64.0f/255.0f, 255.0f/255.0f64.0f/255.0f); // lime
    _bandColors[6= new Vector3f(255.0f/255.0f, 196.0f/255.0f, 255.0f/255.0f); // pink
    _bandColors[7= new Vector3f( 96.0f/255.0f96.0f/255.0f96.0f/255.0f); // gray
    _bandColors[8= new Vector3f(168.0f/255.0f, 168.0f/255.0f, 168.0f/255.0f); // light gray
    _bandColors[9= new Vector3f( 64.0f/255.0f, 128.0f/255.0f, 128.0f/255.0f); // cyan
    _bandColors[10] = new Vector3f(128.0f/255.0f,   0.0f/255.0f, 192.0f/255.0f); // purple
    _bandColors[11] = new Vector3f0.0f/255.0f,   0.0f/255.0f, 255.0f/255.0f); // blue
    _bandColors[12] = new Vector3f( 96.0f/255.0f64.0f/255.0f32.0f/255.0f); // brown
    _bandColors[13] = new Vector3f0.0f/255.0f, 128.0f/255.0f,   0.0f/255.0f); // green
    _bandColors[14] = new Vector3f(255.0f/255.0f,   0.0f/255.0f,   0.0f/255.0f); // red
    _bandColors[15] = new Vector3f( 32.0f/255.0f32.0f/255.0f32.0f/255.0f); // black
  }
View Full Code Here

    return x == 0 ? y == 0 || z == 0 : y == 0 && z == 0;
  }

  @SideOnly(Side.CLIENT)
  public Vector3f vector3f() {
    return new Vector3f((float)x, (float)y, (float)z);
  }
View Full Code Here

    }

    @SideOnly(Side.CLIENT)
    public Vector3f vector3f()
    {
        return new Vector3f((float)x, (float)y, (float)z);
    }
View Full Code Here

        {
          if (planet.getParentSolarSystem() != null && planet.getBodyIcon() != null)
            {
            if (planet.getParentSolarSystem().getUnlocalizedName().equalsIgnoreCase(mainSolarSystem))
            {
              Vector3f pos = this.getCelestialBodyPosition(planet, ticks);
                    this.drawCircle(planet);
                this.drawCelestialBody(planet, pos.x, pos.y, ticks, (planet.getRelativeDistanceFromCenter().unScaledDistance < 1.5F) ? 2F : 2.8F);
            }
            }
        }
View Full Code Here

     
      for (Moon moon : GalaxyRegistry.getRegisteredMoons().values())
      {
        if (moon.getParentPlanet() == planet && moon.getBodyIcon() != null)
        {
              Vector3f pos = this.getCelestialBodyPosition(moon, ticks);
                this.drawCircle(moon);
          this.drawCelestialBody(moon, pos.x, pos.y, ticks, 4F);
        }
      }

      for (Satellite satellite : GalaxyRegistry.getRegisteredSatellites().values())
      {
        if (satellite.getParentPlanet() == planet)
        {
              Vector3f pos = this.getCelestialBodyPosition(satellite, ticks);
                this.drawCircle(satellite);
          this.drawCelestialBody(satellite, pos.x, pos.y, ticks, 3F);
        }
      }
    }
View Full Code Here

    private Vector3f getCelestialBodyPosition(CelestialBody cBody, float ticks)
    {
        float timeScale = cBody instanceof Planet ? 200.0F : 2.0F;
        float distanceFromCenter = this.getScale(cBody) * scale;
        return new Vector3f((float) Math.sin(ticks / (timeScale * cBody.getRelativeOrbitTime()) + cBody.getPhaseShift()) * distanceFromCenter, (float) Math.cos(ticks / (timeScale * cBody.getRelativeOrbitTime()) + cBody.getPhaseShift()) * distanceFromCenter, 0);
    }
View Full Code Here

        for (Planet planet : GalaxyRegistry.getRegisteredPlanets().values())
        {
          if (planet.getBodyIcon() != null)
            {
                Vector3f pos = this.getCelestialBodyPosition(planet, ticks);
            this.drawCelestialBody(planet, pos.x, pos.y, ticks, 2.8F);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.lwjgl.util.vector.Vector3f

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.