本文整理汇总了Java中net.minecraft.client.renderer.culling.ICamera.isBoundingBoxInFrustum方法的典型用法代码示例。如果您正苦于以下问题:Java ICamera.isBoundingBoxInFrustum方法的具体用法?Java ICamera.isBoundingBoxInFrustum怎么用?Java ICamera.isBoundingBoxInFrustum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.culling.ICamera
的用法示例。
在下文中一共展示了ICamera.isBoundingBoxInFrustum方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldRender
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public boolean shouldRender(T livingEntity, ICamera camera, double camX, double camY, double camZ)
{
if (super.shouldRender(livingEntity, camera, camX, camY, camZ))
{
return true;
}
else if (livingEntity.getLeashed() && livingEntity.getLeashedToEntity() != null)
{
Entity entity = livingEntity.getLeashedToEntity();
return camera.isBoundingBoxInFrustum(entity.getEntityBoundingBox());
}
else
{
return false;
}
}
示例2: shouldRender
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public boolean shouldRender(T livingEntity, ICamera camera, double camX, double camY, double camZ)
{
if (super.shouldRender(livingEntity, camera, camX, camY, camZ))
{
return true;
}
else if (livingEntity.getLeashed() && livingEntity.getLeashedToEntity() != null)
{
Entity entity = livingEntity.getLeashedToEntity();
return camera.isBoundingBoxInFrustum(entity.getRenderBoundingBox());
}
else
{
return false;
}
}
示例3: shouldRender
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public boolean shouldRender(EntityShulker livingEntity, ICamera camera, double camX, double camY, double camZ)
{
if (super.shouldRender(livingEntity, camera, camX, camY, camZ))
{
return true;
}
else
{
if (livingEntity.getClientTeleportInterp() > 0 && livingEntity.isAttachedToBlock())
{
BlockPos blockpos = livingEntity.getOldAttachPos();
BlockPos blockpos1 = livingEntity.getAttachmentPos();
Vec3d vec3d = new Vec3d((double)blockpos1.getX(), (double)blockpos1.getY(), (double)blockpos1.getZ());
Vec3d vec3d1 = new Vec3d((double)blockpos.getX(), (double)blockpos.getY(), (double)blockpos.getZ());
if (camera.isBoundingBoxInFrustum(new AxisAlignedBB(vec3d1.xCoord, vec3d1.yCoord, vec3d1.zCoord, vec3d.xCoord, vec3d.yCoord, vec3d.zCoord)))
{
return true;
}
}
return false;
}
}
示例4: visitChain
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
void visitChain(ICamera camera, float partial, ChainRender cr) {
// This is far from efficient as it ought to be.
// If the line is diagonal, then there will be huge amounts of
// space where the line is drawn even tho it is far off-screen.
if (start == null) return;
Vec3 s = getStart(partial);
Vec3 e = getEnd(partial);
// The lines are drawn fat, so make the box a bit fatter as well
final double d = 0.125;
AxisAlignedBB box = SpaceUtil.newBoxSort(s, e).expand(d, d, d);
if (camera.isBoundingBoxInFrustum(box)) {
cr.drawChain(s, e, partial);
}
}
示例5: shouldRender
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public boolean shouldRender(EntityGuardian livingEntity, ICamera camera, double camX, double camY, double camZ)
{
if (super.shouldRender(livingEntity, camera, camX, camY, camZ))
{
return true;
}
else
{
if (livingEntity.hasTargetedEntity())
{
EntityLivingBase entitylivingbase = livingEntity.getTargetedEntity();
if (entitylivingbase != null)
{
Vec3 vec3 = this.func_177110_a(entitylivingbase, (double)entitylivingbase.height * 0.5D, 1.0F);
Vec3 vec31 = this.func_177110_a(livingEntity, (double)livingEntity.getEyeHeight(), 1.0F);
if (camera.isBoundingBoxInFrustum(AxisAlignedBB.fromBounds(vec31.xCoord, vec31.yCoord, vec31.zCoord, vec3.xCoord, vec3.yCoord, vec3.zCoord)))
{
return true;
}
}
}
return false;
}
}
示例6: shouldRender
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public boolean shouldRender(EntityGuardian livingEntity, ICamera camera, double camX, double camY, double camZ)
{
if (super.shouldRender((EntityLiving)livingEntity, camera, camX, camY, camZ))
{
return true;
}
else
{
if (livingEntity.hasTargetedEntity())
{
EntityLivingBase entitylivingbase = livingEntity.getTargetedEntity();
if (entitylivingbase != null)
{
Vec3 vec3 = this.func_177110_a(entitylivingbase, (double)entitylivingbase.height * 0.5D, 1.0F);
Vec3 vec31 = this.func_177110_a(livingEntity, (double)livingEntity.getEyeHeight(), 1.0F);
if (camera.isBoundingBoxInFrustum(AxisAlignedBB.fromBounds(vec31.xCoord, vec31.yCoord, vec31.zCoord, vec3.xCoord, vec3.yCoord, vec3.zCoord)))
{
return true;
}
}
}
return false;
}
}
示例7: shouldRender
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public boolean shouldRender(EntityGuardian livingEntity, ICamera camera, double camX, double camY, double camZ)
{
if (super.shouldRender(livingEntity, camera, camX, camY, camZ))
{
return true;
}
else
{
if (livingEntity.hasTargetedEntity())
{
EntityLivingBase entitylivingbase = livingEntity.getTargetedEntity();
if (entitylivingbase != null)
{
Vec3d vec3d = this.getPosition(entitylivingbase, (double)entitylivingbase.height * 0.5D, 1.0F);
Vec3d vec3d1 = this.getPosition(livingEntity, (double)livingEntity.getEyeHeight(), 1.0F);
if (camera.isBoundingBoxInFrustum(new AxisAlignedBB(vec3d1.xCoord, vec3d1.yCoord, vec3d1.zCoord, vec3d.xCoord, vec3d.yCoord, vec3d.zCoord)))
{
return true;
}
}
}
return false;
}
}
示例8: isOutlineActive
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
private boolean isOutlineActive(Entity p_184383_1_, Entity p_184383_2_, ICamera p_184383_3_)
{
if(Hacks.findMod(OutlineESP.class).isEnabled())
return true;
boolean flag = p_184383_2_ instanceof EntityLivingBase && ((EntityLivingBase)p_184383_2_).isPlayerSleeping();
return p_184383_1_ == p_184383_2_ && this.mc.gameSettings.thirdPersonView == 0 && !flag ? false : (p_184383_1_.isGlowing() ? true : (this.mc.player.isSpectator() && this.mc.gameSettings.keyBindSpectatorOutlines.isKeyDown() && p_184383_1_ instanceof EntityPlayer ? p_184383_1_.ignoreFrustumCheck || p_184383_3_.isBoundingBoxInFrustum(p_184383_1_.getEntityBoundingBox()) || p_184383_1_.isRidingOrBeingRiddenBy(this.mc.player) : false));
}
示例9: updateInFrustum
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public void updateInFrustum(ICamera par1ICamera)
{
this.isInFrustum = par1ICamera.isBoundingBoxInFrustum(this.rendererBoundingBox);
if (this.isInFrustum && Config.isOcclusionFancy())
{
this.isInFrustrumFully = par1ICamera.isBoundingBoxInFrustumFully(this.rendererBoundingBox);
}
else
{
this.isInFrustrumFully = false;
}
}
示例10: shouldRender
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public boolean shouldRender(T livingEntity, ICamera camera, double camX, double camY, double camZ)
{
AxisAlignedBB axisalignedbb = livingEntity.getRenderBoundingBox().expandXyz(0.5D);
if (axisalignedbb.hasNaN() || axisalignedbb.getAverageEdgeLength() == 0.0D)
{
axisalignedbb = new AxisAlignedBB(livingEntity.posX - 2.0D, livingEntity.posY - 2.0D, livingEntity.posZ - 2.0D, livingEntity.posX + 2.0D, livingEntity.posY + 2.0D, livingEntity.posZ + 2.0D);
}
return livingEntity.isInRangeToRender3d(camX, camY, camZ) && (livingEntity.ignoreFrustumCheck || camera.isBoundingBoxInFrustum(axisalignedbb));
}
示例11: isOutlineActive
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
private boolean isOutlineActive(Entity p_184383_1_, Entity p_184383_2_, ICamera p_184383_3_)
{
boolean flag = p_184383_2_ instanceof EntityLivingBase && ((EntityLivingBase)p_184383_2_).isPlayerSleeping();
return p_184383_1_ == p_184383_2_ && this.mc.gameSettings.thirdPersonView == 0 && !flag ? false : (p_184383_1_.isGlowing() ? true : (this.mc.thePlayer.isSpectator() && this.mc.gameSettings.keyBindSpectatorOutlines.isKeyDown() && p_184383_1_ instanceof EntityPlayer ? p_184383_1_.ignoreFrustumCheck || p_184383_3_.isBoundingBoxInFrustum(p_184383_1_.getEntityBoundingBox()) || p_184383_1_.isRidingOrBeingRiddenBy(this.mc.thePlayer) : false));
}
示例12: updateInFrustum
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public void updateInFrustum(ICamera p_78908_1_)
{
this.isInFrustum = p_78908_1_.isBoundingBoxInFrustum(this.rendererBoundingBox);
}
示例13: updateInFrustum
import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public void updateInFrustum(ICamera par1ICamera)
{
this.isInFrustum = par1ICamera.isBoundingBoxInFrustum(this.rendererBoundingBox);
}