Class PlanetMesh

java.lang.Object
mindustry.graphics.g3d.PlanetMesh
All Implemented Interfaces:
GenericMesh
Direct Known Subclasses:
HexMesh, HexSkyMesh, ShaderSphereMesh

public abstract class PlanetMesh extends Object implements GenericMesh
Defines a mesh that is rendered for a planet. Subclasses provide a mesh and a shader.
  • Field Details

    • mesh

      protected Mesh mesh
    • planet

      protected Planet planet
    • shader

      protected Shader shader
  • Constructor Details

    • PlanetMesh

      public PlanetMesh(Planet planet, Mesh mesh, Shader shader)
    • PlanetMesh

      public PlanetMesh()
  • Method Details

    • preRender

      public void preRender(PlanetParams params)
      Should be overridden to set up any shader parameters such as planet position, normals, etc.
    • render

      public void render(PlanetParams params, Mat3D projection, Mat3D transform)
      Specified by:
      render in interface GenericMesh