- 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Passed ashighlight
-parameter to thedraw
-methods of this interface if the current highlight has to be used instead of the parameter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawBox
(float halfWidth, float halfLength, float height, Shader s, int highlight, boolean asWireframe, Matrix4d t) void
drawFrustum
(float height, float baseRadius, float topRadius, boolean baseClosed, boolean topClosed, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) void
drawFrustumIrregular
(float height, int sectorCount, float[] baseRadii, float[] topRadii, boolean baseClosed, boolean topclosed, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) void
drawLamella
(float halfWidth, float halfLength, float height, float a, float b, Shader s, int highlight, boolean asWireframe, Matrix4d t) void
void
drawParallelogram
(float axis, Vector3f secondAxis, float scaleU, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) void
void
void
drawPointCloud
(float[] locations, float pointSize, Tuple3f color, int highlight, Matrix4d t) Draw a set of points.void
drawPolygons
(Polygonizable polygons, Object obj, boolean asNode, Shader s, int highlight, boolean asWireframe, Matrix4d t) void
drawPrismRectangular
(float y, float xPos, float xNeg, float zPos, float zNeg, int highlight, boolean asWireframe, Matrix4d t) void
drawRectangle
(int x, int y, int w, int h, Tuple3f color) void
drawSphere
(float radius, Shader s, int highlight, boolean asWireframe, Matrix4d t) void
drawSphereSegmentSolid
(float radius, float theta1, float theta2, float phi, Shader s, int highlight, boolean asWireframe, Matrix4d t) void
drawString
(int x, int y, String text, 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, boolean asWireframe, Matrix4d t) Draw a supershape around the origin (0/0/0).void
drawTextBlock
(String caption, Font font, float depth, Shader s, int highlight, boolean asWireframe, Matrix4d t) float
estimateScaleAt
(Tuple3f point) void
fillRectangle
(int x, int y, int w, int h, Tuple3f color) int
getFontMetrics
(Font font) getPool()
boolean
getWindowPos
(Tuple3f location, Tuple2f out) Computes the window coordinates in pixels of a location in the current object coordinates.
-
Field Details
-
CURRENT_HIGHLIGHT
static final int CURRENT_HIGHLIGHTPassed ashighlight
-parameter to thedraw
-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
-
getCurrentHighlight
int getCurrentHighlight() -
estimateScaleAt
-
getCurrentShader
Shader getCurrentShader() -
drawPoint
-
drawPointCloud
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 pointspointSize
- size of the point on screencolor
- color of the pointhighlight
-t
- transformation of the point cloud
-
drawLine
-
drawParallelogram
-
drawPlane
-
drawSphere
-
drawTextBlock
-
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 curvesm
- , n shape parametersshader
-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
- amplitudeb
- frequencys
-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
Computes the window coordinates in pixels of a location in the current object coordinates.- Parameters:
location
- a location in local object coordinatesout
- 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
-
fillRectangle
-
drawString
-
drawFrustumIrregular
-
drawSphereSegmentSolid
-