1 package com.irtimaled.bbor.common.models;
3 import com.irtimaled.bbor.client.ClientRenderer;
4 import com.irtimaled.bbor.client.renderers.AbstractRenderer;
5 import com.irtimaled.bbor.common.BoundingBoxType;
7 public abstract class AbstractBoundingBox {
8 private final BoundingBoxType type;
10 protected AbstractBoundingBox(BoundingBoxType type) {
14 public abstract Boolean intersectsBounds(int minX, int minZ, int maxX, int maxZ);
16 public BoundingBoxType getType() {
20 public double getDistance(double x, double y, double z) {
21 double dX = getDistanceX(x);
22 double dY = getDistanceY(y);
23 double dZ = getDistanceZ(z);
24 return dX * dX + dY * dY + dZ * dZ;
27 protected abstract double getDistanceX(double x);
29 protected abstract double getDistanceY(double y);
31 protected abstract double getDistanceZ(double z);
33 public AbstractRenderer<?> getRenderer() {
34 return ClientRenderer.getRenderer(this.getClass());
37 public boolean isVisibleCulling() {