|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gwoptics.graphics.Renderable org.gwoptics.graphics.graph3D.Axis3D
public class Axis3D
Axis3D class produces 3D axes with many variable properties to suite any need. The axis can be be directed in any direction ,though it is more common to use <1,0,0>, <0,1,0> or <0,0,1>, using setAxesDirection(). The axis has full tick functionality using both major and minor ticks, with labels for values along the axis shown for each major tick. As the axis is 3D you must specify which plane the labels and ticks must be drawn using setLabelDirection(). Unless strange looking axes are required it is recommended to use a label direction which is orthogonal to the axis direction. As Axis3D extends Renderable it has a position member which can be used to position where the axis is. Both the axis label and tick labels can be rotated using the given functions to generate the required layout of the axis. History Version 0.3.8 Added billboarding to the tick labels, must be used with Camera3D class though.
Field Summary |
---|
Fields inherited from class org.gwoptics.graphics.Renderable |
---|
position |
Fields inherited from interface processing.core.PConstants |
---|
A, AB, ADD, AG, ALPHA, ALPHA_MASK, ALT, AMBIENT, AR, ARC, ARGB, ARROW, B, BACKSPACE, BASELINE, BEEN_LIT, BEVEL, BLEND, BLUE_MASK, BLUR, BOTTOM, BOX, BURN, CENTER, CENTER_DIAMETER, CENTER_RADIUS, CHATTER, CLOSE, CMYK, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CUSTOM, DA, DARKEST, DB, DEG_TO_RAD, DELETE, DG, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ACCURATE_TEXTURES, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_OPENGL_2X_SMOOTH, DISABLE_OPENGL_ERROR_REPORT, DODGE, DOWN, DR, DXF, EB, EDGE, EG, ELLIPSE, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_2X_SMOOTH, ENABLE_OPENGL_4X_SMOOTH, ENABLE_OPENGL_ERROR_REPORT, ENTER, EPSILON, ER, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, G, GIF, GRAY, GREEN_MASK, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LEFT, LIGHTEST, LINE, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MOVE, MULTIPLY, NORMAL, NORMALIZED, NX, NY, NZ, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, platformNames, POINT, POINTS, POLYGON, POSTERIZE, PROBLEM, PROJECT, QUAD, QUAD_STRIP, QUADS, QUARTER_PI, R, RAD_TO_DEG, RADIUS, RECT, RED_MASK, REPLACE, RETURN, RGB, RIGHT, ROUND, SA, SB, SCREEN, SG, SHAPE, SHIFT, SHINE, SOFT_LIGHT, SPB, SPG, SPHERE, SPOT, SPR, SQUARE, SR, SUBTRACT, SW, TAB, TARGA, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, TX, TY, TZ, U, UP, V, VERTEX_FIELD_COUNT, VW, VX, VY, VZ, WAIT, WHITESPACE, WINDOWS, X, Y, Z |
Constructor Summary | |
---|---|
Axis3D(processing.core.PApplet parent)
|
Method Summary | |
---|---|
void |
draw()
This function starts rendering the axis to the properties that have been specified. |
float |
getLength()
returns the length of the axis in world space. |
float |
getMaxValue()
returns the maximum value of the axis range |
float |
getMinValue()
returns the minimum value of the axis range |
void |
setAxesDirection(processing.core.PVector uv)
|
void |
setAxisColour(GWColour c)
|
void |
setAxisColour(int R,
int G,
int B)
|
void |
setAxisLabel(java.lang.String lbl)
|
void |
setDraw(boolean value)
|
void |
setDrawAxisLabel(boolean value)
|
void |
setDrawLine(boolean value)
|
void |
setDrawTickLabels(boolean value)
|
void |
setDrawTicks(boolean value)
|
void |
setFontColour(GWColour c)
|
void |
setFontColour(int R,
int G,
int B)
|
void |
setLabelDirection(processing.core.PVector vlbl)
|
void |
setLabelOffset(float val)
|
void |
setLabelXRotation(float val)
|
void |
setLabelYRotation(float val)
|
void |
setLabelZRotation(float val)
|
void |
setLength(float l)
|
void |
setMajorTickLength(int val)
Sets the length of the major ticks, using a negative length extends ticks into the graph rather than to the labels |
void |
setMajorTicks(int t)
|
void |
setMaxValue(float val)
|
void |
setMinorTickLength(int val)
Sets the length of the minor ticks, using a negative length extends ticks into the graph rather than to the labels |
void |
setMinorTicks(int t)
|
void |
setMinValue(float val)
|
void |
setTickLabelAccuracy(int v)
|
void |
setTickLabelBillboarding(boolean value)
|
void |
setTickLabelType(ValueType v)
|
void |
setTickLabelXRotation(float val)
|
void |
setTickLabelYRotation(float val)
|
void |
setTickLabelZRotation(float val)
|
Methods inherited from class org.gwoptics.graphics.Renderable |
---|
setParent |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Axis3D(processing.core.PApplet parent)
Method Detail |
---|
public void setAxisColour(int R, int G, int B)
public void setAxisColour(GWColour c)
public void setFontColour(int R, int G, int B)
public void setFontColour(GWColour c)
public void setTickLabelBillboarding(boolean value)
public void setDraw(boolean value)
public void setDrawLine(boolean value)
public void setDrawTicks(boolean value)
public void setDrawTickLabels(boolean value)
public void setDrawAxisLabel(boolean value)
public void setAxisLabel(java.lang.String lbl)
public void setLabelOffset(float val)
public void setTickLabelXRotation(float val)
public void setTickLabelYRotation(float val)
public void setTickLabelZRotation(float val)
public void setLabelXRotation(float val)
public void setLabelYRotation(float val)
public void setLabelZRotation(float val)
public void setLabelDirection(processing.core.PVector vlbl)
public void setAxesDirection(processing.core.PVector uv)
public void setMajorTicks(int t)
public void setMinorTicks(int t)
public void setTickLabelType(ValueType v)
public void setTickLabelAccuracy(int v)
public void setMajorTickLength(int val)
val
- length of the major tickspublic void setMinorTickLength(int val)
val
- length of the major tickspublic void setMaxValue(float val)
public void setMinValue(float val)
public void setLength(float l)
public float getMaxValue()
public float getMinValue()
public float getLength()
public void draw()
draw
in interface IRenderable
draw
in class Renderable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |