Class ModelEntityRenderSystem
java.lang.Object
gaiasky.scene.system.render.draw.model.ModelEntityRenderSystem
Contains the logic to render model entities, the ones that
have a
Model component.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprepareShadowEnvironment(com.badlogic.ashley.core.Entity entity, Model model, ModelScaffolding scaffolding) Prepares the shadow environment for shadow mapping.voidrender(com.badlogic.ashley.core.Entity entity, IntModelBatch batch, ICamera camera, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow) Renders a single entity as a model.voidrenderAtmosphere(com.badlogic.ashley.core.Entity entity, Body body, Model model, ModelScaffolding scaffolding, IntModelBatch batch, Atmosphere atmosphere, float alpha, RenderingContext rc) Renders the atmosphere of a planet.voidrenderClouds(com.badlogic.ashley.core.Entity entity, Base base, Model model, Cloud cloud, IntModelBatch batch, float alpha, double t) Renders the cloud layer of a planet.voidrenderGenericModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean relativistic, boolean shadow) Renders a generic model.voidrenderMeshModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean relativistic, boolean shadow) Renders a mesh, typically an iso-surface.voidrenderOpaque(com.badlogic.ashley.core.Entity entity, IntModelBatch modelBatch, float alpha, boolean shadow) Model opaque rendering for the light glow pass.voidrenderParticleStarModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders the model of a single star or particle.voidrenderParticleStarSetModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders the model of a single star or particle.voidrenderPlanet(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders a planet.voidrenderRecursiveGridModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders the recursive grid.voidrenderShape(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean relativistic, boolean shadow) Renders a wireframe/shape model.voidrenderSpacecraft(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders a spacecraft.voidrenderStarClusterModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders a star cluster entity as a model.voidrenderVRDeviceModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean relativistic, boolean shadow)
-
Constructor Details
-
ModelEntityRenderSystem
-
-
Method Details
-
render
public void render(com.badlogic.ashley.core.Entity entity, IntModelBatch batch, ICamera camera, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow) Renders a single entity as a model. The entity is assumed to have aModelcomponent.- Parameters:
entity- The entity to render.batch- The model batch to use.camera- The camera.alpha- The opacity value in [0,1].t- The time, in seconds, since the start of the session.rc- The rendering context object.renderGroup- The render group.shadow- Whether to prepare the shadow environment, to render the shadow map.
-
renderOpaque
public void renderOpaque(com.badlogic.ashley.core.Entity entity, IntModelBatch modelBatch, float alpha, boolean shadow) Model opaque rendering for the light glow pass.- Parameters:
entity- The entity.modelBatch- The model batch.alpha- The alpha value.shadow- Shadow environment.
-
renderVRDeviceModel
public void renderVRDeviceModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean relativistic, boolean shadow) -
renderGenericModel
public void renderGenericModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean relativistic, boolean shadow) Renders a generic model.- Parameters:
entity- The entity.model- The model component.batch- The batch.alpha- The alpha value.t- The time.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderShape
public void renderShape(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean relativistic, boolean shadow) Renders a wireframe/shape model.- Parameters:
entity- The entity.model- The model component.batch- The batch.alpha- The alpha value.t- The time.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderRecursiveGridModel
public void renderRecursiveGridModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders the recursive grid.- Parameters:
entity- The entity.model- The model component.modelBatch- The batch.alpha- The alpha value.t- The time.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderMeshModel
public void renderMeshModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean relativistic, boolean shadow) Renders a mesh, typically an iso-surface.- Parameters:
entity- The entity.model- The model component.batch- The batch.alpha- The alpha value.t- The time.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderStarClusterModel
public void renderStarClusterModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders a star cluster entity as a model.- Parameters:
entity- The entity.model- The model component.modelBatch- The model batch.alpha- The model alpha.t- The time.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderParticleStarSetModel
public void renderParticleStarSetModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders the model of a single star or particle.- Parameters:
entity- The entity.model- The model component.batch- The model batch.alpha- The model alpha.t- The time.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderParticleStarModel
public void renderParticleStarModel(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders the model of a single star or particle.- Parameters:
entity- The entity.model- The model component.batch- The model batch.alpha- The model alpha.t- The time.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderSpacecraft
public void renderSpacecraft(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders a spacecraft. Not used right now.- Parameters:
entity- The entity.model- The model component.batch- The model batch.alpha- The model alpha.t- The time.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderPlanet
public void renderPlanet(com.badlogic.ashley.core.Entity entity, Model model, IntModelBatch batch, float alpha, double t, RenderingContext rc, RenderGroup renderGroup, boolean shadow, boolean relativistic) Renders a planet.- Parameters:
entity- The entity.model- The model component.batch- The batch.alpha- The alpha value.t- The time, in seconds, since the session start.rc- The rendering context.renderGroup- The render group.relativistic- Whether to apply relativistic effects.shadow- Whether to prepare the shadow environment.
-
renderAtmosphere
public void renderAtmosphere(com.badlogic.ashley.core.Entity entity, Body body, Model model, ModelScaffolding scaffolding, IntModelBatch batch, Atmosphere atmosphere, float alpha, RenderingContext rc) Renders the atmosphere of a planet. -
renderClouds
public void renderClouds(com.badlogic.ashley.core.Entity entity, Base base, Model model, Cloud cloud, IntModelBatch batch, float alpha, double t) Renders the cloud layer of a planet. -
prepareShadowEnvironment
protected void prepareShadowEnvironment(com.badlogic.ashley.core.Entity entity, Model model, ModelScaffolding scaffolding) Prepares the shadow environment for shadow mapping.
-