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


Java GLUES類代碼示例

本文整理匯總了Java中com.panoramagl.opengl.GLUES的典型用法代碼示例。如果您正苦於以下問題:Java GLUES類的具體用法?Java GLUES怎麽用?Java GLUES使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: internalRender

import com.panoramagl.opengl.GLUES; //導入依賴的package包/類
/**render methods*/

@Override
public void internalRender(GL10 gl, PLIRenderer renderer)
{
	PLITexture previewTexture = this.getPreviewTextures()[0], texture = this.getTextures()[0];
    
	boolean textureIsValid = (texture != null && texture.getTextureId(gl) != 0);
    
    if(textureIsValid || (previewTexture != null && previewTexture.getTextureId(gl) != 0))
    {
    	gl.glEnable(GL10.GL_TEXTURE_2D);
    	
    	int divs;
    	
	    if(textureIsValid)
	    {
	    	divs = this.getDivs();
	        gl.glBindTexture(GL10.GL_TEXTURE_2D, texture.getTextureId(gl));
	        if(previewTexture != null)
	            this.removePreviewTextureAtIndex(0, true);
	    }
	    else
	    {
	    	divs = this.getPreviewDivs();
	    	gl.glBindTexture(GL10.GL_TEXTURE_2D, previewTexture.getTextureId(gl));
	    }
	    
	    GLUES.gluSphere(gl, this.getQuadric(), PLConstants.kPanoramaRadius, divs, divs);
		
	    gl.glDisable(GL10.GL_TEXTURE_2D);
    }
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:34,代碼來源:PLSphericalPanorama.java

示例2: initializeValues

import com.panoramagl.opengl.GLUES; //導入依賴的package包/類
/**init methods*/

@Override
protected void initializeValues()
{
    super.initializeValues();
    mQuadric = GLUES.gluNewQuadric();
	GLUES.gluQuadricNormals(mQuadric, GLUES.GLU_SMOOTH);
	GLUES.gluQuadricTexture(mQuadric, true);
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:11,代碼來源:PLQuadricPanoramaBase.java

示例3: finalize

import com.panoramagl.opengl.GLUES; //導入依賴的package包/類
/**dealloc methods*/

@Override
protected void finalize() throws Throwable
{
	if(mQuadric != null)
	{
		GLUES.gluDeleteQuadric(mQuadric);
		mQuadric = null;
	}
	super.finalize();
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:13,代碼來源:PLQuadricPanoramaBase.java

示例4: internalRender

import com.panoramagl.opengl.GLUES; //導入依賴的package包/類
/**render methods*/

@Override
protected void internalRender(GL10 gl, PLIRenderer renderer)
{
	PLITexture previewTexture = this.getPreviewTextures()[0], texture = this.getTextures()[0];
	
    boolean textureIsValid = (texture != null && texture.getTextureId(gl) != 0);
    
    if(textureIsValid || (previewTexture != null && previewTexture.getTextureId(gl) != 0))
    {
    	gl.glEnable(GL10.GL_TEXTURE_2D);
    	
    	int divs;
 		
 		if(textureIsValid)
 	    {
 	    	divs = this.getDivs();
 	        gl.glBindTexture(GL10.GL_TEXTURE_2D, texture.getTextureId(gl));
 	        if(previewTexture != null)
	            this.removePreviewTextureAtIndex(0, true);
 	    }
 		else
 	    {
 	    	divs = this.getPreviewDivs();
 	        gl.glBindTexture(GL10.GL_TEXTURE_2D, previewTexture.getTextureId(gl));
 	    }
 		
 	    gl.glTranslatef(0.0f, 0.0f, -mHalfHeight);
 		
 	    GLUES.gluCylinder(gl, this.getQuadric(), PLConstants.kPanoramaRadius, PLConstants.kPanoramaRadius, mHeight, divs, divs);
 		
 	    gl.glTranslatef(0.0f, 0.0f, mHalfHeight);
 		
 	    gl.glDisable(GL10.GL_TEXTURE_2D);
    }
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:38,代碼來源:PLCylindricalPanorama.java

示例5: internalRender

import com.panoramagl.opengl.GLUES; //導入依賴的package包/類
/**render methods*/

@Override
protected void internalRender(GL10 gl, PLIRenderer renderer)
{
	PLITexture previewTexture = this.getPreviewTextures()[0];
	PLITexture[] textures = this.getTextures();
	PLITexture frontTexture = textures[PLSpherical2FaceOrientation.PLSpherical2FaceOrientationFront.ordinal()];
	PLITexture backTexture = textures[PLSpherical2FaceOrientation.PLSpherical2FaceOrientationBack.ordinal()];
	PLITexture leftTexture = textures[PLSpherical2FaceOrientation.PLSpherical2FaceOrientationLeft.ordinal()];
	PLITexture rightTexture = textures[PLSpherical2FaceOrientation.PLSpherical2FaceOrientationRight.ordinal()];
	
    boolean frontTextureIsValid = (frontTexture != null && frontTexture.getTextureId(gl) != 0);
    boolean backTextureIsValid = (backTexture != null && backTexture.getTextureId(gl) != 0);
    boolean leftTextureIsValid = (leftTexture != null && leftTexture.getTextureId(gl) != 0);
    boolean rightTextureIsValid = (rightTexture != null && rightTexture.getTextureId(gl) != 0);
    
    if(frontTextureIsValid || backTextureIsValid || leftTextureIsValid || rightTextureIsValid || (previewTexture != null && previewTexture.getTextureId(gl) != 0))
    {
    	gl.glEnable(GL10.GL_TEXTURE_2D);
    	
    	GLUquadric quadratic = this.getQuadric();
	    float radius = PLConstants.kPanoramaRadius;
	    int halfDivs = this.getDivs() / 2, quarterDivs = halfDivs / 2;
	    
	    if(previewTexture != null)
	    {
	        if(frontTextureIsValid && backTextureIsValid && leftTextureIsValid && rightTextureIsValid)
	            this.removePreviewTextureAtIndex(0, true);
	        else
	        {
	        	int previewDivs = this.getPreviewDivs();
	            gl.glBindTexture(GL10.GL_TEXTURE_2D, previewTexture.getTextureId(gl));
	            GLUES.gluSphere(gl, quadratic, radius, previewDivs, previewDivs);
	        }
	    }
	    
	    // Front Face
	    if(frontTextureIsValid)
	    {
	        gl.glBindTexture(GL10.GL_TEXTURE_2D, frontTexture.getTextureId(gl));
	        GLUES.glu3DArc(gl, quadratic, PLConstants.kPI8, -PLConstants.kPI16, false, radius, quarterDivs, quarterDivs);
	    }
	    
	    // Back Face
	    if(backTextureIsValid)
	    {
	        gl.glBindTexture(GL10.GL_TEXTURE_2D, backTexture.getTextureId(gl));
	        GLUES.glu3DArc(gl, quadratic, PLConstants.kPI8, -PLConstants.kPI16, true, radius, quarterDivs, quarterDivs);
	    }
	    
	    // Left Face
	    if(leftTextureIsValid)
	    {
	        gl.glBindTexture(GL10.GL_TEXTURE_2D, leftTexture.getTextureId(gl));
	        GLUES.gluHemisphere(gl, quadratic, false, radius, halfDivs, halfDivs);
	    }
	    
	    //Right Face
	    if(rightTextureIsValid)
	    {
	        gl.glBindTexture(GL10.GL_TEXTURE_2D, rightTexture.getTextureId(gl));
	        GLUES.gluHemisphere(gl, quadratic, true, radius, halfDivs, halfDivs);
	    }
	    
		gl.glDisable(GL10.GL_TEXTURE_2D);
    }
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:69,代碼來源:PLSpherical2Panorama.java


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