Package com.rvandoosselaer.blocks
Class ChunkPager
java.lang.Object
com.rvandoosselaer.blocks.Pager<com.jme3.scene.Node>
com.rvandoosselaer.blocks.ChunkPager
A pager implementation that pages the meshes of the chunks around the given location. Attaching chunks that are in
range and detaching them when they are out of range, from the given node.
-
Field Summary
Fields inherited from class com.rvandoosselaer.blocks.Pager
attachedPages, centerPage, chunkManager, gridLowerBounds, gridSize, gridUpperBounds, location, pagerListeners, pagesToAttach, pagesToDetach, requestedPages, updatedPages -
Constructor Summary
ConstructorsConstructorDescriptionChunkPager(@NonNull com.jme3.scene.Node node, @NonNull ChunkManager chunkManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidattachPage(com.jme3.scene.Node page) Attach the page.protected com.jme3.scene.NodecreatePage(Chunk chunk) Creates and returns the page based on the passed chunk.protected voiddetachPage(com.jme3.scene.Node page) Detach the page.Methods inherited from class com.rvandoosselaer.blocks.Pager
addListener, cleanup, getPages, initialize, removeListener, update, updateQueues
-
Constructor Details
-
ChunkPager
public ChunkPager(@NonNull @NonNull com.jme3.scene.Node node, @NonNull @NonNull ChunkManager chunkManager)
-
-
Method Details
-
createPage
Description copied from class:PagerCreates and returns the page based on the passed chunk.- Specified by:
createPagein classPager<com.jme3.scene.Node>- Returns:
- page of the chunk or null
-
detachPage
protected void detachPage(com.jme3.scene.Node page) Description copied from class:PagerDetach the page.- Specified by:
detachPagein classPager<com.jme3.scene.Node>- Parameters:
page- to detach
-
attachPage
protected void attachPage(com.jme3.scene.Node page) Description copied from class:PagerAttach the page.- Specified by:
attachPagein classPager<com.jme3.scene.Node>- Parameters:
page- to attach
-