Class GroupNode


  • public class GroupNode
    extends SceneNode
    a SceneNode that has a transformation and 0 to many children.
    • Constructor Detail

      • GroupNode

        public GroupNode​(long cPtr,
                         boolean cMemoryOwn)
      • GroupNode

        public GroupNode​(java.lang.String name)
        constructor
    • Method Detail

      • getCPtr

        public static long getCPtr​(GroupNode obj)
      • asGroupNode

        public GroupNode asGroupNode()
        Description copied from class: SceneNode
        Get a pointer to a GroupNode, if this is a GroupNode.
        Overrides:
        asGroupNode in class SceneNode
        Returns:
        a pointer, or NULL if the SceneNode is not of correct type.
      • nrOfChildren

        public long nrOfChildren()
        get the number of children
      • addChild

        public void addChild​(SceneNodePtr node,
                             SceneNode.AddPolicy policy)
        add a child to this group node
        Parameters:
        node - [in] the child to add
        policy - [in] add it to the front or the back
      • addChild

        public void addChild​(SceneNodePtr node)
        add a child to this group node
        Parameters:
        node - [in] the child to add
      • addChild

        public static void addChild​(SceneNodePtr child,
                                    GroupNodePtr parent,
                                    SceneNode.AddPolicy policy)
        add a child to the groupnode parent
        Parameters:
        child - [in] the child to add
        parent - [in] the parent
        policy - [in] add it to the front or the back
      • addChild

        public static void addChild​(SceneNodePtr child,
                                    GroupNodePtr parent)
        add a child to the groupnode parent
        Parameters:
        child - [in] the child to add
        parent - [in] the parent
      • hasChild

        public boolean hasChild​(SceneNodePtr node)
        test if this group node has the node node as child
        Parameters:
        node - [in] a scene node
        Returns:
        true if node is child of this, false otherwise
      • hasChild

        public boolean hasChild​(java.lang.String nodename)
        test if this group node has a child node with name nodename
        Parameters:
        nodename - [in] name of child node
        Returns:
        true if nodename is child of this, false otherwise
      • removeChild

        public void removeChild​(SceneNodePtr node)
        remove node from the children list of this node AND removes this
        node from the parent list of node.

        Parameters:
        node - [in] child node that is to be removed
      • removeChild

        public void removeChild​(java.lang.String name)
        remove node with name name from the children list of this node AND removes this
        node from the parent list of node.

        Parameters:
        name - [in] child node that is to be removed
      • setTransform

        public void setTransform​(Transform3D t3d)
        transform is relative to parent node
      • getTransform

        public Transform3D getTransform()
        get transform
      • set_t3d

        public void set_t3d​(Transform3D value)
        The transform.
      • get_t3d

        public Transform3D get_t3d()
        The transform.