Module imp3d

Interface RenderState

All Known Implementing Classes:
FluxVolumeBuilder, GLDisplay, GLDisplay, GLSLDisplay, GLSLVolumeBuilder, VertexCollector, VolumeBuilder, WireframeCanvas

public interface RenderState
This interface describes all functions a render device must implement.
Author:
Reinhard Hemmerling
  • Field Details

    • CURRENT_HIGHLIGHT

      static final int CURRENT_HIGHLIGHT
      Passed as highlight-parameter to the draw-methods of this interface if the current highlight has to be used instead of the parameter.
      See Also:
  • Method Details

    • getRenderGraphState

      GraphState getRenderGraphState()
    • getPool

      Pool getPool()
    • getFontMetrics

      FontMetrics getFontMetrics(Font font)
    • getCurrentHighlight

      int getCurrentHighlight()
    • estimateScaleAt

      float estimateScaleAt(Tuple3f point)
    • getCurrentShader

      Shader getCurrentShader()
    • drawPoint

      void drawPoint(Tuple3f location, int pixelSize, Tuple3f color, int highlight, Matrix4d t)
    • drawPointCloud

      void drawPointCloud(float[] locations, float pointSize, Tuple3f color, int highlight, Matrix4d t)
      Draw a set of points. The array locations contains a sequence of points given as triples of floats for x, y and z position of each point. If the same reference for the array location is passed in the implementation might assume that the contents of the array are the same as well. This is necessary for GLDisplay, for instance, to ensure a performant implementation. The class PointCloud ensures that this is the case.
      Parameters:
      locations - array containing a sequence (x,y,z) of points
      pointSize - size of the point on screen
      color - color of the point
      highlight -
      t - transformation of the point cloud
    • drawLine

      void drawLine(Tuple3f start, Tuple3f end, Tuple3f color, int highlight, Matrix4d t)
    • drawParallelogram

      void drawParallelogram(float axis, Vector3f secondAxis, float scaleU, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t)
    • drawPlane

      void drawPlane(Shader s, int highlight, boolean asWireframe, Matrix4d t)
    • drawSphere

      void drawSphere(float radius, Shader s, int highlight, boolean asWireframe, Matrix4d t)
    • drawTextBlock

      void drawTextBlock(String caption, Font font, float depth, Shader s, int highlight, boolean asWireframe, Matrix4d t)
    • drawSupershape

      void drawSupershape(float a, float b, float m1, float n11, float n12, float n13, float m2, float n21, float n22, float n23, Shader s, int highlight, boolean asWireframe, Matrix4d t)
      Draw a supershape around the origin (0/0/0). An implementation of Johan Gielis's Superformula which was published in the American Journal of Botany 90(3): 333–338. 2003. INVITED SPECIAL PAPER A GENERIC GEOMETRIC TRANSFORMATION THAT UNIFIES A WIDE RANGE OF NATURAL AND ABSTRACT SHAPES
      Parameters:
      a - , b length of curves
      m - , n shape parameters
      shader -
      highlight -
      t - transformation of the point cloud
    • drawBox

      void drawBox(float halfWidth, float halfLength, float height, Shader s, int highlight, boolean asWireframe, Matrix4d t)
      Parameters:
      halfWidth -
      halfLength -
      height -
      s -
      highlight -
      t -
    • drawLamella

      void drawLamella(float halfWidth, float halfLength, float height, float a, float b, Shader s, int highlight, boolean asWireframe, Matrix4d t)
      Parameters:
      halfWidth -
      halfLength -
      height -
      a - amplitude
      b - frequency
      s -
      highlight -
      t -
    • drawFrustum

      void drawFrustum(float height, float baseRadius, float topRadius, boolean baseClosed, boolean topClosed, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t)
      Parameters:
      height -
      baseRadius -
      topRadius -
      baseClosed -
      topClosed -
      scaleV -
      s -
      highlight -
      t -
    • drawPolygons

      void drawPolygons(Polygonizable polygons, Object obj, boolean asNode, Shader s, int highlight, boolean asWireframe, Matrix4d t)
      Parameters:
      polygons -
      obj -
      asNode -
      s -
      highlight -
      t -
    • drawPrismRectangular

      void drawPrismRectangular(float y, float xPos, float xNeg, float zPos, float zNeg, int highlight, boolean asWireframe, Matrix4d t)
      Parameters:
      y -
      xPos -
      xNeg -
      zPos -
      zNeg -
      highlight -
      t -
    • getWindowPos

      boolean getWindowPos(Tuple3f location, Tuple2f out)
      Computes the window coordinates in pixels of a location in the current object coordinates.
      Parameters:
      location - a location in local object coordinates
      out - the computed window coordinates are placed in here
      Returns:
      true iff the window coordinates are valid (i.e., the location is in the clipping region)
    • drawRectangle

      void drawRectangle(int x, int y, int w, int h, Tuple3f color)
    • fillRectangle

      void fillRectangle(int x, int y, int w, int h, Tuple3f color)
    • drawString

      void drawString(int x, int y, String text, Font font, Tuple3f color)
    • drawFrustumIrregular

      void drawFrustumIrregular(float height, int sectorCount, float[] baseRadii, float[] topRadii, boolean baseClosed, boolean topclosed, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t)
    • drawSphereSegmentSolid

      void drawSphereSegmentSolid(float radius, float theta1, float theta2, float phi, Shader s, int highlight, boolean asWireframe, Matrix4d t)