Module imp3d

Class SceneTree.Leaf

java.lang.Object
de.grogra.imp3d.objects.SceneTree.Node
de.grogra.imp3d.objects.SceneTree.Leaf
Direct Known Subclasses:
SceneTreeWithShader.Leaf
Enclosing class:
SceneTree

public static class SceneTree.Leaf extends SceneTree.Node
This represents a leaf in a 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.
Author:
Ole Kniemeyer
  • Field Details

    • object

      public final Object object
      The object of the original graph for which this leaf has been created.
    • asNode

      public final boolean asNode
      Is object a node or an edge?
    • pathId

      public final long pathId
  • Constructor Details

    • Leaf

      public Leaf(Object object, boolean asNode, long pathId)
  • Method Details

    • accept

      public final void accept(SceneTree.Visitor visitor)
      Specified by:
      accept in class SceneTree.Node
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBoolean

      public boolean getBoolean(BooleanAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getByte

      public byte getByte(ByteAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getShort

      public short getShort(ShortAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getChar

      public char getChar(CharAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getInt

      public int getInt(IntAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getLong

      public long getLong(LongAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getFloat

      public float getFloat(FloatAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getDouble

      public double getDouble(DoubleAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getObject

      public Object getObject(ObjectAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      a - the attribute to read
    • getObject

      public Object getObject(Object placeIn, ObjectAttribute a)
      Returns the value of attribute a for the object of this leaf.
      Parameters:
      placeIn - an instance for the result may be provided by the caller
      a - the attribute to read