Package edu.cnu.mdi.mdi3D.item3D
Class Axis3D
java.lang.Object
edu.cnu.mdi.mdi3D.item3D.Item3D
edu.cnu.mdi.mdi3D.item3D.Line3D
edu.cnu.mdi.mdi3D.item3D.Axis3D
A single Cartesian axis: a
Line3D from vmin to vmax
along one of the Axis3D.AxisType directions, with major tick marks (added
as Line3D children) and a lazily-created TextRenderer for
the axis label and per-tick value labels.-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class edu.cnu.mdi.mdi3D.item3D.Line3D
_p0, _p1, _unitVector, lengthFields inherited from class edu.cnu.mdi.mdi3D.item3D.Item3D
_panel3D, FILLALPHA, FILLCOLOR, FONT, LINE_WIDTH, LINEALPHA, LINECOLOR, TEXT_COLOR -
Constructor Summary
ConstructorsConstructorDescriptionAxis3D(Panel3D panel3D, Axis3D.AxisType type, String label, float vmin, float vmax, float offset, Color color, float lineWidth, int numTicks, Color tickColor, Color textColor, Font font, int numDec) Create a coordinate axisAxis3D(Panel3D panel3D, Axis3D.AxisType type, String label, float vmin, float vmax, Color color, float lineWidth, int numTicks, Color tickColor, Color textColor, Font font, int numDec) Create a coordinate axis -
Method Summary
Methods inherited from class edu.cnu.mdi.mdi3D.item3D.Line3D
extendedPoint, getSortPoint, getX0, getX1, getY0, getY1, getZ0, getZ1, lineItemTestMethods inherited from class edu.cnu.mdi.mdi3D.item3D.Item3D
addChild, defaultProperties, disposeItem, drawItem, get, getChildren, getColor, getFillAlpha, getFillColor, getFloat, getFont, getFont, getInt, getLineAlpha, getLineColor, getLineWidth, getPanel3D, getParent, getString, getTextColor, isVisible, put, removeChild, setAlphaOfColor, setFillAlpha, setFillColor, setFont, setLineAlpha, setLineColor, setLineWidth, setTextColor, setVisible
-
Constructor Details
-
Axis3D
public Axis3D(Panel3D panel3D, Axis3D.AxisType type, String label, float vmin, float vmax, Color color, float lineWidth, int numTicks, Color tickColor, Color textColor, Font font, int numDec) Create a coordinate axis- Parameters:
panel3D- the owner 3D paneltype- the typelabel- axis label; ifnull, defaults to "x"/"y"/"z" based ontypevmin- the minimum valuevmax- the maximum valuecolor- the color of the axeslineWidth- the line widthnumTicks- the number of tickstickColor- the color of the tickstextColor- the text colorfont- the text fontnumDec- the number of decimals to display
-
Axis3D
public Axis3D(Panel3D panel3D, Axis3D.AxisType type, String label, float vmin, float vmax, float offset, Color color, float lineWidth, int numTicks, Color tickColor, Color textColor, Font font, int numDec) Create a coordinate axis- Parameters:
panel3D- the owner 3D paneltype- the typelabel- axis label; ifnull, defaults to "x"/"y"/"z" based ontypevmin- the minimum valuevmax- the maximum valueoffset- value added to each tick label (does not affect drawn geometry)color- the color of the axeslineWidth- the line widthnumTicks- the number of tickstickColor- the color of the tickstextColor- the text colorfont- the text fontnumDec- the number of decimals to display
-
-
Method Details
-
dispose
protected void dispose(com.jogamp.opengl.GLAutoDrawable drawable) Releases the lazily-created tick-labelTextRendererand its GPU texture atlas. -
draw
public void draw(com.jogamp.opengl.GLAutoDrawable drawable) Description copied from class:Item3DThe custom drawing method -
getType
Get the type of axis- Returns:
- the type of axis
-