public static MeshFactory meshBuilder(String string) { return new MeshFactory(string); }
/** Add mesh to model. * @param pName name of mesh * @return added mesh */ public MeshFactory addMesh(String pName) { MeshFactory mf = new MeshFactory(); mf.name = pName; this.mashFactory.add(mf); return mf; }
protected MeshFactory createFacadeMesh(RoofMaterials roofTextureData) { MeshFactory meshBorder = new MeshFactory("roof_facade"); meshBorder.materialID = roofTextureData.getFacade().getMaterialIndexInModel(); meshBorder.hasTexture = true; return meshBorder; }
protected MeshFactory createRoofMesh(RoofMaterials roofTextureData) { MeshFactory meshRoof = new MeshFactory("roof_top"); meshRoof.materialID = roofTextureData.getRoof().getMaterialIndexInModel(); meshRoof.hasTexture = true; return meshRoof; }
private MeshFactory buildWallModelWithHoles(List<Point2d> points, List<WallHole> holeList, double min_height, double height, double width) { MeshFactory wallMesh = new MeshFactory(); buildWallModel(this.points, width, wallMesh); List<MeshFactory> holes = new ArrayList<MeshFactory>(); for (WallHole wh : holeList) { MeshFactory cubeMesh = MeshFactoryUtil.cubeMesh(new Point3d(wh.x, wh.height, -wh.y)); holes.add(cubeMesh); } return applayHolesToModel(wallMesh, holes); // for (MeshFactory mf : holes) { // // } }
private MeshFactory applayHolesToModel(MeshFactory solidModel, List<MeshFactory> holesModel) { CSG solid = meshToSolid(solidModel); for (MeshFactory holeModel : holesModel) { CSG hole = meshToSolid(holeModel); solid = solid.subtract(hole); } ArrayList<Polygon> polygons = solid.toPolygons(); MeshFactory mf = new MeshFactory(); solidToModel(mf, polygons); return mf; // for (MeshFactory holeModel : holesModel) { // ArrayList<Polygon> hole = meshToSolid(holeModel).toPolygons(); // solidToModel(solidModel, hole); // } }
public static kendzi.jogl.model.factory.MeshFactory cubeMesh(Point3d start, Vector3d size) { MeshFactory mf = new MeshFactory(); FaceFactory face = mf.addFace(FaceType.QUADS);