Example usage for com.badlogic.gdx.graphics.g3d Model calculateBoundingBox

List of usage examples for com.badlogic.gdx.graphics.g3d Model calculateBoundingBox

Introduction

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

Prototype

public BoundingBox calculateBoundingBox(final BoundingBox out) 

Source Link

Document

Calculate the bounding box of this model instance.

Usage

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

License:Apache License

/** Creates a btBoxShape with the same dimensions as the shape. */
public BulletConstructor(final Model model, final float mass) {
    final BoundingBox boundingBox = new BoundingBox();
    model.calculateBoundingBox(boundingBox);
    final Vector3 dimensions = boundingBox.getDimensions();
    create(model, mass, dimensions.x, dimensions.y, dimensions.z);
}

From source file:com.badlogic.gdx.tests.dragome.examples.bullet.BulletConstructor.java

License:Apache License

/** Creates a btBoxShape with the same dimensions as the shape. */
public BulletConstructor(final Model model, final float mass) {
    final BoundingBox boundingBox = new BoundingBox();
    model.calculateBoundingBox(boundingBox);
    create(model, mass, boundingBox.getWidth(), boundingBox.getHeight(), boundingBox.getDepth());
}

From source file:com.shansown.game.tests.bullet.BulletConstructor.java

License:Apache License

/** Creates a btBoxShape with the same dimensions as the shape. */
public BulletConstructor(final Model model, final float mass) {
    final BoundingBox boundingBox = new BoundingBox();
    model.calculateBoundingBox(boundingBox);
    Vector3 dimensions = new Vector3();
    boundingBox.getDimensions(dimensions);
    create(model, mass, dimensions.x, dimensions.y, dimensions.z);
}