org.jzy3d.plot3d.primitives.axes
Class AxeBox
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.axes.AxeBox
-
- All Implemented Interfaces:
- IAxe
- Direct Known Subclasses:
- AxeBox2d, AxeBoxWithTxtRenderer, ContourAxeBox, FeedbackBufferAxeBox, LogAxeBox
public class AxeBox extends java.lang.Object implements IAxe
The AxeBox displays a box with front face invisible and ticks labels.
-
-
Field Summary
Fields Modifier and Type Field and Description static intAXE_Xstatic intAXE_Ystatic intAXE_Z
-
Constructor Summary
Constructors Constructor and Description AxeBox(BoundingBox3d bbox)AxeBox(BoundingBox3d bbox, IAxeLayout layout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddAnnotation(AxeAnnotation annotation)voidcullingDisable(com.jogamp.opengl.GL gl)voidcullingEnable(com.jogamp.opengl.GL gl)voiddispose()voiddoTransform(com.jogamp.opengl.GL gl)reset to identity and apply scalingvoiddraw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)Draws the AxeBox.voiddrawAxisLabel(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam, int direction, Color color, BoundingBox3d ticksTxtBounds, double xlab, double ylab, double zlab, java.lang.String axeLabel)voiddrawAxisTickNumericLabel(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, int direction, Camera cam, Color color, Halign hAlign, Valign vAlign, BoundingBox3d ticksTxtBounds, java.lang.String tickLabel, Coord3d tickPosition)voiddrawAxisTicks(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam, int direction, Color color, Halign hal, Valign val, float tickLength, BoundingBox3d ticksTxtBounds, double xpos, double ypos, double zpos, float xdir, float ydir, float zdir, double[] ticks)voiddrawFace(com.jogamp.opengl.GL gl)voiddrawGrid(com.jogamp.opengl.GL gl)voiddrawTickLine(com.jogamp.opengl.GL gl, Color color, double xpos, double ypos, double zpos, double xlab, double ylab, double zlab)voiddrawTicksAndLabels(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)voiddrawTicksAndLabelsX(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)voiddrawTicksAndLabelsY(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)voiddrawTicksAndLabelsZ(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)java.util.List<AxeAnnotation>getAnnotations()double[]getAxisTicks(int direction)BoundingBox3dgetBoxBounds()Coord3dgetCenter()IAxeLayoutgetLayout()Coord3dgetScale()SpaceTransformergetSpaceTransformer()ITextRenderergetTextRenderer()ViewgetView()BoundingBox3dgetWholeBounds()Return the boundingBox of this axis, including the volume occupied by the texts.booleanisX(int direction)booleanisXDisplayed(int direction)booleanisY(int direction)booleanisYDisplayed(int direction)booleanisZ(int direction)booleanisZDisplayed(int direction)HalignlayoutHorizontal(int direction, Camera cam, Halign hal, Coord3d tickPosition)ValignlayoutVertical(int direction, Valign val, float zdir)voidsetAnnotations(java.util.List<AxeAnnotation> annotations)voidsetAxe(BoundingBox3d bbox)voidsetLineWidth(int pwidth)Set line width to draw boxes and axis.voidsetScale(Coord3d scale)Set the scaling factor that are applyed on this object before GL2 commands.voidsetSpaceTransformer(SpaceTransformer spaceTransformer)voidsetTextRenderer(ITextRenderer renderer)voidsetView(View view)When setting a current view, the AxeBox can know the view is on mode CameraMode.TOP, and optimize some axis placement.voidupdateHiddenQuads(com.jogamp.opengl.GL gl, Camera camera)
-
-
-
Field Detail
-
AXE_X
public static final int AXE_X
- See Also:
- Constant Field Values
-
AXE_Y
public static final int AXE_Y
- See Also:
- Constant Field Values
-
AXE_Z
public static final int AXE_Z
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AxeBox
public AxeBox(BoundingBox3d bbox)
-
AxeBox
public AxeBox(BoundingBox3d bbox, IAxeLayout layout)
-
-
Method Detail
-
getAnnotations
public java.util.List<AxeAnnotation> getAnnotations()
- Specified by:
getAnnotationsin interfaceIAxe
-
setAnnotations
public void setAnnotations(java.util.List<AxeAnnotation> annotations)
- Specified by:
setAnnotationsin interfaceIAxe
-
addAnnotation
public void addAnnotation(AxeAnnotation annotation)
-
setLineWidth
public void setLineWidth(int pwidth)
Set line width to draw boxes and axis.- Parameters:
pwidth- with of the pen to draw boxes etc.
-
draw
public void draw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)Draws the AxeBox. The camera is used to determine which axis is closest to the ur point ov view, in order to decide for an axis on which to diplay the tick values.
-
doTransform
public void doTransform(com.jogamp.opengl.GL gl)
reset to identity and apply scaling
-
cullingDisable
public void cullingDisable(com.jogamp.opengl.GL gl)
-
cullingEnable
public void cullingEnable(com.jogamp.opengl.GL gl)
-
drawFace
public void drawFace(com.jogamp.opengl.GL gl)
-
drawGrid
public void drawGrid(com.jogamp.opengl.GL gl)
-
drawTicksAndLabels
public void drawTicksAndLabels(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)
-
drawTicksAndLabelsX
public void drawTicksAndLabelsX(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)
-
drawTicksAndLabelsY
public void drawTicksAndLabelsY(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)
-
drawTicksAndLabelsZ
public void drawTicksAndLabelsZ(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)
-
drawAxisLabel
public void drawAxisLabel(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam, int direction, Color color, BoundingBox3d ticksTxtBounds, double xlab, double ylab, double zlab, java.lang.String axeLabel)
-
isZDisplayed
public boolean isZDisplayed(int direction)
-
isYDisplayed
public boolean isYDisplayed(int direction)
-
isXDisplayed
public boolean isXDisplayed(int direction)
-
isZ
public boolean isZ(int direction)
-
isY
public boolean isY(int direction)
-
isX
public boolean isX(int direction)
-
getAxisTicks
public double[] getAxisTicks(int direction)
-
drawAxisTicks
public void drawAxisTicks(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam, int direction, Color color, Halign hal, Valign val, float tickLength, BoundingBox3d ticksTxtBounds, double xpos, double ypos, double zpos, float xdir, float ydir, float zdir, double[] ticks)
-
drawAxisTickNumericLabel
public void drawAxisTickNumericLabel(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, int direction, Camera cam, Color color, Halign hAlign, Valign vAlign, BoundingBox3d ticksTxtBounds, java.lang.String tickLabel, Coord3d tickPosition)
-
layoutHorizontal
public Halign layoutHorizontal(int direction, Camera cam, Halign hal, Coord3d tickPosition)
-
drawTickLine
public void drawTickLine(com.jogamp.opengl.GL gl, Color color, double xpos, double ypos, double zpos, double xlab, double ylab, double zlab)
-
updateHiddenQuads
public void updateHiddenQuads(com.jogamp.opengl.GL gl, Camera camera)
-
getTextRenderer
public ITextRenderer getTextRenderer()
-
setTextRenderer
public void setTextRenderer(ITextRenderer renderer)
-
getView
public View getView()
-
getBoxBounds
public BoundingBox3d getBoxBounds()
- Specified by:
getBoxBoundsin interfaceIAxe
-
getLayout
public IAxeLayout getLayout()
-
getSpaceTransformer
public SpaceTransformer getSpaceTransformer()
- Specified by:
getSpaceTransformerin interfaceIAxe
-
setSpaceTransformer
public void setSpaceTransformer(SpaceTransformer spaceTransformer)
- Specified by:
setSpaceTransformerin interfaceIAxe
-
setView
public void setView(View view)
When setting a current view, the AxeBox can know the view is on mode CameraMode.TOP, and optimize some axis placement.
-
setAxe
public void setAxe(BoundingBox3d bbox)
-
getWholeBounds
public BoundingBox3d getWholeBounds()
Return the boundingBox of this axis, including the volume occupied by the texts. This requires callingdraw()before, which computes actual ticks position in 3d, and updates the bounds.
-
setScale
public void setScale(Coord3d scale)
Set the scaling factor that are applyed on this object before GL2 commands.
-
-
DMelt 3.0 © DataMelt by jWork.ORG