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


Java GL10.GL_TRIANGLES属性代码示例

本文整理汇总了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);
}
 
开发者ID:sterwill,项目名称:gdx-bullet-demos,代码行数:22,代码来源:DemoScreen.java

示例2: Cone

public Cone(float bottomRadius, float height) {
    this.bottomRadius = bottomRadius;
    this.height = height;

    primitiveType = GL10.GL_TRIANGLES;
    create();
}
 
开发者ID:navossoc,项目名称:vrmleditor,代码行数:7,代码来源:Cone.java

示例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();
}
 
开发者ID:navossoc,项目名称:vrmleditor,代码行数:8,代码来源:Box.java

示例4: Cylinder

public Cylinder(float radius, float height) {
    this.height = height;
    this.radius = radius;

    primitiveType = GL10.GL_TRIANGLES;
    create();
}
 
开发者ID:navossoc,项目名称:vrmleditor,代码行数:7,代码来源:Cylinder.java

示例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);
    }
}
 
开发者ID:sterwill,项目名称:gdx-bullet-demos,代码行数:36,代码来源:DemoScreen.java


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