/** * 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(); }
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(); }
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); }