Example #1
0
        public void SetFace(int faceID1, int faceID2, int v0ID, int v1ID, int v2ID, int v3ID)
        {
            sFace f1 = new sFace();

            f1.ID = faceID1;
            f1.A  = v0ID;
            f1.B  = v1ID;
            f1.C  = v2ID;

            this.vertices[v0ID].faceIndices.Add(faceID1);
            this.vertices[v1ID].faceIndices.Add(faceID1);
            this.vertices[v2ID].faceIndices.Add(faceID1);

            sFace f2 = new sFace();

            f2.ID = faceID2;
            f2.A  = v0ID;
            f2.B  = v2ID;
            f2.C  = v3ID;

            this.vertices[v0ID].faceIndices.Add(faceID2);
            this.vertices[v2ID].faceIndices.Add(faceID2);
            this.vertices[v3ID].faceIndices.Add(faceID2);


            this.faces.Add(f1);
            this.faces.Add(f2);
        }
Example #2
0
        public sFace DuplicatesFace()
        {
            sFace nf = new sFace();

            nf.ID     = this.ID;
            nf.A      = this.A;
            nf.B      = this.B;
            nf.C      = this.C;
            nf.normal = this.normal.DuplicatesXYZ();
            return(nf);
        }
Example #3
0
        public void SetFace(int faceID, int v0ID, int v1ID, int v2ID)
        {
            sFace f = new sFace();

            f.ID = faceID;
            f.A  = v0ID;
            f.B  = v1ID;
            f.C  = v2ID;

            this.vertices[v0ID].faceIndices.Add(faceID);
            this.vertices[v1ID].faceIndices.Add(faceID);
            this.vertices[v2ID].faceIndices.Add(faceID);

            this.faces.Add(f);
        }