public class GridPlane extends java.lang.Object implements HasProperties
Modifier and Type | Class and Description |
---|---|
static class |
GridPlane.AxisLabeling |
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
DEFAULT_LABEL_COLOR |
static double |
DEFAULT_LABEL_SIZE |
static boolean |
DEFAULT_LOCK_AXES_TO_WORLD |
static boolean |
DEFAULT_USE_WORLD_ORIGIN |
static GridPlane.AxisLabeling |
DEFAULT_X_AXIS_LABELING |
static GridPlane.AxisLabeling |
DEFAULT_Y_AXIS_LABELING |
static PropertyList |
myProps |
Constructor and Description |
---|
GridPlane() |
Modifier and Type | Method and Description |
---|---|
void |
alignPoint(Vector3d aligned,
Vector3d pnt)
Aligns a point with the nearest point defined by this grid.
|
void |
centerInViewer() |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
int |
getCellDivisions()
Returns the number of subdivisions for each cell.
|
double |
getCellSize()
Returns the cell size for this grid.
|
Dragger3d.DraggerType |
getDragger() |
RigidTransform3d |
getGridToWorld() |
void |
getGridToWorld(RigidTransform3d X) |
java.awt.Color |
getLabelColor() |
double |
getLabelSize() |
int |
getLineWidth()
Returns the line width used to render this grid.
|
boolean |
getLockAxesToWorld() |
java.awt.Color |
getMajorColor() |
int |
getMinCellPixels()
Returns the desired minimum number of pixels per cell or divided cell.
|
java.awt.Color |
getMinorColor() |
double |
getMinSize() |
AxisAngle |
getOrientation() |
Plane |
getPlane() |
void |
getPlane(Plane plane) |
void |
getPlaneValues(double[] vals) |
int |
getPlaneValues(float[] vals,
int offset) |
Point3d |
getPosition() |
Property |
getProperty(java.lang.String name)
Returns a property associated with a specified path name.
|
GridResolution |
getResolution()
Retuns the resolution for this grid.
|
boolean |
getUseWorldOrigin() |
GLViewer |
getViewer() |
java.awt.Color |
getXAxisColor() |
GridPlane.AxisLabeling |
getXAxisLabeling() |
java.awt.Color |
getYAxisColor() |
GridPlane.AxisLabeling |
getYAxisLabeling() |
java.awt.Color |
getZAxisColor() |
boolean |
isAutoSized()
Returns true is cell sizes for this grid are computed automatically.
|
boolean |
isGridVisible() |
static void |
main(java.lang.String[] args) |
int |
numCellDivisions()
Returns the number of subdivisions for each cell.
|
void |
render(Renderer renderer,
int flags) |
void |
resetInViewer() |
void |
setAutoSized(boolean enable)
Enables or disables auto cell sizing for this grid.
|
void |
setDragger(Dragger3d.DraggerType type) |
void |
setGridToWorld(RigidTransform3d TGW) |
void |
setGridVisible(boolean enable) |
void |
setLabelColor(java.awt.Color color) |
void |
setLabelSize(double emSize) |
void |
setLineWidth(int width)
Sets the line width used to render this grid.
|
void |
setLockAxesToWorld(boolean enable) |
void |
setMajorColor(java.awt.Color color) |
void |
setMinCellPixels(int n)
Sets the desired minimum number of pixels per cell or divided cell.
|
void |
setMinorColor(java.awt.Color color) |
double |
setMinSize(double size)
Sets the minimum grid size.
|
void |
setOrientation(AxisAngle axisAng) |
void |
setPosition(Point3d pos) |
void |
setResolution(double majorCellSize,
int numDivisions)
Sets the resolution for this grid.
|
void |
setResolution(GridResolution res)
Sets the resolution for this grid.
|
void |
setUseWorldOrigin(boolean enable) |
void |
setViewer(GLViewer viewer) |
void |
setXAxisColor(java.awt.Color color) |
void |
setXAxisLabeling(GridPlane.AxisLabeling labeling) |
void |
setYAxisColor(java.awt.Color color) |
void |
setYAxisLabeling(GridPlane.AxisLabeling labeling) |
void |
setZAxisColor(java.awt.Color color) |
public static boolean DEFAULT_LOCK_AXES_TO_WORLD
public static boolean DEFAULT_USE_WORLD_ORIGIN
public static GridPlane.AxisLabeling DEFAULT_X_AXIS_LABELING
public static GridPlane.AxisLabeling DEFAULT_Y_AXIS_LABELING
public static double DEFAULT_LABEL_SIZE
public static final java.awt.Color DEFAULT_LABEL_COLOR
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
public Property getProperty(java.lang.String name)
.
' characters. A sub-property
exists if the value of a property is itself an object which exports
properties. It is only possible to obtain a sub-property handle if each of
its ancestor properties exports their values by reference.getProperty
in interface HasProperties
name
- name of the desired property or sub-propertypublic int getMinCellPixels()
public void setMinCellPixels(int n)
n
- minimum pixels for each cell or divided cellpublic double getCellSize()
public void setLineWidth(int width)
width
- new line widthpublic int getLineWidth()
public boolean getLockAxesToWorld()
public void setLockAxesToWorld(boolean enable)
public Point3d getPosition()
public void setPosition(Point3d pos)
public AxisAngle getOrientation()
public void setOrientation(AxisAngle axisAng)
public void setResolution(double majorCellSize, int numDivisions)
If the major cell size is 0, then auto-sizing will be enabled and the grid size will be computed automatically, based on the viewer's current zoom level. Otherwise, auto-sizing will be turned off.
majorCellSize
- major cell sizenumDivisions
- number of divisions per cellpublic void setResolution(GridResolution res)
res
specifies the major cell size and the number of
subdivisions per cell.
If the major cell size is 0, then auto-sizing will be enabled and the grid size will be computed automatically, based on the viewer's current zoom level. Otherwise, auto-sizing will be turned off.
res
- specified new grid resolution, or auto-sizing.public GridResolution getResolution()
public boolean isAutoSized()
public void setAutoSized(boolean enable)
enable
- if true, enables auto cell sizingpublic int numCellDivisions()
public int getCellDivisions()
public double setMinSize(double size)
public double getMinSize()
public RigidTransform3d getGridToWorld()
public void alignPoint(Vector3d aligned, Vector3d pnt)
public void setGridToWorld(RigidTransform3d TGW)
public void getGridToWorld(RigidTransform3d X)
public void setViewer(GLViewer viewer)
public GLViewer getViewer()
public Dragger3d.DraggerType getDragger()
public void setDragger(Dragger3d.DraggerType type)
public boolean isGridVisible()
public void setGridVisible(boolean enable)
public void render(Renderer renderer, int flags)
public void getPlane(Plane plane)
public Plane getPlane()
public void getPlaneValues(double[] vals)
public int getPlaneValues(float[] vals, int offset)
public void centerInViewer()
public void resetInViewer()
public java.awt.Color getMajorColor()
public void setMajorColor(java.awt.Color color)
public boolean getUseWorldOrigin()
public void setUseWorldOrigin(boolean enable)
public GridPlane.AxisLabeling getXAxisLabeling()
public void setXAxisLabeling(GridPlane.AxisLabeling labeling)
public GridPlane.AxisLabeling getYAxisLabeling()
public void setYAxisLabeling(GridPlane.AxisLabeling labeling)
public void setLabelSize(double emSize)
public double getLabelSize()
public void setLabelColor(java.awt.Color color)
public java.awt.Color getLabelColor()
public java.awt.Color getXAxisColor()
public void setXAxisColor(java.awt.Color color)
public java.awt.Color getYAxisColor()
public void setYAxisColor(java.awt.Color color)
public java.awt.Color getZAxisColor()
public void setZAxisColor(java.awt.Color color)
public java.awt.Color getMinorColor()
public void setMinorColor(java.awt.Color color)
public static void main(java.lang.String[] args)