private static BuildingPartOutput buildNodePart(NodeBuildingPart bp, BuildingModel buildingModel, ModelFactory mf,
BuildingElementsTextureManager tm) {
if (bp instanceof SphereNodeBuildingPart) {
Color floorColor = takeFacadeColor(buildingModel, bp, tm);
TextureData floorTD = takeFacadeTextureData(buildingModel, bp, tm, floorColor != null);
String tex0Key = floorTD.getTex0();
Material mat = MaterialFactory.createTextureColorMaterial(tex0Key, floorColor);
MeshFactory mesh = mf.addMesh("NodePart");
mesh.hasTexture = true;
mesh.materialID = mf.cacheMaterial(mat);
SphereNodeBuildingPart sphere = (SphereNodeBuildingPart) bp;
int pIcross = 12;
int icross = pIcross + 1;
double height = sphere.getHeight();
double radius = sphere.getRadius();
Point2d point = sphere.getPoint();
Point2d[] crossSection = new Point2d[icross];
for (int i = 0; i < icross; i++) {
double a = Math.toRadians(180) / (icross - 1) * i - Math.toRadians(90);
crossSection[i] = new Point2d(Math.cos(a) * radius, Math.sin(a) * radius + height);
}
int pIsection = 12;
RoofType5v6.buildRotaryShape(mesh, point, pIsection, crossSection, true);
}
return new BuildingPartOutput();
}