Class SectionOcclusionGraph
java.lang.Object
net.minecraft.client.renderer.SectionOcclusionGraph
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static classstatic classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleprivate final AtomicReference<@Nullable SectionOcclusionGraph.GraphState> private static final Direction[]private final it.unimi.dsi.fastutil.longs.LongOpenHashSetprivate static final intprivate booleanprivate final it.unimi.dsi.fastutil.longs.LongOpenHashSetprivate static final org.slf4j.Loggerprivate static final intprivate static final intprivate final AtomicBooleanprivate booleanprivate doubleprivate doubleprivate doubleprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSectionsInFrustum(Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, List<SectionRenderDispatcher.RenderSection> nearbyVisibleSection) booleanit.unimi.dsi.fastutil.longs.LongCollectiongetRelativeFrom(long cameraSectionNode, SectionRenderDispatcher.RenderSection renderSection, Direction direction) private voidinitializeQueueForFullUpdate(BlockPos cameraPosition, Queue<SectionOcclusionGraph.Node> queue) voidvoidinvalidateIfNeeded(CameraRenderState camera, int fov) private booleanisInViewDistance(long cameraSectionNode, long sectionNode) private static FrustumoffsetFrustum(Frustum frustum) private voidrunPartialUpdate(CameraRenderState camera, it.unimi.dsi.fastutil.longs.LongSet loadedExpectedChunks) private voidrunUpdates(SectionOcclusionGraph.GraphStorage storage, Vec3 cameraPos, Queue<SectionOcclusionGraph.Node> queue, boolean smartCull, Consumer<SectionRenderDispatcher.RenderSection> onSectionAdded, it.unimi.dsi.fastutil.longs.LongOpenHashSet emptySections, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedChunks) private voidscheduleFullUpdate(CameraRenderState camera) voidvoidupdate(CameraRenderState camera, int fov, ChunkLoadingRenderState chunkLoadingRenderState) voidupdateEmptySections(it.unimi.dsi.fastutil.longs.LongOpenHashSet added, it.unimi.dsi.fastutil.longs.LongOpenHashSet removed) voidupdateLoadedChunks(it.unimi.dsi.fastutil.longs.LongOpenHashSet added, it.unimi.dsi.fastutil.longs.LongOpenHashSet removed) voidwaitAndReset(@Nullable ViewArea viewArea)
-
Field Details
-
HALF_SECTION_SIZE
private static final int HALF_SECTION_SIZE- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DIRECTIONS
-
MINIMUM_ADVANCED_CULLING_DISTANCE
private static final int MINIMUM_ADVANCED_CULLING_DISTANCE- See Also:
-
MINIMUM_ADVANCED_CULLING_SECTION_DISTANCE
private static final int MINIMUM_ADVANCED_CULLING_SECTION_DISTANCE -
CEILED_SECTION_DIAGONAL
private static final double CEILED_SECTION_DIAGONAL -
needsFullUpdate
private boolean needsFullUpdate -
fullUpdateTask
-
viewArea
-
currentGraph
-
needsFrustumUpdate
-
emptySections
private final it.unimi.dsi.fastutil.longs.LongOpenHashSet emptySections -
loadedChunks
private final it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedChunks -
nextSectionsToPropagateFrom
private volatile @Nullable BlockingQueue<SectionRenderDispatcher.RenderSection> nextSectionsToPropagateFrom -
prevCamX
private double prevCamX -
prevCamY
private double prevCamY -
prevCamZ
private double prevCamZ -
prevFov
private int prevFov -
lastSmartCull
private boolean lastSmartCull
-
-
Constructor Details
-
SectionOcclusionGraph
public SectionOcclusionGraph()
-
-
Method Details
-
waitAndReset
-
expectedChunks
public it.unimi.dsi.fastutil.longs.LongCollection expectedChunks() -
invalidate
public void invalidate() -
invalidateIfNeeded
-
addSectionsInFrustum
public void addSectionsInFrustum(Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, List<SectionRenderDispatcher.RenderSection> nearbyVisibleSection) -
consumeFrustumUpdate
public boolean consumeFrustumUpdate() -
schedulePropagationFrom
-
update
public void update(CameraRenderState camera, int fov, ChunkLoadingRenderState chunkLoadingRenderState) -
scheduleFullUpdate
-
runPartialUpdate
private void runPartialUpdate(CameraRenderState camera, it.unimi.dsi.fastutil.longs.LongSet loadedExpectedChunks) -
initializeQueueForFullUpdate
private void initializeQueueForFullUpdate(BlockPos cameraPosition, Queue<SectionOcclusionGraph.Node> queue) -
runUpdates
private void runUpdates(SectionOcclusionGraph.GraphStorage storage, Vec3 cameraPos, Queue<SectionOcclusionGraph.Node> queue, boolean smartCull, Consumer<SectionRenderDispatcher.RenderSection> onSectionAdded, it.unimi.dsi.fastutil.longs.LongOpenHashSet emptySections, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedChunks) -
offsetFrustum
-
isInViewDistance
private boolean isInViewDistance(long cameraSectionNode, long sectionNode) -
getRelativeFrom
private @Nullable SectionRenderDispatcher.RenderSection getRelativeFrom(long cameraSectionNode, SectionRenderDispatcher.RenderSection renderSection, Direction direction) -
getNode
-
updateEmptySections
public void updateEmptySections(it.unimi.dsi.fastutil.longs.LongOpenHashSet added, it.unimi.dsi.fastutil.longs.LongOpenHashSet removed) -
updateLoadedChunks
public void updateLoadedChunks(it.unimi.dsi.fastutil.longs.LongOpenHashSet added, it.unimi.dsi.fastutil.longs.LongOpenHashSet removed) -
getOctree
-