cz.cuni.jagrlib.iface
Interface Render3D

All Superinterfaces:
Breakable, Property, Render
All Known Implementing Classes:
AntCity, DefaultRender3D, DrawAxes, DrawAxesGL, GLBrepRender, GraphR2ToR, RenderPainter, RenderWireframe

public interface Render3D
extends Render, Breakable

Rendering interface for 3D scenes.

Since:
0.24
See Also:
Render3D.java

Field Summary
static int DEPTH_GEQUAL
          Depth-test comparison: greater or equal values are accepted.
static int DEPTH_GREATER
          Depth-test comparison: greater values are accepted.
static int DEPTH_LEQUAL
          Depth-test comparison: less or equal values are accepted.
static int DEPTH_LESS
          Depth-test comparison: less values are accepted.
 
Fields inherited from interface cz.cuni.jagrlib.iface.Render
LINE_CAP, LINE_CAP_BUTT, LINE_CAP_ROUND, LINE_CAP_SQUARE, LINE_JOIN, LINE_JOIN_BEVEL, LINE_JOIN_DISJOINT, LINE_JOIN_MITER, LINE_JOIN_OVERLAP, LINE_JOIN_ROUND, LINE_WIDTH, PROJECTION, RENDER_STYLE, RENDER_STYLE_FLAT, RENDER_STYLE_GOURAUD, RENDER_STYLE_LINE, RENDER_STYLE_PHONG, RENDER_STYLE_TEXTURE
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Method Summary
 void render()
          3D rendering using actual parameters.
 void render(TrMatrix mv, TrMatrix proj, int style)
          3D rendering using the given projection matrix.
 void setDepthComparison(int comp)
          Sets type of depth-test comparison (DEPTH_* constants).
 void setModelView(TrMatrix mv)
          Sets actual model-view matrix.
 boolean setProjection(double[] view, double[] up, double[] lookAt, double zoom)
          Sets actual projection parameters (non-mandatory).
 void setProjection(TrMatrix proj)
          Sets actual projection matrix.
 int setRenderStyle(int style)
          Sets actual rendering style.
 void setViewport(int x0, int y0, int width, int height)
          Sets actual viewport size.
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 
Methods inherited from interface cz.cuni.jagrlib.Breakable
setProgressListener, stop
 

Field Detail

DEPTH_LESS

static final int DEPTH_LESS
Depth-test comparison: less values are accepted.

See Also:
Constant Field Values

DEPTH_LEQUAL

static final int DEPTH_LEQUAL
Depth-test comparison: less or equal values are accepted.

See Also:
Constant Field Values

DEPTH_GEQUAL

static final int DEPTH_GEQUAL
Depth-test comparison: greater or equal values are accepted.

See Also:
Constant Field Values

DEPTH_GREATER

static final int DEPTH_GREATER
Depth-test comparison: greater values are accepted.

See Also:
Constant Field Values
Method Detail

setDepthComparison

void setDepthComparison(int comp)
Sets type of depth-test comparison (DEPTH_* constants).


render

void render()
3D rendering using actual parameters.

See Also:
setViewport(int, int, int, int), setModelView(cz.cuni.jagrlib.TrMatrix), setProjection(TrMatrix), setRenderStyle(int), render(TrMatrix,TrMatrix,int)

render

void render(TrMatrix mv,
            TrMatrix proj,
            int style)
3D rendering using the given projection matrix.

Parameters:
mv - Local model-view matrix.
proj - Local projection matrix.
style - Local rendering style.
See Also:
render()

setRenderStyle

int setRenderStyle(int style)
Sets actual rendering style.

Parameters:
style - New rendering style.
Returns:
Old rendering style.
See Also:
Render.RENDER_STYLE_LINE, Render.RENDER_STYLE_FLAT

setViewport

void setViewport(int x0,
                 int y0,
                 int width,
                 int height)
Sets actual viewport size. The same semantics as glSetViewport().

Parameters:
x0 - Viewport origin (x-coord).
y0 - Viewport origin (y-coord).
width - Viewport width in pixels.
height - Viewport height in pixels.
See Also:
setProjection(cz.cuni.jagrlib.TrMatrix)

setModelView

void setModelView(TrMatrix mv)
Sets actual model-view matrix.

Parameters:
mv - New model-view matrix.

setProjection

void setProjection(TrMatrix proj)
Sets actual projection matrix.

Parameters:
proj - New projection matrix.
See Also:
setViewport(int, int, int, int)

setProjection

boolean setProjection(double[] view,
                      double[] up,
                      double[] lookAt,
                      double zoom)
Sets actual projection parameters (non-mandatory).

Parameters:
view - Viewing vector (from camera to the scene).
up - Up vector (should always point up on the screen).
lookAt - Point in the middle of the view.
zoom - Zoom factor (camera - lookAt distance, element size on the screen, etc.).
Returns:
true if the method is implemented.