You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.6 KiB
50 lines
1.6 KiB
3 years ago
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||
|
// Magicbane Emulator Project © 2013 - 2022
|
||
|
// www.magicbane.com
|
||
|
|
||
|
|
||
|
package engine.objects;
|
||
|
|
||
|
import engine.gameManager.DbManager;
|
||
|
import engine.math.Bounds;
|
||
|
|
||
|
import java.sql.ResultSet;
|
||
|
import java.sql.SQLException;
|
||
|
|
||
|
public class MeshBounds {
|
||
|
|
||
|
public int meshID;
|
||
|
public final float minX;
|
||
|
public final float minY;
|
||
|
public final float minZ;
|
||
|
public final float maxX;
|
||
|
public final float maxY;
|
||
|
public final float maxZ;
|
||
|
public final float radius;
|
||
|
|
||
|
public MeshBounds(ResultSet rs) throws SQLException {
|
||
|
|
||
|
meshID = rs.getInt("meshID");
|
||
|
minX = rs.getFloat("minX");
|
||
|
minY = rs.getFloat("minY");
|
||
|
minZ = rs.getFloat("minZ");
|
||
|
maxX = rs.getFloat("maxX");
|
||
|
maxY = rs.getFloat("maxY");
|
||
|
maxZ = rs.getFloat("maxZ");
|
||
|
float radiusX = (int) maxX;
|
||
|
float radiusZ = (int) maxZ;
|
||
|
|
||
|
radius = Math.max(radiusX,radiusZ);
|
||
|
}
|
||
|
|
||
|
public static void InitializeBuildingBounds(){
|
||
|
Bounds.meshBoundsCache = DbManager.BuildingQueries.LOAD_MESH_BOUNDS();
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|