use of com.jme3.scene.debug.WireBox in project jmonkeyengine by jMonkeyEngine.
the class WireBox method makeGeometry.
/**
* Create a geometry suitable for visualizing the specified bounding box.
*
* @param bbox the bounding box (not null)
* @return a new Geometry instance in world space
*/
public static Geometry makeGeometry(BoundingBox bbox) {
float xExtent = bbox.getXExtent();
float yExtent = bbox.getYExtent();
float zExtent = bbox.getZExtent();
WireBox mesh = new WireBox(xExtent, yExtent, zExtent);
Geometry result = new Geometry("bounding box", mesh);
Vector3f center = bbox.getCenter();
result.setLocalTranslation(center);
return result;
}
use of com.jme3.scene.debug.WireBox in project jmonkeyengine by jMonkeyEngine.
the class TerrainQuad method attachBoundingBox.
/**
* used by attachBoundChildren()
*/
private void attachBoundingBox(BoundingBox bb, Node parent) {
WireBox wb = new WireBox(bb.getXExtent(), bb.getYExtent(), bb.getZExtent());
Geometry g = new Geometry();
g.setMesh(wb);
g.setLocalTranslation(bb.getCenter());
parent.attachChild(g);
}