public class IndexedLineSetFactory extends AbstractIndexedLineSetFactory
IndexedLineSet
. For an introduction
to the way these geometry factories work, see the documentation for the superclass PointSetFactory
.
In addition to the functionality inherited from PointSetFactory, this class offers methods to set and edit
the edge information of an IndexedLineSet. (Here edge is synonymous with 'line'.) This is first and foremost
an array of type int[][]
which specifies the combinatorics: which vertices are connected by edges.
First call setEdgeCount(int)
to set the number of edges, then
use the method setEdgeIndices(int[][])
and its variants to set this information.
There are also methods for setting the builtin attributes colors and labels. For other attributes, use the methods: * For attributes not included in the built-in set, use the methods
setEdgeAttribute(Attribute, DataList)
setEdgeAttribute(Attribute, double[])
setEdgeAttribute(Attribute, double[][])
You can also request the factory to automatically generate edge labels (which are strings displayed
as 3D text at the midpoint of the edges) using the method AbstractIndexedLineSetFactory.setGenerateEdgeLabels(boolean)
. This
will generate labels showing the index of the edge within the edge array. (Probably only works correctly
when all edges consist of two points).
For an example, see this tutorial.
Constructor and Description |
---|
IndexedLineSetFactory() |
Modifier and Type | Method and Description |
---|---|
void |
setEdgeAttribute(Attribute attr,
DataList data)
It's not documented why, but the superclass methods are protected, so we
have to implement these as public
|
void |
setEdgeAttribute(Attribute attr,
double[] data) |
void |
setEdgeAttribute(Attribute attr,
double[][] data) |
void |
setEdgeColors(Color[] data) |
void |
setEdgeColors(DataList data) |
void |
setEdgeColors(double[] data) |
void |
setEdgeColors(double[][] data) |
void |
setEdgeCount(int count) |
void |
setEdgeIndices(DataList data) |
void |
setEdgeIndices(int[] data) |
void |
setEdgeIndices(int[][] data) |
void |
setEdgeIndices(int[] data,
int pointCountPerLine) |
void |
setEdgeLabels(String[] data) |
void |
setEdgeRelativeRadii(double[] data) |
void |
setVertexAttribute(Attribute attr,
DataList data) |
void |
setVertexAttribute(Attribute attr,
double[] data) |
void |
setVertexAttribute(Attribute attr,
double[][] data) |
void |
setVertexAttributes(DataListSet dls) |
void |
setVertexColors(Color[] data) |
void |
setVertexColors(DataList data) |
void |
setVertexColors(double[] data) |
void |
setVertexColors(double[][] data) |
void |
setVertexCoordinates(DataList data) |
void |
setVertexCoordinates(double[] data) |
void |
setVertexCoordinates(double[][] data) |
void |
setVertexCount(int count) |
void |
setVertexLabels(String[] data) |
void |
setVertexNormals(DataList data) |
void |
setVertexNormals(double[] data) |
void |
setVertexNormals(double[][] data) |
void |
setVertexRelativeRadii(double[] data) |
void |
setVertexTextureCoordinates(DataList data) |
void |
setVertexTextureCoordinates(double[] data) |
void |
setVertexTextureCoordinates(double[][] data) |
getEdgeCount, getIndexedLineSet, getLineCount, isGenerateEdgeLabels, setGenerateEdgeLabels, setLineCount
getPointSet, getVertexCount, isGenerateVertexLabels, setGenerateVertexLabels
getGeometry, getMetric, setMetric, update
public void setVertexCount(int count)
setVertexCount
in class AbstractPointSetFactory
public void setVertexAttribute(Attribute attr, double[] data)
public void setVertexAttribute(Attribute attr, double[][] data)
setVertexAttribute
in class AbstractPointSetFactory
public void setVertexAttributes(DataListSet dls)
public void setVertexCoordinates(DataList data)
public void setVertexCoordinates(double[] data)
public void setVertexCoordinates(double[][] data)
public void setVertexNormals(DataList data)
public void setVertexNormals(double[] data)
public void setVertexNormals(double[][] data)
public void setVertexColors(DataList data)
public void setVertexColors(double[] data)
public void setVertexColors(Color[] data)
public void setVertexColors(double[][] data)
public void setVertexTextureCoordinates(DataList data)
public void setVertexTextureCoordinates(double[] data)
public void setVertexTextureCoordinates(double[][] data)
public void setVertexLabels(String[] data)
public void setVertexRelativeRadii(double[] data)
public void setEdgeCount(int count)
public void setEdgeAttribute(Attribute attr, DataList data)
public void setEdgeAttribute(Attribute attr, double[] data)
public void setEdgeAttribute(Attribute attr, double[][] data)
public void setEdgeIndices(DataList data)
public void setEdgeIndices(int[][] data)
public void setEdgeIndices(int[] data, int pointCountPerLine)
public void setEdgeIndices(int[] data)
public void setEdgeColors(DataList data)
public void setEdgeColors(double[] data)
public void setEdgeColors(Color[] data)
public void setEdgeColors(double[][] data)
public void setEdgeLabels(String[] data)
public void setEdgeRelativeRadii(double[] data)