int regionSize = (parent.getMetaInfo().getRegion().getTo()
- parent.getMetaInfo().getRegion().getFrom()) / childrensNumber;
if (((NodeMetaInfo<Node<T>>) parent).getMetaInfo().getCirclelvl() == 1) {
for (Node<Node<T>> child : parent.getChildren()) {
NodeMetaInfo<Node<T>> metaInfoChild = (NodeMetaInfo<Node<T>>) child;
Region region = new Region();
region.setFrom(parent.getMetaInfo().getRegion().getFrom() + counter
* regionSize);
counter++;
region.setTo(parent.getMetaInfo().getRegion().getFrom() + counter
* regionSize);
metaInfoChild.getMetaInfo().setRegion(region);
setXY(metaInfoChild,parent);
setRegionNr(metaInfoChild);
}
} else {
for (Node<Node<T>> child : parent.getChildren()) {
NodeMetaInfo<Node<T>> metaInfoChild = (NodeMetaInfo<Node<T>>) child;
Region region = new Region();
region.setFrom((int) (parent.getMetaInfo().getRegion().getFrom() + counter
* regionSize * 1.5));
counter++;
region.setTo((int) (parent.getMetaInfo().getRegion().getFrom() + counter
* regionSize * 1.5));
metaInfoChild.getMetaInfo().setRegion(region);
setXY(metaInfoChild,parent);
setRegionNr(metaInfoChild);
}