Package com.rvandoosselaer.blocks
Class PhysicsChunkPager
java.lang.Object
com.rvandoosselaer.blocks.Pager<com.jme3.bullet.objects.PhysicsRigidBody>
com.rvandoosselaer.blocks.PhysicsChunkPager
A pager implementation that attaches and detaches collision meshes to the given physicsSpace based on the location
in the grid.
-
Field Summary
Fields inherited from class com.rvandoosselaer.blocks.Pager
attachedPages, centerPage, chunkManager, gridLowerBounds, gridSize, gridUpperBounds, location, pagerListeners, pagesToAttach, pagesToDetach, requestedPages, updatedPages
-
Constructor Summary
ConstructorsConstructorDescriptionPhysicsChunkPager
(@NonNull ChunkManager chunkManager) PhysicsChunkPager
(com.jme3.bullet.PhysicsSpace physicsSpace, @NonNull ChunkManager chunkManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
attachPage
(com.jme3.bullet.objects.PhysicsRigidBody page) Attach the page.protected com.jme3.bullet.objects.PhysicsRigidBody
createPage
(Chunk chunk) Creates and returns the page based on the passed chunk.protected void
detachPage
(com.jme3.bullet.objects.PhysicsRigidBody page) Detach the page.Methods inherited from class com.rvandoosselaer.blocks.Pager
addListener, cleanup, getPages, initialize, removeListener, update, updateQueues
-
Constructor Details
-
PhysicsChunkPager
-
PhysicsChunkPager
public PhysicsChunkPager(com.jme3.bullet.PhysicsSpace physicsSpace, @NonNull @NonNull ChunkManager chunkManager)
-
-
Method Details
-
createPage
Description copied from class:Pager
Creates and returns the page based on the passed chunk.- Specified by:
createPage
in classPager<com.jme3.bullet.objects.PhysicsRigidBody>
- Returns:
- page of the chunk or null
-
detachPage
protected void detachPage(com.jme3.bullet.objects.PhysicsRigidBody page) Description copied from class:Pager
Detach the page.- Specified by:
detachPage
in classPager<com.jme3.bullet.objects.PhysicsRigidBody>
- Parameters:
page
- to detach
-
attachPage
protected void attachPage(com.jme3.bullet.objects.PhysicsRigidBody page) Description copied from class:Pager
Attach the page.- Specified by:
attachPage
in classPager<com.jme3.bullet.objects.PhysicsRigidBody>
- Parameters:
page
- to attach
-