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


Java GLU.gluQuadricTexture方法代码示例

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


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

示例1: gegGLCalList

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
protected void gegGLCalList(){
    GLU glu = new GLU();
    GLUquadric sQuad= glu.gluNewQuadric();
    callist = gl.glGenLists(1);
    gl.glNewList(callist, gl.GL_COMPILE);
    texture.enable(gl);
    texture.bind(gl);
    glu.gluQuadricTexture(sQuad, true);
    glu.gluQuadricOrientation(sQuad, glu.GLU_INSIDE);
    glu.gluSphere(sQuad, radius, 36, 72);
    gl.glEndList();
}
 
开发者ID:seemywingz,项目名称:Kengine,代码行数:13,代码来源:SkyDome.java

示例2: CheungBuilding

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public CheungBuilding(GL2 gl, GLU glu){
	quadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
       glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
       glu.gluQuadricTexture  (quadric, false);        // use true to generate texture coordinates
       
       textureQuadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(textureQuadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
       glu.gluQuadricNormals  (textureQuadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
       glu.gluQuadricTexture  (textureQuadric, true);        // use true to generate texture coordinates
       
       innerTexture = setupTexture(gl, "cheungrings.jpg");
       outerTexture = setupTexture(gl, "cheungbricks.jpg"); // png's don't seem to work any more
       ceilingTexture=setupTexture(gl, "cheungceiling.gif");
       waterTexture=setupTexture(gl, "cheungwater.gif");
       sandTexture=setupTexture(gl, "cheungsand.jpg");
       ballBaseTexture=setupTexture(gl,"cheungballbase.jpg");
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:19,代码来源:CheungBuilding.java

示例3: PictureFrame

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public PictureFrame(GL2 gl, GLU glu, Point3d s) {
    quadric = glu.gluNewQuadric();
    glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
    glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
    glu.gluQuadricTexture  (quadric, false);        // use true to generate texture coordinates

    sphereQuadric = glu.gluNewQuadric();
    glu.gluQuadricDrawStyle(sphereQuadric, GLU.GLU_FILL);
    glu.gluQuadricNormals  (sphereQuadric, GLU.GLU_NONE);
    glu.gluQuadricTexture  (sphereQuadric, true); // for Signorile's head

    photoTexture     = Building.setupTexture(gl, "texturepicture.gif"); 

    frameHeight = 8;
    frameWidth = 11;
    start = new Point3d(s.getX(),s.getY(),s.getZ());
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:18,代码来源:PictureFrame.java

示例4: draw

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public void draw(GL2 gl, GLU glu){
		// quadric to draw cylindrical pedestal
		quadric = glu.gluNewQuadric();
        glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
        glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
        glu.gluQuadricTexture  (quadric, false); 
		
        gl.glPushMatrix();
//        	gl.glRotatef(-90, 1, 0, 0);
        	gl.glTranslatef(x, 0.1f, z);
        	gl.glRotatef(-90, 1, 0, 0);
        	gl.glColor3f(1, 0, 0);
        	glu.gluDisk(quadric, 3, 0, 10, 10);
        gl.glPopMatrix();
        
		gl.glPushMatrix();
			gl.glTranslatef(x, 5, z);
			gl.glRotatef(theta, 0, 1, 0);
//			System.out.println("okokok");
			w.draw(gl, glu);
		gl.glPopMatrix();
		
		theta += 2;
	}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:25,代码来源:DisplayedWeapon.java

示例5: LundbergBuilding

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public LundbergBuilding(GL2 gl, GLU glu) {
    	/*
        sphereQuadric = glu.gluNewQuadric();
        glu.gluQuadricDrawStyle(sphereQuadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
        glu.gluQuadricNormals  (sphereQuadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
        glu.gluQuadricTexture  (sphereQuadric, false);        // use true to generate texture coordinates
*/
        quadric2 = glu.gluNewQuadric();
        glu.gluQuadricDrawStyle(quadric2, GLU.GLU_FILL);
        glu.gluQuadricNormals  (quadric2, GLU.GLU_NONE);
        glu.gluQuadricTexture  (quadric2, false); // for table legs

        grassTexture = setupTexture(gl,"FallGrass.jpg");
        woodTexture = setupTexture(gl,"WornWood.jpg");
        //smallBrickTexture=setupTexture(gl,"SmallBrick.jpg");
        blueBrickTexture=setupTexture(gl,"BlueBrick.jpg");
        beigeBrickTexture=setupTexture(gl,"BeigeBrick.jpg");
        window=setupTexture(gl,"window.jpg");
        fireplace=setupTexture(gl,"fireplace.jpg");
        fishes=setupTexture(gl,"aquariumTank.jpg");
    }
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:22,代码来源:LundbergBuilding.java

示例6: LiangBuilding

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public LiangBuilding(GL2 gl, GLU glu){
	
	quadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
       glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
       glu.gluQuadricTexture  (quadric, false);        // false, or true to generate texture coordinates
	
       sphereQuadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(sphereQuadric, GLU.GLU_FILL);
       glu.gluQuadricNormals  (sphereQuadric, GLU.GLU_NONE); 
       glu.gluQuadricTexture  (sphereQuadric, true);        
       
       
       worldTexture = setupTexture(gl, "liangworld.jpg");
	brickTexture = setupTexture(gl, "liangbrick.jpg");
	insideTexture = setupTexture(gl,"liangwood.jpg");
	floorTexture = setupTexture(gl,"liangfloor.jpg");
	grassTexture = setupTexture(gl,"lianggrass.jpg");
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:20,代码来源:LiangBuilding.java

示例7: LiptonFurniture

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public LiptonFurniture(GL2 gl, GLU glu){
	carpetTexture = setupTexture(gl, "LiptonCarpet.jpg");
	tableTexture = setupTexture(gl, "LiptonTable.gif");
	hatTexture = setupTexture(gl, "LiptonPink.jpg");
	paintingTexture = setupTexture(gl, "LiptonPaint1.jpg");
	painting2Texture = setupTexture(gl, "LiptonPaint2.jpg");
	painting3Texture = setupTexture(gl, "LiptonPaint3.jpg");
	painting4Texture = setupTexture(gl, "LiptonPaint4.jpg");
	chessTexture = setupTexture(gl, "LiptonChess.jpg");
	bookTexture = setupTexture(gl, "LiptonBooks.jpg");
	
	quadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
       glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
       glu.gluQuadricTexture  (quadric, true);        // false, or true to generate texture coordinates
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:17,代码来源:LiptonFurniture.java

示例8: MidgleyBuilding

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public MidgleyBuilding(GL2 gl, GLU glu){

	    	   grass = setupTexture(gl, "MidgleyGrass.jpg");
	    	   paneling = setupTexture(gl, "MidgleyPanelWood.jpg");
	           wallpaper  = setupTexture(gl, "MidgleyWallpaper.jpg"); // if this causes trouble, try bricks.gif
	           bricks = setupTexture(gl, "MidgleyBricks.jpg");
	           carpet  = setupTexture(gl, "MidgleyCarpet.jpg"); // if this causes trouble, try bricks.gif
	           shingles = setupTexture(gl, "MidgleyShingles2.jpg");
	           chestwood  = setupTexture(gl, "MidgleyChestWood.gif"); // if this causes trouble, try bricks.gif
	           chestwoodTop  = setupTexture(gl, "MidgleyChestWoodTop.gif"); // if this causes trouble, try bricks.gif
	           marble = setupTexture(gl, "MidgleyMantleMarble.gif");
	           //cross  = setupTexture(gl, "MidgleyCross.gif"); // if this causes trouble, try bricks.gif
	           
	           quadric = glu.gluNewQuadric();
	           glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
	           glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
	           glu.gluQuadricTexture  (quadric, true);        // true to generate texture coordinates

	       }
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:20,代码来源:MidgleyBuilding.java

示例9: OConnorFloatingLight

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public OConnorFloatingLight(float x, float y, float z, float size, float speed, float radX, float radY, float radZ, GL2 gl, GLU glu) {
	GLUquadric quadric = glu.gluNewQuadric();
	glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL);
	glu.gluQuadricNormals(quadric, GLU.GLU_FLAT);
	glu.gluQuadricTexture  (quadric, false);
	this.quadric = quadric;
	this.x = x;
	this.y = y;
	this.z = z;
	this.size = size;
	this.flightRadiusX = radX;
	this.flightRadiusY = radY;
	this.flightRadiusZ = radZ;
	this.speed = speed;
	this.colorChange = (int)(Math.random()*100);
	this.posChange = (float)(Math.random()*100);
	this.r = (float)Math.random();
	this.g = (float)Math.random();
	this.b = (float)Math.random();
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:21,代码来源:OConnorFloatingLight.java

示例10: DintinoHouse

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public DintinoHouse(GL2 gl, GLU glu) {
	brickTexture = setupTexture(gl, "DintinoBricks.gif"); // png's don't seem to work any more
	woodTexture = setupTexture(gl, "DintinoWood.jpg");
	floorTexture = setupTexture(gl, "DintinoCloth.jpg");
	soccerTexture = setupTexture(gl, "DintinoSoccer.jpg");
	starTexture = setupTexture(gl, "DintinoStar.gif");
	quadric = glu.gluNewQuadric();
	glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
	glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
	glu.gluQuadricTexture  (quadric, false);        // use true to generate texture coordinates

	sphereQuadric = glu.gluNewQuadric();
	glu.gluQuadricDrawStyle(sphereQuadric, GLU.GLU_FILL);
	glu.gluQuadricNormals  (sphereQuadric, GLU.GLU_NONE);
	glu.gluQuadricTexture  (sphereQuadric, true); // for Signorile's head
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:17,代码来源:DintinoHouse.java

示例11: mkGLCallList

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
protected int mkGLCallList(){
    GLU glu = new GLU();
    int callList;

    GLUquadric quad = glu.gluNewQuadric();
    // material properties
    float[] no_mat = {0.0f, 0.0f, 0.0f, 1.0f};
    float[] mat_ambient = {1f, 1f, 1f, 1.0f};
    float[] mat_diffuse = {1, 1, 1, 1.0f};
    float[] mat_specular = {1.0f, 1.0f, 1.0f, 1.0f};
    float no_shininess = 0.0f;
    float low_shininess = 5.0f;
    float high_shininess = 100.0f;
    float[] mat_emission = {0.3f, 0.2f, 0.2f, 0.0f};

    callList = gl.glGenLists(1);
    gl.glNewList(callList, gl.GL_COMPILE);
    gl.glMaterialfv(gl.GL_FRONT, gl.GL_AMBIENT, Utils.mkFloatBuffer(no_mat));
    gl.glMaterialfv(gl.GL_FRONT, gl.GL_DIFFUSE, Utils.mkFloatBuffer(mat_diffuse));
    gl.glMaterialfv(gl.GL_FRONT, gl.GL_SPECULAR, Utils.mkFloatBuffer(mat_specular));
    gl.glMaterialf(gl.GL_FRONT, gl.GL_SHININESS, high_shininess);
    gl.glMaterialfv(gl.GL_FRONT, gl.GL_EMISSION, Utils.mkFloatBuffer(no_mat));
    glu.gluQuadricTexture(quad, true);
    glu.gluQuadricOrientation(quad, glu.GLU_OUTSIDE);
    texture.enable(gl);
    texture.bind(gl);
    glu.gluSphere(quad, 1, 36, 72);
    texture.disable(gl);
    gl.glEndList();
    return callList;
}
 
开发者ID:seemywingz,项目名称:Kengine,代码行数:32,代码来源:Ball.java

示例12: drawSphere

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public static void drawSphere(GL2 gl2, double radius, boolean texture) {
	GLU glu = new GLU();
    GLUquadric quadric = glu.gluNewQuadric();
    glu.gluQuadricTexture(quadric, texture);
    if (texture == false) {
    	glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL);
    }
    glu.gluQuadricNormals(quadric, GLU.GLU_FLAT);
    glu.gluQuadricOrientation(quadric, GLU.GLU_OUTSIDE);
    glu.gluSphere(quadric, radius, 64, 64);
    glu.gluDeleteQuadric(quadric);
}
 
开发者ID:momega,项目名称:spacesimulator,代码行数:13,代码来源:GLUtils.java

示例13: Bats

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public Bats(GL2 gl, GLU glu)
{
	quadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
       glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
       glu.gluQuadricTexture  (quadric, true);        // false, or true to generate texture coordinates
       
       batTexture = Building.setupTexture(gl, "GoodeBat.jpg");
       batEyeTexture = Building.setupTexture(gl,"GoodeRadarBat.jpg");
      
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:12,代码来源:Bats.java

示例14: Chair

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public Chair(GL2 gl, GLU glu, Point3d placement) {
    quadric = glu.gluNewQuadric();
    glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
    glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
    glu.gluQuadricTexture  (quadric, false);        // use true to generate texture coordinates

    sphereQuadric = glu.gluNewQuadric();
    glu.gluQuadricDrawStyle(sphereQuadric, GLU.GLU_FILL);
    glu.gluQuadricNormals  (sphereQuadric, GLU.GLU_NONE);
    glu.gluQuadricTexture  (sphereQuadric, true); // for Signorile's head

    chairTexture     = Building.setupTexture(gl, "texturechair.gif"); // png's don't seem to work any more
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:14,代码来源:Chair.java

示例15: Bat

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public Bat(GL2 gl, GLU glu) {
	 quadric = glu.gluNewQuadric();
	 glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
     glu.gluQuadricNormals  (quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
     glu.gluQuadricTexture  (quadric, true);        // true to generate texture coordinates
     x = 50;
     y = 6;
     z = 50;
     angle = 0;
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:11,代码来源:Bat.java


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