public class BSPTreeSVGWriter extends Object
| Constructor and Description |
|---|
BSPTreeSVGWriter(Bounds2D bounds)
Construct a new instance that will render regions within the given bounds.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setTreeParentOffsetFactor(double treeParentOffsetFactor)
Set the offset factor determining how much of the available horizontal width for
a node should be used to offset it from its parent.
|
void |
setTreeParentXOffsetMin(double treeParentXOffsetMin)
Set the minimum horizontal offset for tree nodes from their parents.
|
void |
write(RegionBSPTree2D tree,
File file)
Write an SVG visualization of the given BSP tree.
|
void |
write(RegionBSPTree2D tree,
Map<RegionBSPTree2D.RegionNode2D,String> nodeNames,
File file)
Write an SVG visualization of the given BSP tree.
|
public BSPTreeSVGWriter(Bounds2D bounds)
bounds - bounds used to determine what outputpublic void setTreeParentOffsetFactor(double treeParentOffsetFactor)
treeParentOffsetFactor - offset factorpublic void setTreeParentXOffsetMin(double treeParentXOffsetMin)
treeParentXOffsetMin - minimum offsetpublic void write(RegionBSPTree2D tree, File file)
tree - tree to outputfile - path of the svg file to writepublic void write(RegionBSPTree2D tree, Map<RegionBSPTree2D.RegionNode2D,String> nodeNames, File file)
tree - tree to outputnodeNames - map of node instances to the names that should be used for them in the svgfile - path of the svg file to writeCopyright © 2016–2020 The Apache Software Foundation. All rights reserved.