#declare WallTexture = texture{ T_concrete }

#declare WallWarehouseZ_Dist1 = 20; //For the wall behind the warehouse
#declare WallWarehouseZ_Dist2 = 20; //For the wall behind the camera
#declare WallWarehouseX_Dist1 = 20; //For the wall behind the warehouse
#declare WallWarehouseX_Dist2 = 20; //For the wall behind the camera
#declare WallThickness = 0.25;
#declare WallEntranceWidth = 7; // Around 0 on x axis
#declare WallEntranceXDecal = -4;
#declare WallHighness = 2;

#declare WallMaxExtent = < max_extent( NewWarehouse ).x + WallWarehouseX_Dist2, 0, max_extent( NewWarehouse ).z + WallWarehouseZ_Dist1 >;
#declare WallMinExtent = < min_extent( NewWarehouse ).x - WallWarehouseX_Dist1, 0, min_extent( NewWarehouse ).z - WallWarehouseZ_Dist2 >;

#declare WallAB_I = < WallMinExtent.x, WallMaxExtent.z >;
#declare WallAB_E = < WallMinExtent.x - WallThickness, WallMaxExtent.z + WallThickness >;
#declare WallBC_I = < WallMinExtent.x, WallMinExtent.z >;
#declare WallBC_E = < WallMinExtent.x - WallThickness, WallMinExtent.z - WallThickness >;
#declare WallCD_I = < WallMaxExtent.x, WallMinExtent.z >;
#declare WallCD_E = < WallMaxExtent.x + WallThickness, WallMinExtent.z - WallThickness >;
#declare WallDE_I = < WallMaxExtent.x, WallMaxExtent.z >;
#declare WallDE_E = < WallMaxExtent.x + WallThickness, WallMaxExtent.z + WallThickness >;
#declare WallA_Entrance_I = < -WallEntranceWidth / 2 + WallEntranceXDecal, WallMaxExtent.z >;
#declare WallA_Entrance_E = < -WallEntranceWidth / 2 + WallEntranceXDecal, WallMaxExtent.z + WallThickness >;
#declare WallE_Entrance_I = < WallEntranceWidth / 2 + WallEntranceXDecal, WallMaxExtent.z >;
#declare WallE_Entrance_E = < WallEntranceWidth / 2 + WallEntranceXDecal, WallMaxExtent.z + WallThickness >;

#declare WallA = 
prism{ linear_sweep linear_spline 0, WallHighness, 5, 
	WallA_Entrance_I, WallA_Entrance_E, WallAB_E, WallAB_I, WallA_Entrance_I
	texture{ WallTexture }
}

#declare WallB =
prism{ linear_sweep linear_spline 0, WallHighness, 5,
	WallAB_I, WallAB_E, WallBC_E, WallBC_I, WallAB_I
	texture{ WallTexture }
}

#declare WallC =
prism{ linear_sweep linear_spline 0, WallHighness, 5,
	WallBC_I, WallBC_E, WallCD_E, WallCD_I, WallBC_I
	texture{ WallTexture }
}

#declare WallD =
prism{ linear_sweep linear_spline 0, WallHighness, 5,
	WallCD_I, WallCD_E, WallDE_E, WallDE_I, WallCD_I
	texture{ WallTexture }
}

#declare WallE =
prism{ linear_sweep linear_spline 0, WallHighness, 5, 
	WallE_Entrance_E, WallE_Entrance_I, WallDE_I, WallDE_E, WallE_Entrance_E
	texture{ WallTexture }
}
