当前位置: 首页>>代码示例>>Java>>正文


Java ICamera.isBoundingBoxInFrustum方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:17,代码来源:RenderLiving.java

示例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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:17,代码来源:RenderLiving.java

示例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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:RenderShulker.java

示例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);
    }
}
 
开发者ID:purpleposeidon,项目名称:Factorization,代码行数:17,代码来源:ChainLink.java

示例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;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:RenderGuardian.java

示例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;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:28,代码来源:RenderGuardian.java

示例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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:28,代码来源:RenderGuardian.java

示例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));
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:9,代码来源:RenderGlobal.java

示例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;
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:14,代码来源:WorldRenderer.java

示例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));
}
 
开发者ID:BlazeAxtrius,项目名称:ExpandedRailsMod,代码行数:12,代码来源:Render.java

示例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));
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:6,代码来源:RenderGlobal.java

示例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);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:5,代码来源:WorldRenderer.java

示例13: updateInFrustum

import net.minecraft.client.renderer.culling.ICamera; //导入方法依赖的package包/类
public void updateInFrustum(ICamera par1ICamera)
{
    this.isInFrustum = par1ICamera.isBoundingBoxInFrustum(this.rendererBoundingBox);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:5,代码来源:WorldRenderer.java


注:本文中的net.minecraft.client.renderer.culling.ICamera.isBoundingBoxInFrustum方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。