java.lang.Object
de.grogra.imp3d.VolumeBuilderBase
de.grogra.gpuflux.scene.volume.FluxVolumeBuilder
- All Implemented Interfaces:
RenderState
- Author:
- Dietger van Antwerpen
-
Field Summary
Fields inherited from class de.grogra.imp3d.VolumeBuilderBase
epsilon, polyCacheFields inherited from interface de.grogra.imp3d.RenderState
CURRENT_HIGHLIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected abstract voidaddPrimitive(FluxPrimitive prim) protected abstract voidaddPrimitives(Vector<FluxPrimitive> primitives) voiddrawBox(float halfWidth, float halfLength, float height, Shader s, int highlight, boolean asWireframe, Matrix4d t) voiddrawFrustum(float height, float baseRadius, float topRadius, boolean baseClosed, boolean topClosed, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) voiddrawFrustumIrregular(float height, int sectorCount, float[] baseRadii, float[] topRadii, boolean baseClosed, boolean topclosed, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) voiddrawLamella(float halfWidth, float halfLength, float height, float a, float b, Shader s, int highlight, boolean asWireframe, Matrix4d t) voidvoiddrawParallelogram(float length, Vector3f faxis, float scaleU, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) voidvoidvoiddrawPointCloud(float[] locations, float pointSize, Tuple3f color, int highlight, Matrix4d t) Draw a set of points.voiddrawPolygons(Polygonizable polygons, Object obj, boolean asNode, Shader s, int highlight, boolean asWireframe, Matrix4d t) voiddrawPrismRectangular(float y, float xPos, float xNeg, float zPos, float zNeg, int highlight, boolean asWireframe, Matrix4d t) voiddrawRectangle(int x, int y, int w, int h, Tuple3f color) voiddrawSphere(float radius, Shader s, int highlight, boolean asWireframe, Matrix4d t) voiddrawSphereSegmentSolid(float radius, float theta1, float theta2, float phi, Shader s, int highlight, boolean asWireframe, Matrix4d t) voiddrawString(int x, int y, String text, Font font, Tuple3f color) voiddrawSupershape(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).voiddrawTextBlock(String caption, Font font, float depth, Shader s, int highlight, boolean asWireframe, Matrix4d t) floatestimateScaleAt(Tuple3f point) voidfillRectangle(int x, int y, int w, int h, Tuple3f color) voidfinish()intgetFontMetrics(Font font) getPool()booleangetWindowPos(Tuple3f location, Tuple2f out) Computes the window coordinates in pixels of a location in the current object coordinates.voidsetVertices(Vector<FluxVertex> vertices) Methods inherited from class de.grogra.imp3d.VolumeBuilderBase
buildBaseFrustum, buildBox, buildFrustum, buildLamella, buildParallelogram, buildPlane, buildPolygons, buildSphere, buildSphereSegment, buildSupershape, getCurrentTransformation, getTransformation, setInvTransformation
-
Constructor Details
-
FluxVolumeBuilder
-
-
Method Details
-
getRenderGraphState
- Specified by:
getRenderGraphStatein interfaceRenderState
-
getPool
- Specified by:
getPoolin interfaceRenderState
-
getFontMetrics
- Specified by:
getFontMetricsin interfaceRenderState
-
getCurrentHighlight
public int getCurrentHighlight()- Specified by:
getCurrentHighlightin interfaceRenderState
-
estimateScaleAt
- Specified by:
estimateScaleAtin interfaceRenderState
-
getCurrentShader
- Specified by:
getCurrentShaderin interfaceRenderState
-
drawPoint
- Specified by:
drawPointin interfaceRenderState
-
drawPointCloud
public void drawPointCloud(float[] locations, float pointSize, Tuple3f color, int highlight, Matrix4d t) Description copied from interface:RenderStateDraw 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.- Specified by:
drawPointCloudin interfaceRenderState- 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
- Specified by:
drawLinein interfaceRenderState
-
drawParallelogram
public void drawParallelogram(float length, Vector3f faxis, float scaleU, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawParallelogramin interfaceRenderState
-
drawPlane
- Specified by:
drawPlanein interfaceRenderState
-
drawSphere
- Specified by:
drawSpherein interfaceRenderState
-
drawSphereSegmentSolid
public void drawSphereSegmentSolid(float radius, float theta1, float theta2, float phi, Shader s, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawSphereSegmentSolidin interfaceRenderState
-
drawTextBlock
public void drawTextBlock(String caption, Font font, float depth, Shader s, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawTextBlockin interfaceRenderState
-
drawSupershape
public 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) Description copied from interface:RenderStateDraw 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- Specified by:
drawSupershapein interfaceRenderState- Parameters:
a- , b length of curveshighlight-t- transformation of the point cloud
-
drawBox
public void drawBox(float halfWidth, float halfLength, float height, Shader s, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawBoxin interfaceRenderState- Parameters:
halfWidth-halfLength-height-s-highlight-t-
-
drawLamella
public void drawLamella(float halfWidth, float halfLength, float height, float a, float b, Shader s, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawLamellain interfaceRenderState- Parameters:
halfWidth-halfLength-height-a- amplitudeb- frequencys-highlight-t-
-
drawFrustum
public void drawFrustum(float height, float baseRadius, float topRadius, boolean baseClosed, boolean topClosed, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawFrustumin interfaceRenderState- Parameters:
height-baseRadius-topRadius-baseClosed-topClosed-scaleV-s-highlight-t-
-
drawPolygons
public void drawPolygons(Polygonizable polygons, Object obj, boolean asNode, Shader s, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawPolygonsin interfaceRenderState- Parameters:
polygons-obj-asNode-s-highlight-t-
-
finish
public void finish() -
addPrimitives
-
getWindowPos
Description copied from interface:RenderStateComputes the window coordinates in pixels of a location in the current object coordinates.- Specified by:
getWindowPosin interfaceRenderState- Parameters:
location- a location in local object coordinatesout- the computed window coordinates are placed in here- Returns:
trueiff the window coordinates are valid (i.e., the location is in the clipping region)
-
drawRectangle
- Specified by:
drawRectanglein interfaceRenderState
-
fillRectangle
- Specified by:
fillRectanglein interfaceRenderState
-
drawString
- Specified by:
drawStringin interfaceRenderState
-
addPrimitive
-
addInfinitePrimitive
-
setVertices
-
getVertices
-
drawFrustumIrregular
public void drawFrustumIrregular(float height, int sectorCount, float[] baseRadii, float[] topRadii, boolean baseClosed, boolean topclosed, float scaleV, Shader s, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawFrustumIrregularin interfaceRenderState
-
drawPrismRectangular
public void drawPrismRectangular(float y, float xPos, float xNeg, float zPos, float zNeg, int highlight, boolean asWireframe, Matrix4d t) - Specified by:
drawPrismRectangularin interfaceRenderState- Parameters:
y-xPos-xNeg-zPos-zNeg-highlight-t-
-