Module technology.sola.engine
Class SolaGraphicsModule
java.lang.Object
technology.sola.engine.defaults.graphics.modules.SolaGraphicsModule
- All Implemented Interfaces:
Comparable<SolaGraphicsModule>
- Direct Known Subclasses:
ScreenSpaceLightMapGraphicsModule
,SolaEntityGraphicsModule
@NullMarked
public abstract class SolaGraphicsModule
extends Object
implements Comparable<SolaGraphicsModule>
SolaGraphicsModule adds additional rendering functionality to
SolaGraphics
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(SolaGraphicsModule solaGraphicsModule) int
getOrder()
Gets the order of this graphics module.boolean
isActive()
void
render
(Renderer renderer, technology.sola.ecs.World world, Matrix3D cameraScaleTransform, Matrix3D cameraTranslationTransform) The main render method for a graphics module that is called once per frame.abstract void
renderMethod
(Renderer renderer, technology.sola.ecs.World world, Matrix3D cameraScaleTransform, Matrix3D cameraTranslationTransform) The specific render method for a graphics module that is called once per frame if active.void
setActive
(boolean active) Sets the active state of this graphics module.
-
Constructor Details
-
SolaGraphicsModule
public SolaGraphicsModule()
-
-
Method Details
-
render
public void render(Renderer renderer, technology.sola.ecs.World world, Matrix3D cameraScaleTransform, Matrix3D cameraTranslationTransform) The main render method for a graphics module that is called once per frame. It will call therenderMethod(Renderer, World, Matrix3D, Matrix3D)
if the module is active.- Parameters:
renderer
- tbeRenderer
instanceworld
- theWorld
instancecameraScaleTransform
- the camera's scalecameraTranslationTransform
- the camera's translation
-
renderMethod
public abstract void renderMethod(Renderer renderer, technology.sola.ecs.World world, Matrix3D cameraScaleTransform, Matrix3D cameraTranslationTransform) The specific render method for a graphics module that is called once per frame if active.- Parameters:
renderer
- tbeRenderer
instanceworld
- theWorld
instancecameraScaleTransform
- the camera's scalecameraTranslationTransform
- the camera's translation
-
isActive
public boolean isActive()- Returns:
- true if this graphics module is actively rendering
-
setActive
public void setActive(boolean active) Sets the active state of this graphics module.- Parameters:
active
- the new active state
-
getOrder
public int getOrder()Gets the order of this graphics module. A higher value means it will be rendered on top.- Returns:
- the order of this graphics module
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SolaGraphicsModule>
-