java.lang.Object
technology.sola.engine.defaults.SolaGraphics
SolaGraphics provides default rendering capabilities while also allowing for adding new rendering
capabilities via
SolaGraphicsModule
s.-
Constructor Summary
ConstructorsConstructorDescriptionSolaGraphics
(technology.sola.ecs.SolaEcs solaEcs) Creates a SolaGraphics instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGraphicsModules
(SolaGraphicsModule... graphicsModules) AddsSolaGraphicsModule
s to be rendered.<T extends SolaGraphicsModule>
TgetGraphicsModule
(Class<T> solaGraphicsModuleClass) Gets aSolaGraphicsModule
that has been added or else null.technology.sola.ecs.EcsSystem[]
void
Renders allSolaGraphicsModule
s that have been added.screenToWorldCoordinate
(Vector2D screenCoordinate) Using the camera's transform, this method calculates theWorld
coordinate based on the screen's coordinate system.
-
Constructor Details
-
SolaGraphics
public SolaGraphics(technology.sola.ecs.SolaEcs solaEcs) Creates a SolaGraphics instance.- Parameters:
solaEcs
- theSolaEcs
instance
-
-
Method Details
-
addGraphicsModules
AddsSolaGraphicsModule
s to be rendered.- Parameters:
graphicsModules
- the modules to add
-
getGraphicsModule
Gets aSolaGraphicsModule
that has been added or else null.- Type Parameters:
T
- the type of graphics module- Parameters:
solaGraphicsModuleClass
- the class of the SolaGraphicsModule- Returns:
- the graphics module
-
getSystems
public technology.sola.ecs.EcsSystem[] getSystems()- Returns:
- an array of all graphics related
EcsSystem
s
-
render
Renders allSolaGraphicsModule
s that have been added. Passes each the current camera's translation and scale.- Parameters:
renderer
- theRenderer
instance
-
screenToWorldCoordinate
Using the camera's transform, this method calculates theWorld
coordinate based on the screen's coordinate system.- Parameters:
screenCoordinate
- the coordinate of the screen to map- Returns:
- the coordinate mapped to the
World
's coordinate system
-