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


Java Cube类代码示例

本文整理汇总了Java中rajawali.primitives.Cube的典型用法代码示例。如果您正苦于以下问题:Java Cube类的具体用法?Java Cube怎么用?Java Cube使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setSkybox

import rajawali.primitives.Cube; //导入依赖的package包/类
protected void setSkybox(int front, int right, int back, int left, int up, int down) {
    mCamera.setFarPlane(1000);
    mSkybox = new Cube(700, true);

    Bitmap[] textures = new Bitmap[6];
    textures[0] = BitmapFactory.decodeResource(mContext.getResources(), left);
    textures[1] = BitmapFactory.decodeResource(mContext.getResources(), right);
    textures[2] = BitmapFactory.decodeResource(mContext.getResources(), up);
    textures[3] = BitmapFactory.decodeResource(mContext.getResources(), down);
    textures[4] = BitmapFactory.decodeResource(mContext.getResources(), front);
    textures[5] = BitmapFactory.decodeResource(mContext.getResources(), back);

    mSkyboxTextureInfo = mTextureManager.addCubemapTextures(textures);
    SkyboxMaterial mat = new SkyboxMaterial();
    mat.addTexture(mSkyboxTextureInfo);
    mSkybox.setMaterial(mat);
}
 
开发者ID:BitMastro,项目名称:PortalLW,代码行数:18,代码来源:RajawaliRenderer.java

示例2: setSkybox

import rajawali.primitives.Cube; //导入依赖的package包/类
/**
 * Creates a skybox with the specified single texture.
 * 
 * @param resourceId int Resouce id of the skybox texture.
 * @throws TextureException 
 */
public void setSkybox(int resourceId) throws TextureException {
	synchronized (mCameras) {
		for (int i = 0, j = mCameras.size(); i < j; ++i)
			mCameras.get(i).setFarPlane(1000);
	}
	synchronized (mNextSkyboxLock) {
		mNextSkybox = new Cube(700, true, false);
		mNextSkybox.setDoubleSided(true);
		mSkyboxTexture = new Texture("skybox", resourceId);
		Material material = new Material();
		material.setColorInfluence(0);
		material.addTexture(mSkyboxTexture);
		mNextSkybox.setMaterial(material);
	}
}
 
开发者ID:takyonxxx,项目名称:IRobot-Android,代码行数:22,代码来源:RajawaliScene.java

示例3: setSkybox

import rajawali.primitives.Cube; //导入依赖的package包/类
protected void setSkybox(int front, int right, int back, int left, int up, int down) {
	mCamera.setFarPlane(1000);
	mSkybox = new Cube(700, true);

	Bitmap[] textures = new Bitmap[6];
	textures[0] = BitmapFactory.decodeResource(mContext.getResources(), left);
	textures[1] = BitmapFactory.decodeResource(mContext.getResources(), right);
	textures[2] = BitmapFactory.decodeResource(mContext.getResources(), up);
	textures[3] = BitmapFactory.decodeResource(mContext.getResources(), down);
	textures[4] = BitmapFactory.decodeResource(mContext.getResources(), front);
	textures[5] = BitmapFactory.decodeResource(mContext.getResources(), back);

	mSkyboxTextureInfo = mTextureManager.addCubemapTextures(textures);
	SkyboxMaterial mat = new SkyboxMaterial();
	mat.addTexture(mSkyboxTextureInfo);
	mSkybox.setMaterial(mat);
}
 
开发者ID:OpsLabJPL,项目名称:MarsImagesAndroid,代码行数:18,代码来源:RajawaliRenderer.java


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