*
* @param setup The cell's setup information
* @return The bounds as a JME BoundingVolume object
*/
public static BoundingVolume getCellBounds(PositionComponentServerState setup) {
BoundsType type = setup.getBounds().type;
float x = (float)setup.getBounds().x;
if (type.equals(BoundsType.SPHERE) == true) {
return new BoundingSphere(x, new Vector3f());
}
else if (type.equals(BoundsType.BOX) == true) {
return new BoundingBox(new Vector3f(), x, (float)setup.getBounds().y, (float)setup.getBounds().z);
}
/* This should never happen, but in case it does... */
throw new RuntimeException("Unsupported bounds type " + type);