Class Link


public class Link extends Leaf
A Link leaf node allows an application to reference a shared graph, rooted by a SharedGroup node, from within a branch graph or another shared graph. Any number of Link nodes can refer to the same SharedGroup node.
  • Field Details

    • ALLOW_SHARED_GROUP_READ

      public static final int ALLOW_SHARED_GROUP_READ
      For Link nodes, specifies that the node allows access to its object's SharedGroup information.
      See Also:
    • ALLOW_SHARED_GROUP_WRITE

      public static final int ALLOW_SHARED_GROUP_WRITE
      For Link nodes, specifies that the node allows writing its object's SharedGroup information.
      See Also:
  • Constructor Details

    • Link

      public Link()
      Constructs a Link node object that does not yet point to a SharedGroup node.
    • Link

      public Link(SharedGroup sharedGroup)
      Constructs a Link node object that points to the specified SharedGroup node.
      Parameters:
      sharedGroup - the SharedGroup node
  • Method Details

    • setSharedGroup

      public void setSharedGroup(SharedGroup sharedGroup)
      Sets the node's SharedGroup reference.
      Parameters:
      sharedGroup - the SharedGroup node to reference
      Throws:
      CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
    • getSharedGroup

      public SharedGroup getSharedGroup()
      Retrieves the node's SharedGroup reference.
      Returns:
      the SharedGroup node
      Throws:
      CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
    • cloneNode

      public Node cloneNode(boolean forceDuplicate)
      Used to create a new instance of the node. This routine is called by cloneTree to duplicate the current node.
      The cloned Link node will refer to the same SharedGroup as the original node. The SharedGroup referred to by this Link node will not be cloned.
      Overrides:
      cloneNode in class Node
      Parameters:
      forceDuplicate - when set to true, causes the duplicateOnCloneTree flag to be ignored. When false, the value of each node's duplicateOnCloneTree variable determines whether NodeComponent data is duplicated or copied.
      See Also: