Module technology.sola.engine
Class SolaGraphicsModule
java.lang.Object
technology.sola.engine.graphics.modules.SolaGraphicsModule
- All Implemented Interfaces:
Comparable<SolaGraphicsModule>
- Direct Known Subclasses:
GuiDocumentGraphicsModule,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 TypeMethodDescriptionintcompareTo(SolaGraphicsModule solaGraphicsModule) intgetOrder()Gets the order of this graphics module.booleanisActive()voidrender(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 voidrenderMethod(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.voidsetActive(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- tbeRendererinstanceworld- theWorldinstancecameraScaleTransform- 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- tbeRendererinstanceworld- theWorldinstancecameraScaleTransform- 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:
compareToin interfaceComparable<SolaGraphicsModule>
-