#include "includes/beveledBorderGeom.inc"
#include concat( PathToGlobalIncludes,"squaresMacros.inc")

#declare BeveledTreeBorderScale = 0.25;

#declare BorderEarth =
prism{ linear_sweep linear_spline -1, 0.35, 6
	< 0, 0 >, < 0, 16 / 10 >, < 1, 16 / 10 >, < 16 / 10, 1 >, < 16 / 10, 0 >, < 0, 0 >
	texture{ EarthTexture }
}

#declare ConcreteTreeBorder =
object{ BeveledBorderGeom pigment{ PigLight } }

#declare CompleteTreeBorder =
union{
	object{ ConcreteTreeBorder }
	object{ ConcreteTreeBorder rotate 90 * y }
	object{ ConcreteTreeBorder rotate 180 * y }
	object{ ConcreteTreeBorder rotate 270 * y }
	object{ BorderEarth }
	object{ BorderEarth rotate 90 * y }
	object{ BorderEarth rotate 180 * y }
	object{ BorderEarth rotate 270 * y }
	scale BeveledTreeBorderScale
}

#macro PlantYardTree(TreeObject, TreeTransform, Location)
	object{ CompleteTreeBorder translate Location }
	object{ TreeObject transform{ TreeTransform } translate Location }
#end