Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.imp3d
Interface RenderState

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

    public interface RenderState

This interface describes all functions a render device must implement.

Author:
  Reinhard Hemmerling

Field Summary
`static 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.

Method Summary
`void` | `drawBox(float halfWidth, float halfLength, float height, Shader s, int highlight, Matrix4d t)`
`void` | `drawFrustum(float height, float baseRadius, float topRadius, boolean baseClosed, boolean topClosed, float scaleV, Shader s, int highlight, Matrix4d t)`
`void` | `drawLine(Tuple3f start, Tuple3f end, Tuple3f color, int highlight, Matrix4d t)`
`void` | `drawParallelogram(float axis, Vector3f secondAxis, float scaleU, float scaleV, Shader s, int highlight, Matrix4d t)`
`void` | `drawPlane(Shader s, int highlight, Matrix4d t)`
`void` | `drawPoint(Tuple3f location, int pixelSize, Tuple3f color, int highlight, Matrix4d t)`
`void` | `drawPointCloud(float[] locations, float pointSize, Tuple3f color, int highlight, Matrix4d t)` Draw a set of points.
`void` | `drawPolygons(Polygonizable polygons, java.lang.Object obj, boolean asNode, Shader s, int highlight, Matrix4d t)`
`void` | `drawRectangle(int x, int y, int w, int h, Tuple3f color)`
`void` | `drawSphere(float radius, Shader s, int highlight, Matrix4d t)`
`void` | `drawString(int x, int y, java.lang.String text, java.awt.Font font, Tuple3f color)`
`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, Matrix4d t)` Draw a supershape around the origin (0/0/0).
`float` | `estimateScaleAt(Tuple3f point)`
`void` | `fillRectangle(int x, int y, int w, int h, Tuple3f color)`
`int` | `getCurrentHighlight()`
`Shader` | `getCurrentShader()`
`java.awt.FontMetrics` | `getFontMetrics(java.awt.Font font)`
`Pool` | `getPool()`
`GraphState` | `getRenderGraphState()`
`boolean` | `getWindowPos(Tuple3f location, Tuple2f out)` Computes the window coordinates in pixels of a location in the current object coordinates.

Field Detail

### 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:
    Constant Field Values

Method Detail

### drawBox

    void drawBox(float halfWidth,
                 float halfLength,
                 float height,
                 Shader s,
                 int highlight,
                 Matrix4d t)

### drawFrustum

    void drawFrustum(float height,
                     float baseRadius,
                     float topRadius,
                     boolean baseClosed,
                     boolean topClosed,
                     float scaleV,
                     Shader s,
                     int highlight,
                     Matrix4d t)

### 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,
                           Matrix4d t)

### drawPlane

    void drawPlane(Shader s,
                   int highlight,
                   Matrix4d t)

### 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

### drawPolygons

    void drawPolygons(Polygonizable polygons,
                      java.lang.Object obj,
                      boolean asNode,
                      Shader s,
                      int highlight,
                      Matrix4d t)

### drawRectangle

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

### drawSphere

    void drawSphere(float radius,
                    Shader s,
                    int highlight,
                    Matrix4d t)

### drawString

    void drawString(int x,
                    int y,
                    java.lang.String text,
                    java.awt.Font font,
                    Tuple3f color)

### 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,
                        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

### estimateScaleAt

    float estimateScaleAt(Tuple3f point)

### fillRectangle

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

### getCurrentHighlight

    int getCurrentHighlight()

### getCurrentShader

    Shader getCurrentShader()

### getFontMetrics

    java.awt.FontMetrics getFontMetrics(java.awt.Font font)

### getPool

    Pool getPool()

### getRenderGraphState

    GraphState getRenderGraphState()

### 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)

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD