|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jreality.geometry.AbstractGeometryFactory
de.jreality.geometry.IndexedLineSetFactory
public class IndexedLineSetFactory
This is a factory class for constructing and editing instances of 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 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 Summary | |
---|---|
IndexedLineSetFactory()
|
Method Summary | |
---|---|
int |
getEdgeCount()
|
IndexedLineSet |
getIndexedLineSet()
|
int |
getLineCount()
Deprecated. Use setEdgeCount(int) . |
PointSet |
getPointSet()
|
int |
getVertexCount()
|
boolean |
isGenerateEdgeLabels()
|
boolean |
isGenerateVertexLabels()
|
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 |
setGenerateEdgeLabels(boolean generateEdgeLabels)
|
void |
setGenerateVertexLabels(boolean generateVertexLabels)
|
void |
setLineCount(int count)
Deprecated. Use setEdgeCount(int) . |
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)
|
Methods inherited from class de.jreality.geometry.AbstractGeometryFactory |
---|
getGeometry, getMetric, setMetric, update |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexedLineSetFactory()
Method Detail |
---|
public void setVertexCount(int count)
public void setVertexAttribute(Attribute attr, DataList data)
public void setVertexAttribute(Attribute attr, double[] data)
public void setVertexAttribute(Attribute attr, double[][] data)
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)
public int getEdgeCount()
public int getLineCount()
setEdgeCount(int)
.
public void setLineCount(int count)
setEdgeCount(int)
.
public IndexedLineSet getIndexedLineSet()
public boolean isGenerateEdgeLabels()
public void setGenerateEdgeLabels(boolean generateEdgeLabels)
public int getVertexCount()
public PointSet getPointSet()
public boolean isGenerateVertexLabels()
public void setGenerateVertexLabels(boolean generateVertexLabels)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |