Point3d leafAttachPoint = BarycentreHelper.getBarycentre(new Point3d(0, 0, 0), branchPartEndPoint,
(index + Randomizer.random2()) * shift);
leaveStates.add(leafStateFactory.createRandomTreeLeafState(leafAttachPoint));
}
TreeBranchPart3DStateFactory branchPart3DStateFactory = new TreeBranchPart3DStateFactory();
TreeBranchPart3DState branch3DState = branchPart3DStateFactory
.createRandomTreeBranchPart3DState(new Point3dState(branchPartEndPoint));
return new TreeBranchPartState(BRANCH_PART_COUNT++, age, energy, freeEnergy, leaveStates, branch3DState);
}