Module org.dyn4j

Class LazyAABBTreeNode

  • Direct Known Subclasses:
    LazyAABBTreeLeaf

    class LazyAABBTreeNode
    extends java.lang.Object
    Represents a basic node in a LazyAABBTree.

    The AABB of the node should be the union of all the AABBs below this node.

    Since:
    3.4.0
    Version:
    3.4.0
    Author:
    Manolis Tsamis
    • Constructor Detail

      • LazyAABBTreeNode

        LazyAABBTreeNode()
    • Method Detail

      • replaceChild

        public void replaceChild​(LazyAABBTreeNode oldChild,
                                 LazyAABBTreeNode newChild)
        Replace oldChild with newChild. oldChild must be a child of this node before the replacement. Children are compared with the equality operator.
        Parameters:
        oldChild - The child to replace in this node
        newChild - The replacement
        Throws:
        java.lang.IllegalArgumentException - if oldChild is not a child of this node
      • getSibling

        public LazyAABBTreeNode getSibling()
        Returns the sibling of this node, that is the other child of this node's parent.
        Returns:
        The sibling node
        Throws:
        java.lang.NullPointerException - if this node has no parent
        java.lang.IllegalStateException - if this node is not a child of it's parent
      • isLeaf

        public boolean isLeaf()
        Returns true if this node is a leaf node.
        Returns:
        boolean true if this node is a leaf node
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object