Interface MainViewPortFragment
- All Superinterfaces:
Fragment
A fragment that provides access to a ViewPort. A ViewPort is an object that contains the camera and scene
to be rendered.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Node
getRootNode
(ViewPort vp) Get the first scene node of the ViewPort.default void
loadMainViewPortFilterPostprocessor
(AssetManager assetManager, FilterPostProcessor fpp) Configure the filter post processor for the passed viewport.default void
receiveMainViewPort
(ViewPort viewPort) Receive a ViewPort instance as soon as it is available.default void
Receive a FilterPostProcessor instance as soon as it is available.default void
updateMainViewPort
(ViewPort viewPort, float tpf) Update the ViewPort with the given time per frame (tpf).
-
Method Details
-
getRootNode
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
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
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 assetsfpp
- the FilterPostProcessor instance to configure
-
updateMainViewPort
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 beforeinvalid reference
LogicFragment#update(float)
- Parameters:
viewPort
- the ViewPort instancetpf
- time per frame
-