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


Java GLU.gluQuadricNormals方法代码示例

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


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

示例1: 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

示例2: OConnorHangingLight

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public OConnorHangingLight(float x, float yCeiling, float z, float size, float length, 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 = yCeiling;
	this.z = z;
	this.length = length;
	this.size = size;
	this.colorChange = (int)(Math.random()*100);
	this.bobChange = (float)(Math.random()*100);
	this.r = (float)Math.random();
	this.g = (float)Math.random();
	this.b = (float)Math.random();
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:18,代码来源:OConnorHangingLight.java

示例3: 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

示例4: 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

示例5: 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

示例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: 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

示例8: 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

示例9: Fire

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public Fire(double x, double y, double z, double angle, 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

		// Load in Textures Below
		fire[0] = Building.setupTexture(gl, "DragonTextures/fire1.png");
		for(int i=1; i< 23; i++){
			fire[i] = Building.setupTexture(gl, "DragonTextures/fire" + (i+1) + ".png");
		}
		
		this.lx = x;
		this.ly = y;
		this.lz = z;
		
		fireAngle = (-1 * Math.random() * 70) - 10;
		eyeAngle = angle;
		
		dx = Math.cos(eyeAngle);
		dy = Math.sin(Math.toRadians(fireAngle));
		dz = Math.sin(eyeAngle);
		
		System.out.println("Eye Angle: " + eyeAngle);
	}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:28,代码来源:Fire.java

示例10: Robot

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public Robot(double startX,double startZ,GL2 gl, GLU glu){
	this.spawnLocation = new Location((float) startX,(float) 0,(float) startZ);
	this.robotLocationX = startX;
	this.robotLocationZ = startZ;
	eyeVectorX = 0.2;
	eyeVectorZ = 0.2;
	quadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(quadric,GLU.GLU_FILL);
       glu.gluQuadricNormals(quadric,GLU.GLU_NONE);
       glu.gluQuadricTexture(quadric,false);
	PlayerMotion.registerPlayerWatcher(this);
	Projectile.registerProjectileWatcher(this);
	robots.add(this);

	// create the two display lists
	if (displayListNotChasing == -1) {
           displayListNotChasing = gl.glGenLists(1);
           gl.glNewList(displayListNotChasing, GL2.GL_COMPILE);
           setupDraw(gl, glu);
           gl.glEndList();
	}
       
	if (displayListChasing == -1) {
           displayListChasing = gl.glGenLists(1);
           gl.glNewList(displayListChasing, GL2.GL_COMPILE);
               chasing = true;
               setupDraw(gl, glu);
               chasing = false;
           gl.glEndList();
	}
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:32,代码来源:Robot.java

示例11: BasicBat

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public BasicBat(GL2 gl, GLU glu, float x, float z) {
	
	//quadric set-up
	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
       
       scale = (float) 0.25;
       speed = 10;
	bodyRadius*=scale;
       lowerWingLength*=scale;
       upperWingLength*=scale;
       this.x = x;
       y = 6;
       this.z = z;
       T= Math.random()*5;
       direction=90;
       dead = false;
       dx = 0;
       dz = 0;
       
       //create display lists
       if (displayListWing1 == 4) {
       	displayListWing1 = gl.glGenLists(1);
       	gl.glNewList(displayListWing1, GL2.GL_COMPILE);
       	draw1(gl, glu);
       	gl.glEndList();
       }
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:31,代码来源:BasicBat.java

示例12: Land

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public Land(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);        // 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

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

示例13: MendolaBuilding

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public MendolaBuilding(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

    brownTexture     = setupTexture(gl, "mendolaBrown.jpg"); // png's don't seem to work any more
    greenTexture     = setupTexture(gl, "mendolaGreen.jpg"); 
    grayTexture     = setupTexture(gl, "mendolaGray.gif");
    metalTexture     = setupTexture(gl, "mendolaMetal.jpg");
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:12,代码来源:MendolaBuilding.java

示例14: VentarolaBuilding

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public VentarolaBuilding(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
    ventarolaWood = setupTexture(gl, "wood032.gif");
    ventarolaGrass = setupTexture(gl, "dgren050.gif");
    ventarolaRock = setupTexture(gl, "drock084.jpg");
    ventarolaBrick = setupTexture(gl, "brick039.jpg");
    ventarolaWallPaper = setupTexture(gl, "paper005.gif");
    ventarolaMarble = setupTexture(gl, "marb076.jpg");
    ventarolaPollock = setupTexture(gl, "pollock.jpg");
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:14,代码来源:VentarolaBuilding.java

示例15: GoodeBuilding

import javax.media.opengl.glu.GLU; //导入方法依赖的package包/类
public GoodeBuilding(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);
    roofTexture1 = setupTexture(gl, "Goodeend_portal.png");
    wallTexture = setupTexture(gl, "Goodebrick.png");
    tntTexture = setupTexture(gl, "Goodetnt_bottom.png");
    pumpkinTexture = setupTexture( gl, "Goodepumpkin_face_on.png");
    diamondTexture = setupTexture(gl, "Goodediamond.png");
    beaconTexture = setupTexture(gl, "Goodebeacon.png");
    
    // false, or true to generate texture coordinates
}
 
开发者ID:ProfAmesBC,项目名称:Game2013,代码行数:15,代码来源:GoodeBuilding.java


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