// 初始化
    public void Init(Material material)
    {
        this.material = material;
        render_object = RenderObject.Create(null, null, Vector3.zero, Quaternion.identity);
        render_object.mesh_render.material       = material;
        render_object.mesh_render.castShadows    = true;
        render_object.mesh_render.receiveShadows = true;
        render_object.go.name = "Build";
        flag         = MeshEnableFlag.Vertice | MeshEnableFlag.Normal | MeshEnableFlag.Triangle | MeshEnableFlag.Color | MeshEnableFlag.UV;
        segment_mesh = new RepeatSegmentMesh(3, 3, 100, flag);

        segment_mesh.SegmentData.MarkTriangleTopology();
        segment_mesh.ProcedureMesher.SetMesh32();

        mesh_line = new MeshLine();
    }
Example #2
0
    public MeshLine()
    {
        this.material = GlobalAppData.Instance.Data.line_material;
        render_object = RenderObject.Create(null, null, Vector3.zero, Quaternion.identity);
        render_object.mesh_render.material       = material;
        render_object.mesh_render.castShadows    = true;
        render_object.mesh_render.receiveShadows = true;
        render_object.go.name = "MeshLine";

        //Light light = render_object.mesh_filter.GetComponent<Lighting>();
        flag         = MeshEnableFlag.Vertice | MeshEnableFlag.Normal | MeshEnableFlag.Triangle | MeshEnableFlag.Color | MeshEnableFlag.UV;
        segment_mesh = new RepeatSegmentMesh(3, 3, 100, flag);
        segment_mesh.ProcedureMesher.SetMesh32();

        segment_mesh.SegmentData.MarkTriangleTopology();
    }