use of com.irtimaled.bbor.client.models.Point in project BoundingBoxOutlineReloaded by irtimaled.
the class CustomLineProvider method remove.
public static boolean remove(Point min, Point max) {
DimensionId dimensionId = Player.getDimensionId();
int cacheKey = getHashKey(min, max);
return getCache(dimensionId).remove(cacheKey) != null;
}
use of com.irtimaled.bbor.client.models.Point in project BoundingBoxOutlineReloaded by irtimaled.
the class CustomLineProvider method add.
public static void add(Point minPoint, Point maxPoint, Double width) {
DimensionId dimensionId = Player.getDimensionId();
int cacheKey = getHashKey(minPoint, maxPoint);
BoundingBoxLine line = BoundingBoxLine.from(minPoint, maxPoint, width, BoundingBoxType.Custom);
getCache(dimensionId).put(cacheKey, line);
}
use of com.irtimaled.bbor.client.models.Point in project BoundingBoxOutlineReloaded by irtimaled.
the class AbstractRenderer method renderLineSphere.
private void renderLineSphere(Point center, double radius, Color color) {
RenderHelper.lineWidth2();
double offset = ((radius - (int) radius) == 0) ? center.getY() - (int) center.getY() : 0;
int dyStep = radius < 64 ? 1 : MathHelper.floor(radius / 32);
for (double dy = offset - radius; dy <= radius + 1; dy += dyStep) {
double circleRadius = Math.sqrt((radius * radius) - (dy * dy));
if (circleRadius == 0)
circleRadius = Math.sqrt(2) / 2;
renderCircle(center, circleRadius, color, dy + 0.001F);
}
}
use of com.irtimaled.bbor.client.models.Point in project BoundingBoxOutlineReloaded by irtimaled.
the class CustomSphereProvider method add.
public static void add(Point center, double radius) {
DimensionId dimensionId = Player.getDimensionId();
int cacheKey = center.hashCode();
BoundingBoxSphere sphere = new BoundingBoxSphere(center, radius, BoundingBoxType.Custom);
getCache(dimensionId).put(cacheKey, sphere);
}
use of com.irtimaled.bbor.client.models.Point in project BoundingBoxOutlineReloaded by irtimaled.
the class CustomSphereProvider method remove.
public static boolean remove(Point center) {
DimensionId dimensionId = Player.getDimensionId();
int cacheKey = center.hashCode();
return getCache(dimensionId).remove(cacheKey) != null;
}
Aggregations