de.jreality.scene
Class IndexedFaceSet

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
                  extended by de.jreality.scene.IndexedFaceSet
Direct Known Subclasses:
U3DClosedCylinder

public class IndexedFaceSet
extends IndexedLineSet

A geometry specified as a combinatorial set of faces. (See PointSet).

End users are recommended to use IndexedFaceSetFactory and its subclasses to construct instances of this class.

Author:
Tim Hoffmann

Field Summary
 
Fields inherited from class de.jreality.scene.Geometry
CATEGORY_EDGE, CATEGORY_FACE, CATEGORY_VERTEX
 
Constructor Summary
IndexedFaceSet()
           
IndexedFaceSet(int numVertices, int numFaces)
           
IndexedFaceSet(String name)
           
IndexedFaceSet(String name, int numVertices, int numFaces)
           
 
Method Summary
 void accept(SceneGraphVisitor v)
          The accept method for a SceneGraphVisitor.
 DataListSet getFaceAttributes()
          Returns a read-only view to all currently defined face attributes.
 DataList getFaceAttributes(Attribute attr)
           
 int getNumFaces()
           
 void setFaceAttributes(Attribute attr, DataList dl)
           
 void setFaceAttributes(DataListSet dls)
           
 void setFaceCountAndAttributes(Attribute attr, DataList dl)
           
 void setFaceCountAndAttributes(DataListSet dls)
           
 void setNumFaces(int numFaces)
          Sets the number of face, implies removal of all previously defined face attributes.
 
Methods inherited from class de.jreality.scene.IndexedLineSet
getEdgeAttributes, getEdgeAttributes, getNumEdges, setEdgeAttributes, setEdgeAttributes, setEdgeCountAndAttributes, setEdgeCountAndAttributes, setNumEdges
 
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

IndexedFaceSet

public IndexedFaceSet(int numVertices,
                      int numFaces)

IndexedFaceSet

public IndexedFaceSet(String name,
                      int numVertices,
                      int numFaces)

IndexedFaceSet

public IndexedFaceSet()

IndexedFaceSet

public IndexedFaceSet(String name)
Method Detail

getNumFaces

public int getNumFaces()

setNumFaces

public void setNumFaces(int numFaces)
Sets the number of face, implies removal of all previously defined face attributes.

Parameters:
numVertices - the number of vertices to set >=0

getFaceAttributes

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

See Also:
setFaceAttributes(DataListSet), IndexedLineSet.getEdgeAttributes(), PointSet.getVertexAttributes(), Geometry.getGeometryAttributes()

getFaceAttributes

public DataList getFaceAttributes(Attribute attr)

setFaceAttributes

public void setFaceAttributes(DataListSet dls)

setFaceAttributes

public void setFaceAttributes(Attribute attr,
                              DataList dl)

setFaceCountAndAttributes

public void setFaceCountAndAttributes(Attribute attr,
                                      DataList dl)

setFaceCountAndAttributes

public void setFaceCountAndAttributes(DataListSet dls)

accept

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

Overrides:
accept in class IndexedLineSet