當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。