Example usage for com.badlogic.gdx.graphics.g3d ModelBatch render

List of usage examples for com.badlogic.gdx.graphics.g3d ModelBatch render

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g3d ModelBatch render.

Prototype

public <T extends RenderableProvider> void render(final Iterable<T> renderableProviders, final Shader shader) 

Source Link

Document

Calls RenderableProvider#getRenderables(Array,Pool) and adds all returned Renderable instances to the current batch to be rendered.

Usage

From source file:com.badlogic.gdx.ai.tests.utils.bullet.BaseWorld.java

License:Apache License

public void render(final ModelBatch batch, final Environment lights, final Iterable<T> entities) {
    for (final T e : entities) {
        batch.render(e.modelInstance, lights);
    }/*from  w ww  . jav  a  2s. c om*/
}

From source file:com.badlogic.gdx.ai.tests.utils.bullet.BaseWorld.java

License:Apache License

public void render(final ModelBatch batch, final Environment lights, final T entity) {
    batch.render(entity.modelInstance, lights);
}

From source file:com.caresilabs.ase.models.GameObject.java

License:Apache License

public void render(ModelBatch batch, Environment environment) {
    if (model != null) {
        if (batch.getCamera().frustum.boundsInFrustum(bounds)) {
            model.transform = globalTransform;
            batch.render(model, environment);
        }/*  www. j a  v  a 2  s .c  o  m*/
    }

    for (GameObject child : children) {
        child.render(batch, environment);
    }
}

From source file:com.nsoft.boxuniverse.world.BaseBlock.java

License:Open Source License

@Override
public void draw(ModelBatch mb) {

    if (block.body.isAwake()) {
        instance.transform.setToRotation(Vector3.Z, MathUtils.radiansToDegrees * block.body.getAngle());
        instance.transform.setTranslation(block.getPos(Axis.X), block.getPos(Axis.Y), Z);

    }//from w w  w.  ja va 2 s .c  o  m

    mb.render(instance, BaseWorld.e);

}

From source file:org.ah.gcode.preview.gcode.Layer.java

License:Open Source License

public void render(ModelBatch modelBatch, Environment environment, float zOffset) {
    if (modelInstance != null) {
        modelInstance.transform.idt().translate(0, zOffset, 0);
        modelBatch.render(modelInstance, environment);
    }//from  w  w w. j a v  a  2  s .  c  o  m
}

From source file:sink.scene3d.Group3d.java

License:Apache License

public void drawChildren(ModelBatch modelBatch, Environment environment) {
    modelBatch.render(this, environment);
    modelBatch.render(children, environment);
    for (Actor3d a : children) {
        if (a instanceof Group3d) {
            ((Group3d) a).drawChildren(modelBatch, environment);
        }/*from w  w w  .  j  a  v  a2  s . c  om*/
    }
}