Class TLcdOpenFlightNode

java.lang.Object
com.luciad.format.object3d.openflight.model.TLcdOpenFlightNode
All Implemented Interfaces:
ILcd3DMeshNode, ILcdOpenFlightNode
Direct Known Subclasses:
TLcdOpenFlightFaceNode, TLcdOpenFlightHeaderNode, TLcdOpenFlightInstanceDefinitionNode, TLcdOpenFlightInstanceReferenceNode, TLcdOpenFlightTransformableNode, TLcdOpenFlightVertexNode

public class TLcdOpenFlightNode extends Object implements ILcdOpenFlightNode
Basic implementation of ILcdOpenFlightNode. Provides a standard mechanism for managing child nodes.
  • Constructor Details

  • Method Details

    • getChildCount

      public int getChildCount()
      Description copied from interface: ILcdOpenFlightNode
      Returns the number of child nodes directly beneath this node.
      Specified by:
      getChildCount in interface ILcdOpenFlightNode
      Returns:
      the number of child nodes directly beneath this node
    • getChild

      public ILcdOpenFlightNode getChild(int aIndex)
      Description copied from interface: ILcdOpenFlightNode
      Returns the child node at the specified index.
      Specified by:
      getChild in interface ILcdOpenFlightNode
      Parameters:
      aIndex - the index of the child node to be retrieved
      Returns:
      the child node at the specified index
    • addChild

      public void addChild(ILcdOpenFlightNode aChild)
      Adds a child to this node.
      Parameters:
      aChild - the ILcdOpenFlightNode to be added below this node
    • setParent

      public void setParent(ILcdOpenFlightNode aParent)
      Sets this node's parent.
      Parameters:
      aParent -
    • getParent

      public ILcdOpenFlightNode getParent()
      Description copied from interface: ILcdOpenFlightNode
      Returns this node's parent node. May be null for the root node of the scene graph only.
      Specified by:
      getParent in interface ILcdOpenFlightNode
      Returns:
      this node's parent node
    • getID

      public String getID()
      Description copied from interface: ILcdOpenFlightNode
      Returns this node's ID. The ID is present in all primary node records defined by OpenFlight.
      Specified by:
      getID in interface ILcdOpenFlightNode
      Returns:
      the ID of this node
    • setID

      public void setID(String aID)
      Parameters:
      aID - the new ID of this node
      See Also:
    • toString

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

      public List<ILcd3DMesh> getMeshes()
      Description copied from interface: ILcd3DMeshNode
      Returns the geometry contained in this node, in the form of 3D meshes, or an empty list if this node does not contain any data.
      Specified by:
      getMeshes in interface ILcd3DMeshNode
      Returns:
      a list of 3D meshes, possibly empty but never null
    • getTransformation

      public double[] getTransformation()
      Description copied from interface: ILcd3DMeshNode
      Returns a transformation matrix that applies to this node and its children. The matrix should be 4x4 elements in column-major order. This is the same convention used by OpenGL functions such as glLoadMatrix(). null can be returned and represents the identity matrix.
      Specified by:
      getTransformation in interface ILcd3DMeshNode
      Returns:
      a 4x4 column-major transformation matrix, possibly null
    • getChildren

      public List<? extends ILcd3DMeshNode> getChildren()
      Description copied from interface: ILcd3DMeshNode
      Returns this node's children, or an empty list if the node is a leaf node.
      Specified by:
      getChildren in interface ILcd3DMeshNode
      Returns:
      a list of children, possibly empty but never null
    • accept

      public void accept(ALcdOpenFlightSceneVisitor aVisitor)
      Description copied from interface: ILcdOpenFlightNode
      Accepts an OpenFlight visitor. A typical implementation of this method should call aVisitor.visit(this).
      Specified by:
      accept in interface ILcdOpenFlightNode
      Parameters:
      aVisitor - the visitor to accept