当前位置: 首页>>代码示例>>Java>>正文


Java Sphere.setOrientation方法代码示例

本文整理汇总了Java中org.lwjgl.util.glu.Sphere.setOrientation方法的典型用法代码示例。如果您正苦于以下问题:Java Sphere.setOrientation方法的具体用法?Java Sphere.setOrientation怎么用?Java Sphere.setOrientation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.lwjgl.util.glu.Sphere的用法示例。


在下文中一共展示了Sphere.setOrientation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.lwjgl.util.glu.Sphere; //导入方法依赖的package包/类
@Override
public void init(FMLInitializationEvent e) {
	super.init(e);
	{
		Sphere sphere = new Sphere();
		sphere.setDrawStyle(GLU.GLU_FILL);
		sphere.setNormals(GLU.GLU_SMOOTH);
		sphere.setOrientation(GLU.GLU_OUTSIDE);

		defierSphereIdOutside = GL11.glGenLists(1);
		GL11.glNewList(defierSphereIdOutside, GL11.GL_COMPILE);
		sphere.draw(0.5F, 30, 30);
		GL11.glEndList();

		sphere.setOrientation(GLU.GLU_INSIDE);
		defierSphereIdInside = GL11.glGenLists(1);
		GL11.glNewList(defierSphereIdInside, GL11.GL_COMPILE);
		sphere.draw(0.5F, 30, 30);
		GL11.glEndList();
	}
	ClientRegistry.bindTileEntitySpecialRenderer(DefierTileEntity.class, new DefierTESR());
	ClientRegistry.bindTileEntitySpecialRenderer(EnergyProviderTileEntity.class, new EnergyProviderTESR());
}
 
开发者ID:tiffit,项目名称:Defier,代码行数:24,代码来源:ClientProxy.java

示例2: drawCircle

import org.lwjgl.util.glu.Sphere; //导入方法依赖的package包/类
public  void drawCircle(ResourceLocation texture) {
	Sphere sphere = new Sphere();
	sphere.setDrawStyle(GLU.GLU_FILL);
	sphere.setNormals(GLU.GLU_SMOOTH);
	sphere.setOrientation(GLU.GLU_OUTSIDE);
	sphereId = GL11.glGenLists(1);
	GL11.glNewList(sphereId, GL11.GL_COMPILE);
	Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
	sphere.draw(0.5F, 32, 32);
	GL11.glEndList();
	sphere.setDrawStyle(GLU.GLU_FILL);		
	sphere.setNormals(GLU.GLU_SMOOTH);
	sphere.setOrientation(GLU.GLU_INSIDE);
	secondSphereId = GL11.glGenLists(2);
	GL11.glNewList(secondSphereId, GL11.GL_COMPILE);
	Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
	sphere.draw(0.49F, 32, 32);
	GL11.glEndList();	
}
 
开发者ID:Alex-the-666,项目名称:It-s-About-Time-Minecraft-Mod,代码行数:20,代码来源:ProxyClient.java

示例3: drawSphere

import org.lwjgl.util.glu.Sphere; //导入方法依赖的package包/类
public static void drawSphere(int facets)
    {
        Sphere s = new Sphere();            // an LWJGL class
        s.setOrientation(GLU.GLU_OUTSIDE);  // normals point outwards
        s.setTextureFlag(true);             // generate texture coords
//        GL11.glPushMatrix();
//        {
//	        GL11.glRotatef(-90f, 1,0,0);    // rotate the sphere to align the axis vertically
	        s.draw(1, facets, facets);              // run GL commands to draw sphere
//        }
//        GL11.glPopMatrix();
    }
 
开发者ID:TheWhiteShadow3,项目名称:cuina,代码行数:13,代码来源:GraphicUtil.java

示例4: registerRenderInformation

import org.lwjgl.util.glu.Sphere; //导入方法依赖的package包/类
@Override
public void registerRenderInformation() {

	Sphere sphere = new Sphere();
	// GLU_POINT will render it as dots.
	// GLU_LINE will render as wireframe
	// GLU_SILHOUETTE will render as ?shadowed? wireframe
	// GLU_FILL as a solid.
	sphere.setDrawStyle(GLU.GLU_FILL);
	// GLU_SMOOTH will try to smoothly apply lighting
	// GLU_FLAT will have a solid brightness per face, and will not shade.
	// GLU_NONE will be completely solid, and probably will have no depth to
	// it's appearance.
	sphere.setNormals(GLU.GLU_SMOOTH);
	// GLU_INSIDE will render as if you are inside the sphere, making it
	// appear inside out.(Similar to how ender portals are rendered)
	sphere.setOrientation(GLU.GLU_OUTSIDE);

	sphere.setTextureFlag(true);
	// Simple 1x1 red texture to serve as the spheres skin, the only pixel
	// in this image is red.
	// sphereID is returned from our sphereID() method
	sphereID = GL11.glGenLists(1);
	// Create a new list to hold our sphere data.
	GL11.glNewList(sphereID, GL11.GL_COMPILE);
	// Offset the sphere by it's radius so it will be centered
	GL11.glTranslatef(0.50F, 0.50F, 0.50F);

	sphere.draw(0.5F, 12, 24);
	// Drawing done, unbind our texture
	// Tell LWJGL that we are done creating our list.
	GL11.glEndList();
	
	
	
	Sphere sphereInside = new Sphere();
	sphereInside.setDrawStyle(GLU.GLU_FILL);
	sphereInside.setNormals(GLU.GLU_NONE);
	sphereInside.setOrientation(GLU.GLU_INSIDE);

	sphereInside.setTextureFlag(true);
	sphereID2 = GL11.glGenLists(1);
	GL11.glNewList(sphereID2, GL11.GL_COMPILE);
	GL11.glTranslatef(0.50F, 0.50F, 0.50F);

	sphereInside.draw(0.5F, 12, 24);
	GL11.glEndList();

}
 
开发者ID:ArtixAllMighty,项目名称:rpginventory,代码行数:50,代码来源:ClientProxy.java


注:本文中的org.lwjgl.util.glu.Sphere.setOrientation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。