Interface MainViewPortFragment

All Superinterfaces:
Fragment

public interface MainViewPortFragment extends Fragment
A fragment that provides access to a ViewPort. A ViewPort is an object that contains the camera and scene to be rendered.
  • Method Details

    • getRootNode

      default Node getRootNode(ViewPort vp)
      Get the first scene node of the ViewPort. This is usually the root node of the scene graph.
      Parameters:
      vp - the ViewPort instance
      Returns:
      the root node of the scene graph
      See Also:
    • receiveMainViewPort

      default void receiveMainViewPort(ViewPort viewPort)
      Receive a ViewPort instance as soon as it is available. The reference to the ViewPort can be stored and used later in the component logic.
      Parameters:
      viewPort - the ViewPort instance
    • receiveMainViewPortFilterPostProcessor

      default void receiveMainViewPortFilterPostProcessor(FilterPostProcessor fpp)
      Receive a FilterPostProcessor instance as soon as it is available. The reference to the FilterPostProcessor can be stored and used later in the component logic.
      Parameters:
      fpp - the FilterPostProcessor instance
    • loadMainViewPortFilterPostprocessor

      default void loadMainViewPortFilterPostprocessor(AssetManager assetManager, FilterPostProcessor fpp)
      Configure the filter post processor for the passed viewport. This can be used to dynamically attach or configure filters.
      Parameters:
      assetManager - the AssetManager instance to load assets
      fpp - the FilterPostProcessor instance to configure
    • updateMainViewPort

      default void updateMainViewPort(ViewPort viewPort, float tpf)
      Update the ViewPort with the given time per frame (tpf). This method is called every frame and can be used to get the ViewPort or scene info, the camera, tweak the camera or even update the scene graph. This method is called before
      invalid reference
      LogicFragment#update(float)
      .
      Parameters:
      viewPort - the ViewPort instance
      tpf - time per frame