use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class GateBase method addOcclusionBoxes.
public void addOcclusionBoxes(List<Vec3dCube> boxes) {
boxes.add(new Vec3dCube(2 / 16D, 0, 0, 1 - 2 / 16D, 2D / 16D, 1));
boxes.add(new Vec3dCube(0, 0, 2 / 16D, 1, 2D / 16D, 1 - 2 / 16D));
}
use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class GateBase method addCollisionBoxesToList.
// Occlusion, selection and collision boxes
@Override
public final void addCollisionBoxesToList(List<Vec3dCube> boxes, Entity entity) {
List<Vec3dCube> boxes_ = new ArrayList<Vec3dCube>();
addCollisionBoxes(boxes_, entity);
VectorHelper.rotateBoxes(boxes_, getFace(), getRotation());
for (Vec3dCube c : boxes_) boxes.add(c);
}
use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class PartCageLamp method renderGlow.
@Override
@SideOnly(Side.CLIENT)
public void renderGlow(int pass) {
Vec3dCube vector = new Vec3dCube(5 / 16D, 2 / 16D, 5 / 16D, 11 / 16D, 11 / 16D, 11 / 16D).rotate(getFace(), Vec3d.center);
double r = ((color.getHex() & 0xFF0000) >> 16) / 256D;
double g = ((color.getHex() & 0x00FF00) >> 8) / 256D;
double b = (color.getHex() & 0x0000FF) / 256D;
if (pass == 1) {
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glBegin(GL11.GL_QUADS);
com.bluepowermod.client.render.RenderHelper.drawColoredCube(vector.clone().expand(0.5 / 16D), r, g, b, ((inverted ? 255 - (power & 0xFF) : (power & 0xFF)) / 255D) * 0.625);
GL11.glEnd();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDisable(GL11.GL_BLEND);
}
}
use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class PartFixture method renderLamp.
/**
* @author Koen Beckers (K4Unl), Amadornes
*/
@Override
@SideOnly(Side.CLIENT)
public void renderLamp(RenderHelper renderer) {
Vec3dCube vector = new Vec3dCube(2 / 16D, 0.0, 2 / 16D, 1.0 - (2 / 16D), 2 / 16D, 1.0 - 2 / 16D);
IIcon topIcon = IconSupplier.fixtureFootTop;
IIcon sideIcon = IconSupplier.fixtureFootSide;
renderer.renderBox(vector, topIcon, topIcon, sideIcon, sideIcon, sideIcon, sideIcon);
vector = new Vec3dCube(3 / 16D, 2 / 16D, 3 / 16D, 1.0 - (3 / 16D), 8 / 16D, 13 / 16D);
if (inverted ? (power & 0xFF) == 255 : power == 0) {
sideIcon = IconSupplier.fixtureLampSideOff;
topIcon = IconSupplier.fixtureLampTopOff;
} else {
sideIcon = IconSupplier.fixtureLampSideOn;
topIcon = IconSupplier.fixtureLampTopOn;
}
renderer.setColor(color.getHex());
renderer.renderBox(vector, topIcon, topIcon, sideIcon, sideIcon, sideIcon, sideIcon);
renderer.setColor(0xFFFFFF);
}
use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class PartFixture method getSelectionBoxes.
/**
* @author Koen Beckers (K4Unl), Amadornes
*/
@Override
public List<Vec3dCube> getSelectionBoxes() {
List<Vec3dCube> boxes = new ArrayList<Vec3dCube>();
boxes.add(new Vec3dCube(2 / 16D, 0.0, 2 / 16D, 14 / 16D, 2 / 16D, 14 / 16D).rotate(getFace(), Vec3d.center));
boxes.add(new Vec3dCube(3 / 16D, 2 / 16D, 3 / 16D, 13 / 16D, 8 / 16D, 13 / 16D).expand(0.5 / 16D).rotate(getFace(), Vec3d.center));
return boxes;
}
Aggregations