Skip to content

Instantly share code, notes, and snippets.

@StillManic
Created August 24, 2016 00:23
Show Gist options
  • Save StillManic/2547892a7d21e53fadcf6f6a14625597 to your computer and use it in GitHub Desktop.
Save StillManic/2547892a7d21e53fadcf6f6a14625597 to your computer and use it in GitHub Desktop.
private AxisAlignedBB getBoundingBox(int hex) {
Vec3d min = new Vec3d((hex & 0xF00000) / 16.0, (hex & 0x0F0000) / 16.0, (hex & 0x00F000) / 16.0);
Vec3d max = new Vec3d((hex & 0x000F00) / 16.0, (hex & 0x0000F0) / 16.0, (hex & 0x00000F) / 16.0);
Pair<Vec3d, Vec3d> minMax = StructureUtils.getMinMax(min, max);
return new AxisAlignedBB(minMax.getLeft(), minMax.getRight());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment