TData - Tree data typeTBoundary - Tree boundary typepublic class BspLeafNode<TData,TBoundary> extends Object implements IBspNode<TData,TBoundary>, IConstBspLeafNode<TData,TBoundary>
A node that contains only data.
| Modifier and Type | Field and Description |
|---|---|
protected TData |
data |
protected int |
depth |
protected BspInternalNode<TData,TBoundary> |
parent |
protected BspTree<TData,TBoundary> |
tree |
| Constructor and Description |
|---|
BspLeafNode(BspTree<TData,TBoundary> tree) |
| Modifier and Type | Method and Description |
|---|---|
IConstBspLeafNode<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.
|
TData |
getData()
Get the data
|
int |
getDepth()
Get depth level of the node in the tree
|
BspInternalNode<TData,TBoundary> |
getParent()
Get parent
|
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 |
setData(TData value)
Set data
Low-level API.
|
void |
setDepth(int value)
Set depth
Low-level API.
|
void |
setParent(BspInternalNode<TData,TBoundary> value)
Set parent
Low-level API.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasInternal, getParent, getTree, setDepth, setParentgetDepth, getSubtreeData, isInternalprotected TData data
protected BspTree<TData,TBoundary> tree
protected BspInternalNode<TData,TBoundary> parent
protected int depth
public boolean isLeaf()
IConstBspNodeisLeaf in interface IConstBspNode<TData,TBoundary>public TData getData()
IConstBspLeafNodegetData in interface IConstBspLeafNode<TData,TBoundary>public void setData(TData value)
Low-level API.
public TData getSubtreeData(BspOccupation filter)
IConstBspNodegetSubtreeData in interface IConstBspNode<TData,TBoundary>filter - parts to be retrievedpublic BspLeafNode<TData,TBoundary> asLeaf()
IConstBspNodeWill throw an exception if node the is not actually leaf node.
public IConstBspLeafNode<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 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>Copyright © 2019 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.