示例#1
0
 public SimpleVertexAdder(Mesh <TVertex> .Builder builder,
                          ObjFileVertexParser <TVertex> parser, ObjFileMesh owner)
 {
     this.builder = builder;
     this.parser  = parser;
     this.owner   = owner;
 }
            public ObjFileMesh Build()
            {
                var obj = new ObjFileMesh(
                    this.vertices, this.uvCoordinates, this.normals, this.faces);

                // forget about lists, so they cannot be modified any longer
                // somewhat dirty implementation of builder pattern,
                // but prevents having to copy all data to mesh
                this.vertices      = null;
                this.normals       = null;
                this.uvCoordinates = null;
                this.faces         = null;

                return(obj);
            }
示例#3
0
            public ObjFileMesh Build()
            {
                var obj = new ObjFileMesh(
                    this.vertices, this.uvCoordinates, this.normals, this.faces);

                // forget about lists, so they cannot be modified any longer
                // somewhat dirty implementation of builder pattern,
                // but prevents having to copy all data to mesh
                this.vertices = null;
                this.normals = null;
                this.uvCoordinates = null;
                this.faces = null;

                return obj;
            }
示例#4
0
 public MergedVertexDictionary(Mesh <TVertex> .Builder builder,
                               ObjFileVertexParser <TVertex> parser, ObjFileMesh owner)
     : base(builder, parser, owner)
 {
 }