TData - Tree data typeTBoundary - Tree boundary typepublic class BspInternalNode<TData,TBoundary> extends Object implements IBspNode<TData,TBoundary>, IConstBspInternalNode<TData,TBoundary>
A node with boundary and positive and negative child.
| Modifier and Type | Field and Description |
|---|---|
protected TBoundary |
boundary |
protected int |
depth |
protected IBspNode<TData,TBoundary> |
negativeChild |
protected BspInternalNode<TData,TBoundary> |
parent |
protected IBspNode<TData,TBoundary> |
positiveChild |
protected BspTree<TData,TBoundary> |
tree |
| Constructor and Description |
|---|
BspInternalNode(BspTree<TData,TBoundary> tree) |
| Modifier and Type | Method and Description |
|---|---|
IConstBspInternalNode<TData,TBoundary> |
asConst()
Cast to constant node
|
BspInternalNode<TData,TBoundary> |
asInternal()
Cast to internal
Will throw an exception if node the is not actually internal node.
|
BspLeafNode<TData,TBoundary> |
asLeaf()
Cast to leaf
Will throw an exception if node the is not actually leaf node.
|
TBoundary |
getBoundary()
Get the boundary between positive and negative child
|
int |
getDepth()
Get depth level of the node in the tree
|
IBspNode<TData,TBoundary> |
getNegativeChild()
Get the negative child
|
BspInternalNode<TData,TBoundary> |
getParent()
Get parent
|
IBspNode<TData,TBoundary> |
getPositiveChild()
Get the positive child
|
TData |
getSubtreeData()
Get subtree data
|
TData |
getSubtreeData(BspOccupation filter)
Get subtree data
|
BspTree<TData,TBoundary> |
getTree()
Get the BSP tree
|
boolean |
isInternal()
Tell whether node is an internal node
|
boolean |
isLeaf()
Tell whether node is a leaf node
|
void |
setBoundary(TBoundary value)
Set boundary
Low-level API.
|
void |
setDepth(int value)
Set depth
Low-level API.
|
void |
setNegativeChild(IBspNode<TData,TBoundary> value)
Set negative child
Low-level API.
|
void |
setParent(BspInternalNode<TData,TBoundary> value)
Set parent
Low-level API.
|
void |
setPositiveChild(IBspNode<TData,TBoundary> value)
Set positive child
Low-level API.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasLeaf, getParent, getTree, setDepth, setParentgetDepth, getSubtreeData, isInternalprotected TBoundary boundary
protected BspTree<TData,TBoundary> tree
protected BspInternalNode<TData,TBoundary> parent
protected int depth
public TBoundary getBoundary()
IConstBspInternalNodegetBoundary in interface IConstBspInternalNode<TData,TBoundary>public void setBoundary(TBoundary value)
Low-level API.
public IBspNode<TData,TBoundary> getPositiveChild()
IConstBspInternalNodegetPositiveChild in interface IConstBspInternalNode<TData,TBoundary>public void setPositiveChild(IBspNode<TData,TBoundary> value)
Low-level API.
public IBspNode<TData,TBoundary> getNegativeChild()
IConstBspInternalNodegetNegativeChild in interface IConstBspInternalNode<TData,TBoundary>public void setNegativeChild(IBspNode<TData,TBoundary> value)
Low-level API.
public boolean isLeaf()
IConstBspNodeisLeaf in interface IConstBspNode<TData,TBoundary>public TData getSubtreeData(BspOccupation filter)
IConstBspNodegetSubtreeData in interface IConstBspNode<TData,TBoundary>filter - parts to be retrievedpublic BspInternalNode<TData,TBoundary> asInternal()
IConstBspNodeWill throw an exception if node the is not actually internal node.
asInternal in interface IBspNode<TData,TBoundary>asInternal in interface IConstBspNode<TData,TBoundary>public IConstBspInternalNode<TData,TBoundary> asConst()
IBspNodepublic BspTree<TData,TBoundary> getTree()
IConstBspNodegetTree in interface IBspNode<TData,TBoundary>getTree in interface IConstBspNode<TData,TBoundary>public BspInternalNode<TData,TBoundary> getParent()
IConstBspNodegetParent in interface IBspNode<TData,TBoundary>getParent in interface IConstBspNode<TData,TBoundary>public void setParent(BspInternalNode<TData,TBoundary> value)
IBspNodeLow-level API.
public TData getSubtreeData()
IConstBspNodegetSubtreeData in interface IConstBspNode<TData,TBoundary>public boolean isInternal()
IConstBspNodeisInternal in interface IConstBspNode<TData,TBoundary>public int getDepth()
IConstBspNodegetDepth in interface IConstBspNode<TData,TBoundary>public void setDepth(int value)
IBspNodeLow-level API.
public BspLeafNode<TData,TBoundary> asLeaf()
IConstBspNodeWill throw an exception if node the is not actually leaf node.
asLeaf in interface IBspNode<TData,TBoundary>asLeaf in interface IConstBspNode<TData,TBoundary>Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.