Beispiel #1
0
  public void drawQuadWireFrame(Coords p1, Coords p2, Coords p3, Coords p4) {

    // lines
    manager.startGeometry(Manager.Type.LINE_LOOP);

    manager.setDummyTexture();

    manager.color(0f, 0f, 0f, 1f);

    manager.vertex(p1);
    manager.vertex(p2);
    manager.vertex(p3);
    manager.vertex(p4);
    manager.endGeometry();

    // surface
    manager.startGeometry(Manager.Type.TRIANGLE_STRIP);

    manager.setDummyTexture();

    manager.color(1f, 0f, 0f, 0.5f);

    manager.vertex(p1);
    manager.vertex(p2);
    manager.vertex(p4);
    manager.vertex(p3);
    manager.endGeometry();
  }
Beispiel #2
0
  public void drawQuadNoTexture(Coords p1, Coords p2, Coords p3, Coords p4) {

    manager.startGeometry(Manager.Type.TRIANGLE_STRIP);

    manager.setDummyTexture();

    manager.vertex(p1);
    manager.vertex(p2);
    manager.vertex(p4);
    manager.vertex(p3);
    manager.endGeometry();
  }
Beispiel #3
0
  public void drawTriangle(Coords p1, Coords p2, Coords p3) {
    manager.startGeometry(Manager.Type.TRIANGLE_STRIP);

    float uT = getTextureCoord(1, uNb, uMinFadeNb, uMaxFadeNb);
    float vT = getTextureCoord(1, vNb, vMinFadeNb, vMaxFadeNb);
    manager.texture(uT, vT);

    manager.vertex(p1);
    manager.vertex(p3);
    manager.vertex(p2);
    manager.endGeometry();
  }
  /** draws a section point */
  private void draw(PlotterBrushSection s, double u, double v, int texture) {

    GgbVector[] vectors = s.getNormalAndPosition(u, v);

    // Application.debug(vectors[0].toString());

    /*
    manager.normal(
    		(float) vectors[0].getX(),
    		(float) vectors[0].getY(),
    		(float) vectors[0].getZ());	*/
    manager.normal(vectors[0]);
    manager.texture(
        getTexture(textureX[texture], textureTypeX), getTexture(textureY[texture], textureTypeY));
    manager.vertex(vectors[1]);
    /*
    manager.vertex(
    		(float) vectors[1].getX(),
    		(float) vectors[1].getY(),
    		(float) vectors[1].getZ());
    		*/

  }