Class PhysicsChunkPager

java.lang.Object
com.rvandoosselaer.blocks.Pager<com.jme3.bullet.objects.PhysicsRigidBody>
com.rvandoosselaer.blocks.PhysicsChunkPager

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.
  • Constructor Details

    • PhysicsChunkPager

      public PhysicsChunkPager(@NonNull @NonNull ChunkManager chunkManager)
    • PhysicsChunkPager

      public PhysicsChunkPager(com.jme3.bullet.PhysicsSpace physicsSpace, @NonNull @NonNull ChunkManager chunkManager)
  • Method Details

    • createPage

      protected com.jme3.bullet.objects.PhysicsRigidBody createPage(Chunk chunk)
      Description copied from class: Pager
      Creates and returns the page based on the passed chunk.
      Specified by:
      createPage in class Pager<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 class Pager<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 class Pager<com.jme3.bullet.objects.PhysicsRigidBody>
      Parameters:
      page - to attach