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

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

Introduction

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

Prototype

public Camera getCamera() 

Source Link

Document

Provides access to the current camera in between #begin(Camera) and #end() .

Usage

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

License:Apache License

@Override
public void render(ModelBatch batch, Environment lights, Iterable<BulletEntity> entities) {
    if (renderMeshes)
        super.render(batch, lights, entities);
    if (debugDrawer != null && debugDrawer.getDebugMode() > 0) {
        batch.flush();// w w w . j a  v a  2  s. c om
        debugDrawer.begin(batch.getCamera());
        collisionWorld.debugDrawWorld();
        debugDrawer.end();
    }
}

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);
        }// ww  w . j  a  v a2s.  c o  m
    }

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

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

License:Open Source License

public void render(ModelBatch mb) {

    mundo.step(Gdx.graphics.getDeltaTime(), 6, 2);
    for (BaseObject baseObject : objects) {

        baseObject.draw(mb);/*from  w  ww .  j  av a  2s.  co  m*/
    }

    renderer.render(mundo, mb.getCamera().projection);
}