コード例 #1
0
 public void Invalidate()
 {
     this.states[this.slot] = OccludeeState.State.Unused;
     this.slot = -1;
     this.onVisibilityChanged = (OcclusionCulling.OnVisibilityChanged)null;
     this.cell = (OcclusionCulling.Cell)null;
 }
コード例 #2
0
 public void Invalidate()
 {
     this.states[this.slot] = OccludeeState.State.Unused;
     this.slot = -1;
     this.onVisibilityChanged = null;
     this.cell = null;
 }
コード例 #3
0
 public OccludeeState Initialize(
     OcclusionCulling.SimpleList <OccludeeState.State> states,
     OcclusionCulling.BufferSet set,
     int slot,
     Vector4 sphereBounds,
     bool isVisible,
     float minTimeVisible,
     bool isStatic,
     int layer,
     OcclusionCulling.OnVisibilityChanged onVisibilityChanged)
 {
     states[slot] = new OccludeeState.State()
     {
         sphereBounds   = sphereBounds,
         minTimeVisible = minTimeVisible,
         waitTime       = isVisible ? Time.get_time() + minTimeVisible : 0.0f,
         waitFrame      = (uint)(Time.get_frameCount() + 1),
         isVisible      = isVisible ? (byte)1 : (byte)0,
         active         = (byte)1,
         callback       = onVisibilityChanged != null ? (byte)1 : (byte)0
     };
     this.slot                = slot;
     this.isStatic            = isStatic;
     this.layer               = layer;
     this.onVisibilityChanged = onVisibilityChanged;
     this.cell                = (OcclusionCulling.Cell)null;
     this.states              = states;
     return(this);
 }
コード例 #4
0
    public OccludeeState Initialize(OcclusionCulling.SimpleList <OccludeeState.State> states, OcclusionCulling.BufferSet set, int slot, Vector4 sphereBounds, bool isVisible, float minTimeVisible, bool isStatic, int layer, OcclusionCulling.OnVisibilityChanged onVisibilityChanged)
    {
        OcclusionCulling.SimpleList <OccludeeState.State> simpleList = states;
        int num = slot;

        OccludeeState.State state = new OccludeeState.State()
        {
            sphereBounds   = sphereBounds,
            minTimeVisible = minTimeVisible,
            waitTime       = (isVisible ? Time.time + minTimeVisible : 0f),
            waitFrame      = (uint)(Time.frameCount + 1),
            isVisible      = (byte)((isVisible ? 1 : 0)),
            active         = 1,
            callback       = (byte)((onVisibilityChanged != null ? 1 : 0))
        };
        simpleList[num]          = state;
        this.slot                = slot;
        this.isStatic            = isStatic;
        this.layer               = layer;
        this.onVisibilityChanged = onVisibilityChanged;
        this.cell                = null;
        this.states              = states;
        return(this);
    }