本文整理汇总了Java中codechicken.lib.render.RenderUtils.drawCuboidOutline方法的典型用法代码示例。如果您正苦于以下问题:Java RenderUtils.drawCuboidOutline方法的具体用法?Java RenderUtils.drawCuboidOutline怎么用?Java RenderUtils.drawCuboidOutline使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类codechicken.lib.render.RenderUtils
的用法示例。
在下文中一共展示了RenderUtils.drawCuboidOutline方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawHighlight
import codechicken.lib.render.RenderUtils; //导入方法依赖的package包/类
@Override
public boolean drawHighlight(MovingObjectPosition mop, EntityPlayer player, float frame) {
ForgeDirection face = ForgeDirection.getOrientation(mop.sideHit);
AxisAlignedBB c = net.quetzi.bluepower.util.RayTracer.getSelectedCuboid(mop, player, face, getSubParts(), true);
if (c == null) return true;
GL11.glPushMatrix();
{
GL11.glTranslated(x() - TileEntityRendererDispatcher.staticPlayerX, y() - TileEntityRendererDispatcher.staticPlayerY, z()
- TileEntityRendererDispatcher.staticPlayerZ);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glColor4d(0, 0, 0, 0);
RenderUtils.drawCuboidOutline(new Cuboid6(c).expand(0.001));
GL11.glColor4d(1, 1, 1, 1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
GL11.glPopMatrix();
return true;
}
示例2: renderCuboid
import codechicken.lib.render.RenderUtils; //导入方法依赖的package包/类
private static void renderCuboid(Cuboid6 cuboid) {
if (ProxyClient.lasersRenderHollow) {
RenderUtils.drawCuboidOutline(cuboid);
} else {
RenderUtils.drawCuboidSolid(cuboid);
}
}
示例3: drawHighlight
import codechicken.lib.render.RenderUtils; //导入方法依赖的package包/类
@Override
public boolean drawHighlight(MovingObjectPosition hit, EntityPlayer player, float frame) {
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glColor4f(0, 0, 0, 0.4F);
GL11.glLineWidth(2);
GL11.glDepthMask(true);
GL11.glPushMatrix();
RenderUtils.translateToWorldCoords(player, frame);
GL11.glTranslated(x(), y(), z());
{
double d = 0.002;
if (!is2D()) {
RenderUtils.drawCuboidOutline(new Cuboid6(2 / 16D + d, isSideHidden(ForgeDirection.DOWN) ? d * 2 : -d * 2, 2 / 16D + d,
14 / 16D - d, 1 + (isSideHidden(ForgeDirection.UP) ? -d * 2 : d * 2), 14 / 16D - d));
RenderUtils.drawCuboidOutline(new Cuboid6(isSideHidden(ForgeDirection.WEST) ? d * 2 : -d * 2, 2 / 16D + d, 2 / 16D + d,
1 + (isSideHidden(ForgeDirection.EAST) ? -d * 2 : d * 2), 14 / 16D - d, 14 / 16D - d));
RenderUtils.drawCuboidOutline(new Cuboid6(2 / 16D + d, 2 / 16D + d, isSideHidden(ForgeDirection.NORTH) ? d : -d,
14 / 16D - d, 14 / 16D - d, 1 + (isSideHidden(ForgeDirection.SOUTH) ? -d * 2 : d * 2)));
}
RenderUtils.drawCuboidOutline(new Cuboid6(0, 0, 0, 1, 1, 1).expand(d));
}
GL11.glPopMatrix();
GL11.glDepthMask(false);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
return true;
}
示例4: drawHighlight
import codechicken.lib.render.RenderUtils; //导入方法依赖的package包/类
@Override
public boolean drawHighlight(MovingObjectPosition mop, EntityPlayer player, float frame) {
GL11.glPushMatrix();
GL11.glTranslated(x() - TileEntityRendererDispatcher.staticPlayerX, y() - TileEntityRendererDispatcher.staticPlayerY, z()
- TileEntityRendererDispatcher.staticPlayerZ);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glColor4d(0, 0, 0, 0);
if (highlight == -1) highlight = GL11.glGenLists(1);
GL11.glNewList(highlight, GL11.GL_COMPILE);
boolean rendered = getPart().renderSelectionBoxes(mop, player, frame);
GL11.glEndList();
GL11.glColor4d(1, 1, 1, 1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
if (rendered) {
GL11.glCallList(highlight);
} else {
AmaMOP amamop = RayTracer.rayTrace(player, getPart().getSelectionBoxes());
if (amamop != null && amamop.getCubeHit() != null) {
RenderUtils.drawCuboidOutline(new Cuboid6(amamop.getCubeHit().toAABB()));
} else {
return false;
}
}
return true;
}