本文整理匯總了Java中com.badlogic.gdx.graphics.GL10.GL_TRIANGLES屬性的典型用法代碼示例。如果您正苦於以下問題:Java GL10.GL_TRIANGLES屬性的具體用法?Java GL10.GL_TRIANGLES怎麽用?Java GL10.GL_TRIANGLES使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.badlogic.gdx.graphics.GL10
的用法示例。
在下文中一共展示了GL10.GL_TRIANGLES屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: hookAddSimulationObjects
@Override
protected void hookAddSimulationObjects()
{
final btTransform transform = Pools.btTRANSFORM.obtain();
final Vector3 vector = Pools.VECTOR3.obtain();
// Terrain
transform.setIdentity();
vector.set(0, 0, 0);
transform.setOrigin(vector);
terrain = new MeshSimulationObject(terrainMesh, GL10.GL_TRIANGLES, false, terrainTexture, false);
terrain.initialize(MeshSimulationObject.createTriangleMeshShape(terrainMesh, terrainTriangleMesh), 0, -1,
transform);
terrain.getRigidbody().setCollisionFlags(CollisionFlags.CF_STATIC_OBJECT);
addCollisionSimulationObject(terrain);
// terrain = new StaticPlaneSimulationObject(vector.set(0, 0, 1), 1, -1, 50, 50, terrainTexture, false);
// addCollisionSimulationObject(terrain);
Pools.btTRANSFORM.free(transform);
Pools.VECTOR3.free(vector);
}
示例2: Cone
public Cone(float bottomRadius, float height) {
this.bottomRadius = bottomRadius;
this.height = height;
primitiveType = GL10.GL_TRIANGLES;
create();
}
示例3: Box
public Box(float width, float height, float depth) {
this.width = width;
this.height = height;
this.depth = depth;
this.primitiveType = GL10.GL_TRIANGLES;
create();
}
示例4: Cylinder
public Cylinder(float radius, float height) {
this.height = height;
this.radius = radius;
primitiveType = GL10.GL_TRIANGLES;
create();
}
示例5: dropThing
public void dropThing(boolean type)
{
if (!isPaused())
{
float x = (random.nextFloat() * 10f) - 5f;
float y = (random.nextFloat() * 10f) - 5f;
float z = 20;
final btTransform transform = Pools.btTRANSFORM.obtain();
final Vector3 vector = Pools.VECTOR3.obtain();
final Matrix3 basis = Pools.MATRIX3.obtain();
transform.setIdentity();
transform.setOrigin(vector.set(x, y, z));
MeshSimulationObject object;
if (type)
{
// Don't autodispose the mesh and texture
object = new MeshSimulationObject(cubeMesh, GL10.GL_TRIANGLES, false, cubeTexture, false);
object.initialize(new btBoxShape(vector.set(1, 1, 1)), 50, -1, transform);
}
else
{
// Don't autodispose the mesh and texture
object = new MeshSimulationObject(icosphereMesh, GL10.GL_TRIANGLES, false, icosphereTexture, false);
object.initialize(new btSphereShape(1), 50, -1, transform);
}
addCollisionSimulationObject(object);
Pools.btTRANSFORM.free(transform);
Pools.VECTOR3.free(vector);
Pools.MATRIX3.free(basis);
}
}