Package com.rvandoosselaer.blocks
Class PhysicsChunkPager
- java.lang.Object
-
- com.rvandoosselaer.blocks.Pager<com.jme3.bullet.objects.PhysicsRigidBody>
-
- com.rvandoosselaer.blocks.PhysicsChunkPager
-
- All Implemented Interfaces:
BlocksManagerListener
public class PhysicsChunkPager extends Pager<com.jme3.bullet.objects.PhysicsRigidBody>
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, blocksManager, centerPageLocation, gridLowerBounds, gridSize, gridUpperBounds, location, pagesToAttach, pagesToDetach, requestedPages, updatedPages
-
-
Constructor Summary
Constructors Constructor Description PhysicsChunkPager(@NonNull BlocksManager blocksManager)PhysicsChunkPager(com.jme3.bullet.PhysicsSpace physicsSpace, @NonNull BlocksManager blocksManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidattachPage(com.jme3.bullet.objects.PhysicsRigidBody page)Attach the page.protected com.jme3.bullet.objects.PhysicsRigidBodycreatePage(Chunk chunk)Creates and returns the page based on the passed chunk.protected voiddetachPage(com.jme3.bullet.objects.PhysicsRigidBody page)Detach the page.-
Methods inherited from class com.rvandoosselaer.blocks.Pager
cleanup, getPages, initialize, onChunkAvailable, update, updateQueues
-
-
-
-
Constructor Detail
-
PhysicsChunkPager
public PhysicsChunkPager(@NonNull @NonNull BlocksManager blocksManager)
-
PhysicsChunkPager
public PhysicsChunkPager(com.jme3.bullet.PhysicsSpace physicsSpace, @NonNull @NonNull BlocksManager blocksManager)
-
-
Method Detail
-
createPage
protected com.jme3.bullet.objects.PhysicsRigidBody createPage(Chunk chunk)
Description copied from class:PagerCreates and returns the page based on the passed chunk.- Specified by:
createPagein 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:PagerDetach the page.- Specified by:
detachPagein classPager<com.jme3.bullet.objects.PhysicsRigidBody>- Parameters:
page- to detach
-
attachPage
protected void attachPage(com.jme3.bullet.objects.PhysicsRigidBody page)
Description copied from class:PagerAttach the page.- Specified by:
attachPagein classPager<com.jme3.bullet.objects.PhysicsRigidBody>- Parameters:
page- to attach
-
-