Class: GetWallPlacement

GetWallPlacement(placementData, wallSet, start, end)

Returns the wall piece entities needed to construct a wall between start.pos and end.pos. Assumes start.pos != end.pos. The result is an array of objects, each one containing the following information about a single wall piece entity: - 'template': the template name of the entity - 'pos': position of the entity, as an object with keys 'x' and 'z' - 'angle': orientation of the entity, as an angle in radians All the pieces in the resulting array are ordered left-to-right (or right-to-left) as they appear in the physical wall.

Constructor

new GetWallPlacement(placementData, wallSet, start, end)

Parameters:
Name Type Description
placementData Object that associates the wall piece template names with information about those kinds of pieces. Expects placementData[templateName].templateData to contain the parsed template information about the template whose filename is templateName.
wallSet Object that primarily holds the template names for the supported wall pieces in this set (under the 'templates' key), as well as the min and max allowed overlap factors (see GetWallSegmentsRec). Expected to contain template names for keys "long" (long wall segment), "medium" (medium wall segment), "short" (short wall segment), "tower" (intermediate tower between wall segments), "gate" (replacement for long walls).
start Object holding the starting position of the wall. Must contain keys 'x' and 'z'.
end Object holding the ending position of the wall. Must contains keys 'x' and 'z'.
Source: