private void ClearVisibility()
 {
     if (lodGroup != null)
     {
         lodGroup.localReferencePoint = Vector3.zero;
         lodGroup.RecalculateBounds();
         lodGroup = null;
     }
     if (renderers != null)
     {
         renderers.Clear();
     }
     localOccludee = new OccludeeSphere(-1);
 }
 public void ClearVisibility()
 {
     if (this.lodGroup != null)
     {
         this.lodGroup.localReferencePoint = Vector3.zero;
         this.lodGroup.RecalculateBounds();
         this.lodGroup = null;
     }
     if (this.renderers != null)
     {
         this.renderers.Clear();
     }
     this.localOccludee = new OccludeeSphere(-1);
 }
 public void ClearVisibility()
 {
     if (Object.op_Inequality((Object)this.lodGroup, (Object)null))
     {
         this.lodGroup.set_localReferencePoint(Vector3.get_zero());
         this.lodGroup.RecalculateBounds();
         this.lodGroup = (LODGroup)null;
     }
     if (this.renderers != null)
     {
         this.renderers.Clear();
     }
     this.localOccludee = new OccludeeSphere(-1);
 }
    private void RegisterForCulling(OcclusionCulling.Sphere sphere, bool visible)
    {
        if (localOccludee.IsRegistered)
        {
            UnregisterFromCulling();
        }
        int num = OcclusionCulling.RegisterOccludee(sphere.position, sphere.radius, visible, 0.25f, false, base.gameObject.layer, OnVisibilityChanged);

        if (num >= 0)
        {
            localOccludee = new OccludeeSphere(num, localOccludee.sphere);
            return;
        }
        localOccludee.Invalidate();
        Debug.LogWarning("[OcclusionCulling] Occludee registration failed for " + base.name + ". Too many registered.");
    }
    private void RegisterForCulling(OcclusionCulling.Sphere sphere, bool visible)
    {
        if (this.localOccludee.IsRegistered)
        {
            this.UnregisterFromCulling();
        }
        ArticulatedOccludee articulatedOccludee = this;
        int num = OcclusionCulling.RegisterOccludee(sphere.position, sphere.radius, visible, 0.25f, false, base.gameObject.layer, new OcclusionCulling.OnVisibilityChanged(articulatedOccludee.OnVisibilityChanged));

        if (num >= 0)
        {
            this.localOccludee = new OccludeeSphere(num, this.localOccludee.sphere);
            return;
        }
        this.localOccludee.Invalidate();
        Debug.LogWarning(string.Concat("[OcclusionCulling] Occludee registration failed for ", base.name, ". Too many registered."));
    }
    private void RegisterForCulling(OcclusionCulling.Sphere sphere, bool visible)
    {
        if (this.localOccludee.IsRegistered)
        {
            this.UnregisterFromCulling();
        }
        int id = OcclusionCulling.RegisterOccludee(sphere.position, sphere.radius, visible, 0.25f, false, ((Component)this).get_gameObject().get_layer(), new OcclusionCulling.OnVisibilityChanged(this.OnVisibilityChanged));

        if (id >= 0)
        {
            this.localOccludee = new OccludeeSphere(id, this.localOccludee.sphere);
        }
        else
        {
            this.localOccludee.Invalidate();
            Debug.LogWarning((object)("[OcclusionCulling] Occludee registration failed for " + ((Object)this).get_name() + ". Too many registered."));
        }
    }