de.jreality.scene
Class Geometry

java.lang.Object
  extended by de.jreality.scene.SceneGraphNode
      extended by de.jreality.scene.Geometry
Direct Known Subclasses:
ClippingPlane, Cylinder, PointSet, Sphere

public abstract class Geometry
extends SceneGraphNode

A geometry leaf. Supports arbitrary attributes (setGeometryAttributes(String, Object)), and registering instances of GeometryListener.


Field Summary
static String CATEGORY_EDGE
           
static String CATEGORY_FACE
           
static String CATEGORY_VERTEX
           
 
Constructor Summary
Geometry(String name)
           
 
Method Summary
 void accept(SceneGraphVisitor v)
          The accept method for a SceneGraphVisitor.
 void addGeometryListener(GeometryListener listener)
           
 DataListSet getAttributes(String attributeCategory)
          Returns a read-only view to all currently defined target geometry attributes.
 DataList getAttributes(String attributeCategory, Attribute attr)
           
 Set<String> getGeometryAttributeCathegories()
           
 Map<String,Object> getGeometryAttributes()
          Returns a read-only view to all currently defined geometry attributes.
 Object getGeometryAttributes(String name)
           
 int getNumEntries(String attributeCategory)
          The number of entries defines the length of all data lists associated with the target geometry attributes.
 void removeGeometryListener(GeometryListener listener)
           
 void setAttributes(String attributeCategory, Attribute attr, DataList dl)
           
 void setAttributes(String attributeCategory, DataListSet dls)
           
 void setCountAndAttributes(String attributeCategory, Attribute attr, DataList dl)
           
 void setCountAndAttributes(String attributeCategory, DataListSet dls)
           
 void setGeometryAttributes(Map<String,Object> attrSet)
           
 void setGeometryAttributes(String attr, Object value)
           
 void setNumEntries(String attributeCategory, int numEntries)
          Sets the number of entries, implies removal of all previously defined such geometries attributes
 
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
 

Field Detail

CATEGORY_VERTEX

public static final String CATEGORY_VERTEX
See Also:
Constant Field Values

CATEGORY_EDGE

public static final String CATEGORY_EDGE
See Also:
Constant Field Values

CATEGORY_FACE

public static final String CATEGORY_FACE
See Also:
Constant Field Values
Constructor Detail

Geometry

public Geometry(String name)
Method Detail

getGeometryAttributes

public Map<String,Object> getGeometryAttributes()
Returns a read-only view to all currently defined geometry attributes. You can copy all currently defined geometry attributes to another geometry using target.setGeometryAttributes(source.getGeometryAttributes()) These attributes are copied then, not shared. Thus modifying either source or target afterwards will not affect the other.

See Also:
setGeometryAttributes(DataListSet)

getGeometryAttributes

public Object getGeometryAttributes(String name)

setGeometryAttributes

public void setGeometryAttributes(Map<String,Object> attrSet)

setGeometryAttributes

public void setGeometryAttributes(String attr,
                                  Object value)

addGeometryListener

public void addGeometryListener(GeometryListener listener)

removeGeometryListener

public void removeGeometryListener(GeometryListener listener)

getGeometryAttributeCathegories

public Set<String> getGeometryAttributeCathegories()

getNumEntries

public int getNumEntries(String attributeCategory)
The number of entries defines the length of all data lists associated with the target geometry attributes.

Parameters:
attributeCategory - key for target data list set

setNumEntries

public void setNumEntries(String attributeCategory,
                          int numEntries)
Sets the number of entries, implies removal of all previously defined such geometries attributes

Parameters:
attributeCategory - key for target data list set
numEntries - the number of vertices to set >=0

getAttributes

public DataListSet getAttributes(String attributeCategory)
Returns a read-only view to all currently defined target geometry attributes.

Parameters:
attributeCategory - key for target data list set
See Also:
setVertexAttributes(DataListSet), getGeometryAttributes()

getAttributes

public DataList getAttributes(String attributeCategory,
                              Attribute attr)

setAttributes

public void setAttributes(String attributeCategory,
                          DataListSet dls)

setAttributes

public void setAttributes(String attributeCategory,
                          Attribute attr,
                          DataList dl)

setCountAndAttributes

public void setCountAndAttributes(String attributeCategory,
                                  Attribute attr,
                                  DataList dl)

setCountAndAttributes

public void setCountAndAttributes(String attributeCategory,
                                  DataListSet dls)

accept

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

Overrides:
accept in class SceneGraphNode