de.jreality.scene
Class IndexedLineSet

java.lang.Object
  extended by de.jreality.scene.SceneGraphNode
      extended by de.jreality.scene.Geometry
          extended by de.jreality.scene.PointSet
              extended by de.jreality.scene.IndexedLineSet
Direct Known Subclasses:
IndexedFaceSet

public class IndexedLineSet
extends PointSet

A geometric object consisting of a set of edges: lists of vertices joined by line segments.

Accessing instances of this class directly requires use of the class DataList. Users who prefer to avoid this are recommended to use IndexedLineSetFactory to construct instances of this class.

Author:
Tim Hoffmann, gunn

Field Summary
 
Fields inherited from class de.jreality.scene.Geometry
CATEGORY_EDGE, CATEGORY_FACE, CATEGORY_VERTEX
 
Constructor Summary
IndexedLineSet()
           
IndexedLineSet(int numPoints)
           
IndexedLineSet(int numPoints, int numEdges)
           
IndexedLineSet(java.lang.String name)
           
IndexedLineSet(java.lang.String name, int numPoints)
           
IndexedLineSet(java.lang.String name, int numPoints, int numEdges)
           
 
Method Summary
 void accept(SceneGraphVisitor v)
          The accept method for a SceneGraphVisitor.
 DataListSet getEdgeAttributes()
          Returns a read-only view to all currently defined edge attributes.
 DataList getEdgeAttributes(Attribute attr)
           
 int getNumEdges()
          The number of edges defines the length of all data lists associated with edge attributes.
 void setEdgeAttributes(Attribute attr, DataList dl)
           
 void setEdgeAttributes(DataListSet dls)
           
 void setEdgeCountAndAttributes(Attribute attr, DataList dl)
           
 void setEdgeCountAndAttributes(DataListSet dls)
           
 void setNumEdges(int numEdges)
          Sets the number of edges, implies removal of all previously defined edge attributes.
 
Methods inherited from class de.jreality.scene.PointSet
getNumPoints, getVertexAttributes, getVertexAttributes, setNumPoints, setVertexAttributes, setVertexAttributes, setVertexCountAndAttributes, setVertexCountAndAttributes
 
Methods inherited from class de.jreality.scene.Geometry
addGeometryListener, getAttributes, getAttributes, getGeometryAttributeCathegories, getGeometryAttributes, getGeometryAttributes, getNumEntries, removeGeometryListener, setAttributes, setAttributes, setCountAndAttributes, setCountAndAttributes, setGeometryAttributes, setGeometryAttributes, setNumEntries
 
Methods inherited from class de.jreality.scene.SceneGraphNode
getName, getOwner, getThreadSafe, isReadOnly, setName, setOwner, setReadOnly, setThreadSafe, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexedLineSet

public IndexedLineSet()

IndexedLineSet

public IndexedLineSet(java.lang.String name)

IndexedLineSet

public IndexedLineSet(int numPoints)

IndexedLineSet

public IndexedLineSet(java.lang.String name,
                      int numPoints)

IndexedLineSet

public IndexedLineSet(int numPoints,
                      int numEdges)

IndexedLineSet

public IndexedLineSet(java.lang.String name,
                      int numPoints,
                      int numEdges)
Method Detail

getNumEdges

public int getNumEdges()
The number of edges defines the length of all data lists associated with edge attributes.


setNumEdges

public void setNumEdges(int numEdges)
Sets the number of edges, implies removal of all previously defined edge attributes.

Parameters:
numEdges - the number of edges to set >=0

getEdgeAttributes

public DataListSet getEdgeAttributes()
Returns a read-only view to all currently defined edge attributes. You can copy all currently defined edge attributes to another IndexedLineSet using target.setEdgeAttributes(source.getEdgeAttributes()) These attributes are copied then, not shared. Thus modifying either source or target afterwards will not affect the other.

See Also:
setEdgeAttributes(DataListSet), PointSet.getVertexAttributes(), Geometry.getGeometryAttributes()

getEdgeAttributes

public DataList getEdgeAttributes(Attribute attr)

setEdgeAttributes

public void setEdgeAttributes(DataListSet dls)

setEdgeAttributes

public void setEdgeAttributes(Attribute attr,
                              DataList dl)

setEdgeCountAndAttributes

public void setEdgeCountAndAttributes(Attribute attr,
                                      DataList dl)

setEdgeCountAndAttributes

public void setEdgeCountAndAttributes(DataListSet dls)

accept

public void accept(SceneGraphVisitor v)
Description copied from class: SceneGraphNode
The accept method for a SceneGraphVisitor.

Overrides:
accept in class PointSet