本文整理汇总了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);
}
}