Class ModelEntityRenderSystem
java.lang.Object
gaiasky.scene.system.render.draw.model.ModelEntityRenderSystem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
prepareShadowEnvironment
(com.badlogic.ashley.core.Entity entity, Model model, ModelScaffolding scaffolding) Prepares the shadow environment for shadow mapping.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.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.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.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.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.void
renderOpaque
(com.badlogic.ashley.core.Entity entity, IntModelBatch modelBatch, float alpha, boolean shadow) Model opaque rendering for the light glow pass.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.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.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.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.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.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.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.void
renderVRDeviceModel
(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 aModel
component.- 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.shadow
- Whether to prepare the shadow environment.relativistic
- Whether to apply relativistic effects.
-
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.shadow
- Whether to prepare the shadow environment.relativistic
- Whether to apply relativistic effects.
-
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.shadow
- Whether to prepare the shadow environment.relativistic
- Whether to apply relativistic effects.
-
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.shadow
- Whether to prepare the shadow environment.relativistic
- Whether to apply relativistic effects.
-
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.shadow
- Whether to prepare the shadow environment.relativistic
- Whether to apply relativistic effects.
-
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.shadow
- Whether to prepare the shadow environment.relativistic
- Whether to apply relativistic effects.
-
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.
-