Example usage for com.badlogic.gdx.graphics GL20 GL_TRIANGLES

List of usage examples for com.badlogic.gdx.graphics GL20 GL_TRIANGLES

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics GL20 GL_TRIANGLES.

Prototype

int GL_TRIANGLES

To view the source code for com.badlogic.gdx.graphics GL20 GL_TRIANGLES.

Click Source Link

Usage

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain
 * are not managed, use {@link Model#manageDisposable(Disposable)} to add those to the model.
 * @param attributes bitwise mask of the {@link com.badlogic.gdx.graphics.VertexAttributes.Usage}, only Position, Color, Normal
 *           and TextureCoordinates is supported. */
public Model createSphere(float width, float height, float depth, int divisionsU, int divisionsV,
        final Material material, final long attributes) {
    return createSphere(width, height, depth, divisionsU, divisionsV, GL20.GL_TRIANGLES, material, attributes);
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain
 * are not managed, use {@link Model#manageDisposable(Disposable)} to add those to the model.
 * @param attributes bitwise mask of the {@link com.badlogic.gdx.graphics.VertexAttributes.Usage}, only Position, Color, Normal
 *           and TextureCoordinates is supported. */
public Model createSphere(float width, float height, float depth, int divisionsU, int divisionsV,
        final Material material, final long attributes, float angleUFrom, float angleUTo, float angleVFrom,
        float angleVTo) {
    return createSphere(width, height, depth, divisionsU, divisionsV, GL20.GL_TRIANGLES, material, attributes,
            angleUFrom, angleUTo, angleVFrom, angleVTo);
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a model with a single node containing a capsule shape. The resources the Material might contain
 * are not managed, use {@link Model#manageDisposable(Disposable)} to add those to the model.
 * @param attributes bitwise mask of the {@link com.badlogic.gdx.graphics.VertexAttributes.Usage}, only Position, Color, Normal
 *           and TextureCoordinates is supported. */
public Model createCapsule(float radius, float height, int divisions, final Material material,
        final long attributes) {
    return createCapsule(radius, height, divisions, GL20.GL_TRIANGLES, material, attributes);
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

public Model createXYZCoordinates(float axisLength, Material material, long attributes) {
    return createXYZCoordinates(axisLength, 0.1f, 0.1f, 5, GL20.GL_TRIANGLES, material, attributes);
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a model with an arrow. The resources the Material might contain are not managed, use
 * {@link Model#manageDisposable(Disposable)} to add those to the model. */
public Model createArrow(Vector3 from, Vector3 to, Material material, long attributes) {
    return createArrow(from.x, from.y, from.z, to.x, to.y, to.z, 0.1f, 0.1f, 5, GL20.GL_TRIANGLES, material,
            attributes);/*from w  w  w .ja  va 2s. c  om*/
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a model with a single node containing a cylinder shape. The resources the Material might
 * contain are not managed, use {@link Model#manageDisposable(Disposable)} to add those to the model.
 * @param attributes bitwise mask of the {@link com.badlogic.gdx.graphics.VertexAttributes.Usage}, only Position, Color, Normal
 *           and TextureCoordinates is supported. */
public Model createCylinder(float width, float height, float depth, int divisions, boolean flipNormals,
        final Material material, final long attributes) {
    return createCylinder(width, height, depth, divisions, flipNormals, GL20.GL_TRIANGLES, material,
            attributes);//from   w  w  w .j  a  va2  s  .  c  o  m
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a sphere with a ring. Useful for ringed planets such as Saturn. The resources the Materials might contain
 * are not managed, use {@link Model#manageDisposable(Disposable)} to add those to the model.
 * @param attributes bitwise mask of the {@link com.badlogic.gdx.graphics.VertexAttributes.Usage}, only Position, Color, Normal
 *           and TextureCoordinates is supported. */
public Model createSphereRing(float sphereDiameter, int divisionsU, int divisionsV, float innerRingRadius,
        float outerRingRadius, int ringDivisions, final Material materialShpere, final Material materialRing,
        final long attributes) {
    begin();/*from  w  ww  .j  a v  a 2s .  c o  m*/
    part("sphere", GL20.GL_TRIANGLES, attributes, materialShpere).sphere(sphereDiameter, sphereDiameter,
            sphereDiameter, divisionsU, divisionsV, false, 0, 360, 0, 180);
    part("ring", GL20.GL_TRIANGLES, attributes, materialRing).ring(innerRingRadius, outerRingRadius,
            ringDivisions, false);
    part("ring", GL20.GL_TRIANGLES, attributes, materialRing).ring(new Matrix4().translate(0, -0.00001f, 0),
            innerRingRadius, outerRingRadius, ringDivisions, true);
    return end();
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain
 * are not managed, use {@link Model#manageDisposable(Disposable)} to add those to the model.
 * @param attributes bitwise mask of the {@link com.badlogic.gdx.graphics.VertexAttributes.Usage}, only Position, Color, Normal
 *           and TextureCoordinates is supported. */
public Model createSphere(float diameter, int divisionsU, int divisionsV, final Material material,
        final long attributes) {
    return createSphere(diameter, diameter, diameter, divisionsU, divisionsV, false, GL20.GL_TRIANGLES,
            material, attributes);/*from ww w .ja  v a  2  s.c  om*/
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain
 * are not managed, use {@link Model#manageDisposable(Disposable)} to add those to the model.
 * @param attributes bitwise mask of the {@link com.badlogic.gdx.graphics.VertexAttributes.Usage}, only Position, Color, Normal
 *           and TextureCoordinates is supported. */
public Model createSphere(float diameter, int divisionsU, int divisionsV, boolean flipNormals,
        final Material material, final long attributes) {
    return createSphere(diameter, diameter, diameter, divisionsU, divisionsV, flipNormals, GL20.GL_TRIANGLES,
            material, attributes);//w  w w  .j a v  a 2s.co  m
}

From source file:gaia.cu9.ari.gaiaorbit.util.g3d.ModelBuilder2.java

License:Apache License

/** Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain
 * are not managed, use {@link Model#manageDisposable(Disposable)} to add those to the model.
 * @param attributes bitwise mask of the {@link com.badlogic.gdx.graphics.VertexAttributes.Usage}, only Position, Color, Normal
 *           and TextureCoordinates is supported. */
public Model createSphere(float width, float height, float depth, int divisionsU, int divisionsV,
        boolean flipNormals, final Material material, final long attributes) {
    return createSphere(width, height, depth, divisionsU, divisionsV, flipNormals, GL20.GL_TRIANGLES, material,
            attributes);/*from   w w w  .  j av a 2s.  c  om*/
}