List of usage examples for com.badlogic.gdx.math.collision BoundingBox getDimensions
@Deprecated
public Vector3 getDimensions()
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.lyeeedar.Roguelike3D.Graphics.Models.VisibleObject.java
License:Open Source License
private void loadGraphics(Mesh mesh) { //mesh = Shapes.insertColour(mesh, colour); //mesh = Shapes.insertTangents(mesh); SubMesh[] meshes = { new StillSubMesh("SubMesh1", mesh, primitive_type) }; model = new StillModel(meshes); Material material = new Material("basic"); material.setColour(colour);//w ww .j a va 2 s . c o m material.setTexture(texture); material.create(); BoundingBox box = mesh.calculateBoundingBox(); attributes = new StillModelAttributes(material, (box.getDimensions().x > box.getDimensions().z) ? box.getDimensions().x : box.getDimensions().z, scale, box.getDimensions()); disposed = false; }