当前位置: 首页>>代码示例>>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;未经允许,请勿转载。