de.grogra.imp3d.objects
public static class SceneTree.Leaf extends SceneTree.Node
SceneTree. A leaf contains
a reference to an object of the graph for which the method
SceneTree.acceptLeaf(Object, boolean) has returned
true. E.g., think of all nodes having a 3D shape.| Modifier and Type | Field and Description |
|---|---|
boolean |
asNode
Is
object a node or an edge? |
java.lang.Object |
object
The object of the original graph for which this leaf has
been created.
|
long |
pathId |
next| Constructor and Description |
|---|
SceneTree.Leaf(java.lang.Object object,
boolean asNode,
long pathId) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(SceneTree.Visitor visitor) |
boolean |
getBoolean(BooleanAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
byte |
getByte(ByteAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
char |
getChar(CharAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
double |
getDouble(DoubleAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
float |
getFloat(FloatAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
int |
getInt(IntAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
long |
getLong(LongAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
java.lang.Object |
getObject(ObjectAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
java.lang.Object |
getObject(java.lang.Object placeIn,
ObjectAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
short |
getShort(ShortAttribute a)
Returns the value of attribute
a for the
object of this leaf. |
java.lang.String |
toString() |
public final boolean asNode
object a node or an edge?public final java.lang.Object object
public final long pathId
public SceneTree.Leaf(java.lang.Object object,
boolean asNode,
long pathId)
public final void accept(SceneTree.Visitor visitor)
accept in class SceneTree.Nodepublic boolean getBoolean(BooleanAttribute a)
a for the
object of this leaf.a - the attribute to readpublic byte getByte(ByteAttribute a)
a for the
object of this leaf.a - the attribute to readpublic char getChar(CharAttribute a)
a for the
object of this leaf.a - the attribute to readpublic double getDouble(DoubleAttribute a)
a for the
object of this leaf.a - the attribute to readpublic float getFloat(FloatAttribute a)
a for the
object of this leaf.a - the attribute to readpublic int getInt(IntAttribute a)
a for the
object of this leaf.a - the attribute to readpublic long getLong(LongAttribute a)
a for the
object of this leaf.a - the attribute to readpublic java.lang.Object getObject(ObjectAttribute a)
a for the
object of this leaf.a - the attribute to readpublic java.lang.Object getObject(java.lang.Object placeIn,
ObjectAttribute a)
a for the
object of this leaf.placeIn - an instance for the result may be provided by the callera - the attribute to readpublic short getShort(ShortAttribute a)
a for the
object of this leaf.a - the attribute to readpublic java.lang.String toString()
toString in class java.lang.Object