idTech4.Renderer.idRenderWorld.CullEntityByPortals C# (CSharp) Method

CullEntityByPortals() private method

Return true if the entity reference bounds do not intersect the current portal chain.
private CullEntityByPortals ( idRenderEntity entity, PortalStack portalStack ) : bool
entity idRenderEntity
portalStack PortalStack
return bool
		private bool CullEntityByPortals(idRenderEntity entity, PortalStack portalStack)
		{
			if(idE.CvarSystem.GetBool("r_useEntityCulling") == false)
			{
				return false;
			}

			// try to cull the entire thing using the reference bounds.
			// we do not yet do callbacks or dynamic model creation,
			// because we want to do all touching of the model after
			// we have determined all the lights that may effect it,
			// which optimizes cache usage
			return idHelper.CullLocalBox(entity.ReferenceBounds, entity.ModelMatrix, portalStack.PortalPlaneCount, portalStack.PortalPlanes);
		}