de.jreality.scene
Class PointSet
java.lang.Object
de.jreality.scene.SceneGraphNode
de.jreality.scene.Geometry
de.jreality.scene.PointSet
- Direct Known Subclasses:
- IndexedLineSet
public class PointSet
- extends Geometry
A set of points in 3 space.
Vertices can be specified with either 3- or 4-D coordinates.
End users are recommended to use PointSetFactory
to construct instances of this class.
- Author:
- Tim Hoffmann
Methods inherited from class de.jreality.scene.Geometry |
addGeometryListener, getAttributes, getAttributes, getGeometryAttributeCathegories, getGeometryAttributes, getGeometryAttributes, getNumEntries, removeGeometryListener, setAttributes, setAttributes, setCountAndAttributes, setCountAndAttributes, setGeometryAttributes, setGeometryAttributes, setNumEntries |
PointSet
public PointSet()
PointSet
public PointSet(int numPoints)
PointSet
public PointSet(String name)
PointSet
public PointSet(String name,
int numPoints)
getNumPoints
public int getNumPoints()
- The number of vertices defines the length of all data lists associated
with vertex attributes.
setNumPoints
public void setNumPoints(int numVertices)
- Sets the number of vertices, implies removal of all previously defined
vertex attributes.
- Parameters:
numVertices
- the number of vertices to set >=0
getVertexAttributes
public DataListSet getVertexAttributes()
- Returns a read-only view to all currently defined vertex attributes.
You can copy all currently defined vertex attributes to another
PointSet using
target.setVertexAttributes(source.getVertexAttributes())
These attributes are copied then, not shared. Thus modifying either
source or target afterwards will not affect the other.
- See Also:
setVertexAttributes(DataListSet)
,
Geometry.getGeometryAttributes()
getVertexAttributes
public DataList getVertexAttributes(Attribute attr)
setVertexAttributes
public void setVertexAttributes(DataListSet dls)
setVertexAttributes
public void setVertexAttributes(Attribute attr,
DataList dl)
setVertexCountAndAttributes
public void setVertexCountAndAttributes(Attribute attr,
DataList dl)
setVertexCountAndAttributes
public void setVertexCountAndAttributes(DataListSet dls)
accept
public void accept(SceneGraphVisitor v)
- Description copied from class:
SceneGraphNode
- The accept method for a SceneGraphVisitor.
- Overrides:
accept
in class Geometry