Skip to main content

CullingPortal.CullingSide

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Client: one side of a CullingPortal. Turns on or off the static renderers of a cave layer streamer that fall inside a box on that side.

Constructors​

MemberWhat it is
CullingSide(Transform cachedTransform, CaveLayerStreamer streamer, Bounds bounds)Creates a CullingPortal.CullingSide from cachedTransform, streamer and bounds.

Fields​

5 private and internal fields
MemberWhat it is
private readonly Bounds boundsBox in portal space that picks which renderers belong to this side.
private readonly Transform cachedTransformThe portal's transform.
private bool isVisibleWhether the side's renderers are on.
private List<Renderer> renderersRenderers on this side.
private readonly CaveLayerStreamer streamerCave layer streamer the renderers come from.

Methods​

MemberWhat it is
void Cull()Disables every renderer on this side.
void Uncull()Enables every renderer on this side, building the list first if empty.
2 private and internal methods
MemberWhat it is
private void Clear()Forgets the renderer list when the streamer changes its renderers, so it is rebuilt next time.
private void PopulateRenderersList()Collects the streamer's static renderers whose positions fall inside bounds, relative to the portal.

Used in​

Members of other types that take, return or hold a CullingSide: