Exemplo n.º 1
0
  /**
   * Renders this AABB.
   *
   * <p>
   *
   * @param lineThickness The thickness of the line
   */
  public void render(float lineThickness) {
    CoreRegistry.get(ShaderManager.class).enableDefault();

    glPushMatrix();
    Vector3f cameraPosition = CoreRegistry.get(WorldRenderer.class).getActiveCamera().getPosition();
    glTranslated(
        aabb.getCenter().x - cameraPosition.x,
        -cameraPosition.y,
        aabb.getCenter().z - cameraPosition.z);

    renderLocally(lineThickness);

    glPopMatrix();
  }
Exemplo n.º 2
0
  public void renderLocally(float lineThickness) {
    CoreRegistry.get(ShaderManager.class).enableDefault();

    if (displayListWire == -1) {
      generateDisplayListWire();
    }

    glPushMatrix();
    glTranslated(0f, aabb.getCenter().y, 0f);

    glLineWidth(lineThickness);
    glCallList(displayListWire);

    glPopMatrix();
  }
Exemplo n.º 3
0
  public void renderSolidLocally() {
    CoreRegistry.get(ShaderManager.class).enableDefault();

    if (displayListSolid == -1) {
      generateDisplayListSolid();
    }
    glEnable(GL_BLEND);
    glPushMatrix();

    glTranslated(0f, aabb.getCenter().y, 0f);
    glScalef(1.5f, 1.5f, 1.5f);

    glCallList(displayListSolid);

    glPopMatrix();
    glDisable(GL_BLEND);
  }