org.lwjgl.util.glu.Sphere Java Examples
The following examples show how to use
org.lwjgl.util.glu.Sphere.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientProxy.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
@Override public void init() { Sphere sphere = new Sphere(); sphere.setDrawStyle(GLU.GLU_FILL); sphere.setNormals(GLU.GLU_SMOOTH); sphere.setOrientation(GLU.GLU_OUTSIDE); sphereOutId = GlStateManager.glGenLists(1); GlStateManager.glNewList(sphereOutId, GL11.GL_COMPILE); sphere.draw(0.5F, 32, 32); GlStateManager.glEndList(); sphere.setOrientation(GLU.GLU_INSIDE); sphereInId = GlStateManager.glGenLists(1); GlStateManager.glNewList(sphereInId, GL11.GL_COMPILE); sphere.draw(0.5F, 32, 32); sphere.draw(0.5F, 32, 32); }
Example #2
Source File: SimpleLwJglRenderingEngine.java From Gaalop with GNU Lesser General Public License v3.0 | 5 votes |
private void paintPointCloud(PointCloud pointCloud) { Sphere s = new Sphere(); //Use the color GL11.glColor4d(pointCloud.color.getRed()/255.0d, pointCloud.color.getGreen()/255.0d, pointCloud.color.getBlue()/255.0d, pointCloud.color.getAlpha()/255.0d); for (Point3d p: pointCloud.points) { GL11.glPushMatrix(); GL11.glTranslated(p.x,p.y,p.z); s.draw(0.04f, 3, 3); GL11.glPopMatrix(); } }