java.lang.Object
com.marginallyclever.ro3.apps.viewport.renderpasses.AbstractRenderPass
com.marginallyclever.ro3.apps.viewport.renderpasses.DrawMeshes
All Implemented Interfaces:
com.jogamp.opengl.GLEventListener, RenderPass, EventListener

public class DrawMeshes extends AbstractRenderPass
Draw each MeshInstance as a Mesh. If the MeshInstance has a sibling Material with a Texture then use it in the ShaderProgram.
  • Field Details

    • SHADOW_WIDTH

      public static final int SHADOW_WIDTH
      See Also:
    • SHADOW_HEIGHT

      public static final int SHADOW_HEIGHT
      See Also:
    • sunlightSource

      public static final javax.vecmath.Vector3d sunlightSource
    • sunlightColor

      public static Color sunlightColor
    • lightProjection

      public static final javax.vecmath.Matrix4d lightProjection
    • lightView

      public static final javax.vecmath.Matrix4d lightView
  • Constructor Details

    • DrawMeshes

      public DrawMeshes()
  • Method Details

    • init

      public void init(com.jogamp.opengl.GLAutoDrawable glAutoDrawable)
      Specified by:
      init in interface com.jogamp.opengl.GLEventListener
      Overrides:
      init in class AbstractRenderPass
    • dispose

      public void dispose(com.jogamp.opengl.GLAutoDrawable glAutoDrawable)
      Specified by:
      dispose in interface com.jogamp.opengl.GLEventListener
      Overrides:
      dispose in class AbstractRenderPass
    • draw

      public void draw(Viewport viewport)
      Description copied from interface: RenderPass
      Draw this viewport pass.
      Specified by:
      draw in interface RenderPass
      Overrides:
      draw in class AbstractRenderPass
      Parameters:
      viewport - the viewport to draw into
    • lookAt

      public static javax.vecmath.Matrix4d lookAt(javax.vecmath.Vector3d eye, javax.vecmath.Vector3d center, javax.vecmath.Vector3d up)
    • getSunlightColor

      public Color getSunlightColor()
    • setSunlightColor

      public void setSunlightColor(Color color)
    • getSunlightSource

      public javax.vecmath.Vector3d getSunlightSource()
    • getDeclination

      public double getDeclination()
    • setDeclination

      public void setDeclination(double declination)
    • getTimeOfDay

      public double getTimeOfDay()
    • setTimeOfDay

      public void setTimeOfDay(double timeOfDay)
    • savePrefs

      public void savePrefs()