當前位置: 首頁>>代碼示例>>Java>>正文


Java GLU.gluQuadricDrawStyle方法代碼示例

本文整理匯總了Java中javax.media.opengl.glu.GLU.gluQuadricDrawStyle方法的典型用法代碼示例。如果您正苦於以下問題:Java GLU.gluQuadricDrawStyle方法的具體用法?Java GLU.gluQuadricDrawStyle怎麽用?Java GLU.gluQuadricDrawStyle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.media.opengl.glu.GLU的用法示例。


在下文中一共展示了GLU.gluQuadricDrawStyle方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

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

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

示例3: Critter

import javax.media.opengl.glu.GLU; //導入方法依賴的package包/類
protected Critter(float x,float y,float z,float a,float s,float tR, GL2 gl, GLU glu){
	this.x=x;this.y=y;this.z=z;
	a=a%360;
	if(a<0)a+=360;
	tAngle=angle=a;
	speed=s;tRate=tR;
	
	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
       
       quadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL);
       glu.gluQuadricNormals  (quadric, GLU.GLU_NONE);
       glu.gluQuadricTexture  (quadric, false);
       
       Projectile.registerWeaponWatcher(this);
}
 
開發者ID:ProfAmesBC,項目名稱:Game2013,代碼行數:20,代碼來源:Critter.java

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

示例5: XiangBuilding

import javax.media.opengl.glu.GLU; //導入方法依賴的package包/類
public XiangBuilding(GL2 gl, GLU glu) {
 super();
    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
    
    brickTexture = setupTexture(gl, "XiangBricks.jpg");
    groundfloorTexture = setupTexture(gl, "XiangFloor.jpg");
    triangleTexture     = setupTexture(gl, "XiangRoof.jpg"); 
    homefloorTexture = setupTexture(gl,"XiangHomeFloor.jpg");
    lampTexture = setupTexture(gl,"XiangLamp.jpg");
    ballTexture = setupTexture(gl, "XiangBall.jpg");
    basketballTexture = setupTexture(gl, "XiangBasketball.jpg");
    insideWallTexture = setupTexture(gl, "XiangWall.jpg");
    // png's don't seem to work any more
}
 
開發者ID:ProfAmesBC,項目名稱:Game2013,代碼行數:23,代碼來源:XiangBuilding.java

示例6: MeuseBuilding

import javax.media.opengl.glu.GLU; //導入方法依賴的package包/類
public MeuseBuilding(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.gluQuadricNormals  (textureQuadric, GLU.GLU_NONE);
    glu.gluQuadricTexture  (textureQuadric, true); // for textured quadrics

    wallTexture = setupTexture(gl, "MeuseWall.jpg");
    sidingTexture = setupTexture(gl, "MeuseSiding.jpg"); // png's don't seem to work any more
    grassTexture=setupTexture(gl, "MeuseGrass.jpg");
    floorTexture=setupTexture(gl, "MeuseFloor.gif");
    posterTexture=setupTexture(gl, "MeusePoster.jpg");
    tableTexture=setupTexture(gl, "MeuseTable.gif");
}
 
開發者ID:ProfAmesBC,項目名稱:Game2013,代碼行數:19,代碼來源:MeuseBuilding.java

示例7: MatherBuilding

import javax.media.opengl.glu.GLU; //導入方法依賴的package包/類
public  MatherBuilding(GL2 gl, GLU glu) {
       quadric = glu.gluNewQuadric();
       quadricText = 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
       
       glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); 
       glu.gluQuadricNormals  (quadric, GLU.GLU_NONE);
       glu.gluQuadricTexture (quadricText, true);

       wood = setupTexture(gl, "matherwood140.jpg");
       grass = setupTexture(gl, "mathergrass.jpg");
       wall = setupTexture(gl, "matherwood115.jpg");
       carpet = setupTexture(gl, "mathercloth102.jpg");
       brick = setupTexture(gl, "matherbrick001.jpg");
       roof = setupTexture(gl, "mathermetal003.gif");
       shrub = setupTexture(gl, "matherbush.gif");
       tree = setupTexture(gl, "mathertree.jpg");
}
 
開發者ID:ProfAmesBC,項目名稱:Game2013,代碼行數:21,代碼來源:MatherBuilding.java

示例8: VallejoBuilding

import javax.media.opengl.glu.GLU; //導入方法依賴的package包/類
public VallejoBuilding(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
   
       ballTexture = setupTexture(gl, "Vallejoball.jpg");
       grassTexture = setupTexture(gl, "Vallejorock.gif");
       brickTexture = setupTexture(gl, "Vallejobrick041.jpg");
       insideWall = setupTexture(gl, "Vallejobeige005.jpg");
       floorTexture = setupTexture(gl, "Vallejofield.jpg");
       ceilingTexture = setupTexture(gl, "Vallejobeige015.jpg");
       goalTexture = setupTexture(gl, "Vallejogoal.gif");
       doorTexture = setupTexture(gl, "Vallejodoor.jpg");
       ceilingTexture = setupTexture(gl, "Vallejoroof.jpg");
}
 
開發者ID:ProfAmesBC,項目名稱:Game2013,代碼行數:17,代碼來源:VallejoBuilding.java

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

示例10: ParkBuilding

import javax.media.opengl.glu.GLU; //導入方法依賴的package包/類
public ParkBuilding(GL2 gl, GLU glu) {
	ParkWoodWall = setupTexture(gl, "ParkOutsideWall.jpg");
	ParkGrass = setupTexture(gl, "ParkGrass.jpg");
	ParkInsideWall = setupTexture(gl, "ParkInsideWall.jpg");
	ParkRoofOutside = setupTexture(gl, "ParkRoof.jpg");
	ParkBuildingFloor = setupTexture(gl,"ParkHardWoodFloor.jpg");
	ParkBasketballTexture = setupTexture(gl, "ParkBasketballTexture.jpg");
	ParkBasketballNet = setupTexture(gl, "ParkBasketballNet.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
       netQuadric = glu.gluNewQuadric();
       glu.gluQuadricDrawStyle(netQuadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
       glu.gluQuadricNormals  (netQuadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
       glu.gluQuadricTexture  (netQuadric, true);        // false, or true to generate texture coordinates
}
 
開發者ID:ProfAmesBC,項目名稱:Game2013,代碼行數:18,代碼來源:ParkBuilding.java

示例11: LiptonBuilding

import javax.media.opengl.glu.GLU; //導入方法依賴的package包/類
public LiptonBuilding(GL2 gl, GLU glu) {
	wallTexture = setupTexture(gl, "LiptonWall.gif");
       brickTexture = setupTexture(gl, "LiptonBrick.jpg"); 
       floorTexture = setupTexture(gl, "LiptonFloor.jpg"); 
	grassTexture = setupTexture(gl, "LiptonGrass.jpg");
	brick2Texture = setupTexture(gl, "LiptonBrickBack.jpg"); 
	doorTexture = setupTexture(gl, "LiptonTable.gif"); 
	waterTexture = setupTexture(gl, "LiptonWater.gif"); 
	bridgeTexture = setupTexture(gl, "LiptonBridge.jpg"); 
	
	furniture = new LiptonFurniture(gl, 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
}
 
開發者ID:ProfAmesBC,項目名稱:Game2013,代碼行數:18,代碼來源:LiptonBuilding.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: 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

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

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


注:本文中的javax.media.opengl.glu.GLU.gluQuadricDrawStyle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。