de.jreality.geometry
Class IndexedLineSetFactory

java.lang.Object
  extended by de.jreality.geometry.AbstractGeometryFactory
      extended by de.jreality.geometry.AbstractPointSetFactory
          extended by de.jreality.geometry.AbstractIndexedLineSetFactory
              extended by de.jreality.geometry.IndexedLineSetFactory
All Implemented Interfaces:
GeometryFactory

public class IndexedLineSetFactory
extends AbstractIndexedLineSetFactory

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

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.

Author:
gunn

Constructor Summary
IndexedLineSetFactory()
           
 
Method Summary
 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(java.awt.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(java.lang.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(java.awt.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(java.lang.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.AbstractIndexedLineSetFactory
getEdgeCount, getIndexedLineSet, getLineCount, isGenerateEdgeLabels, setGenerateEdgeLabels, setLineCount
 
Methods inherited from class de.jreality.geometry.AbstractPointSetFactory
getPointSet, getVertexCount, isGenerateVertexLabels, setGenerateVertexLabels
 
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

IndexedLineSetFactory

public IndexedLineSetFactory()
Method Detail

setVertexCount

public void setVertexCount(int count)
Overrides:
setVertexCount in class AbstractPointSetFactory

setVertexAttribute

public void setVertexAttribute(Attribute attr,
                               DataList data)

setVertexAttribute

public void setVertexAttribute(Attribute attr,
                               double[] data)

setVertexAttribute

public void setVertexAttribute(Attribute attr,
                               double[][] data)
Overrides:
setVertexAttribute in class AbstractPointSetFactory

setVertexAttributes

public void setVertexAttributes(DataListSet dls)

setVertexCoordinates

public void setVertexCoordinates(DataList data)

setVertexCoordinates

public void setVertexCoordinates(double[] data)

setVertexCoordinates

public void setVertexCoordinates(double[][] data)

setVertexNormals

public void setVertexNormals(DataList data)

setVertexNormals

public void setVertexNormals(double[] data)

setVertexNormals

public void setVertexNormals(double[][] data)

setVertexColors

public void setVertexColors(DataList data)

setVertexColors

public void setVertexColors(double[] data)

setVertexColors

public void setVertexColors(java.awt.Color[] data)

setVertexColors

public void setVertexColors(double[][] data)

setVertexTextureCoordinates

public void setVertexTextureCoordinates(DataList data)

setVertexTextureCoordinates

public void setVertexTextureCoordinates(double[] data)

setVertexTextureCoordinates

public void setVertexTextureCoordinates(double[][] data)

setVertexLabels

public void setVertexLabels(java.lang.String[] data)

setVertexRelativeRadii

public void setVertexRelativeRadii(double[] data)

setEdgeCount

public void setEdgeCount(int count)

setEdgeAttribute

public 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


setEdgeAttribute

public void setEdgeAttribute(Attribute attr,
                             double[] data)

setEdgeAttribute

public void setEdgeAttribute(Attribute attr,
                             double[][] data)

setEdgeIndices

public void setEdgeIndices(DataList data)

setEdgeIndices

public void setEdgeIndices(int[][] data)

setEdgeIndices

public void setEdgeIndices(int[] data,
                           int pointCountPerLine)

setEdgeIndices

public void setEdgeIndices(int[] data)

setEdgeColors

public void setEdgeColors(DataList data)

setEdgeColors

public void setEdgeColors(double[] data)

setEdgeColors

public void setEdgeColors(java.awt.Color[] data)

setEdgeColors

public void setEdgeColors(double[][] data)

setEdgeLabels

public void setEdgeLabels(java.lang.String[] data)

setEdgeRelativeRadii

public void setEdgeRelativeRadii(double[] data)