Example #1
0
        public int AddVertices(VertexPositionNormalColor[] tmp)
        {
            if (!Seek()) return -1;

            Faces[Position] = tmp[0];
            Faces[Position + 1] = tmp[1];
            Faces[Position + 2] = tmp[2];
            Faces[Position + 3] = tmp[3];
            Faces[Position + 4] = tmp[4];
            Faces[Position + 5] = tmp[5];

            Count += 6;
            Updated = true;
            Full = (Count == Size);
            return Position;
        }
Example #2
0
 public static Facing getFacing( VertexPositionNormalColor[] face )
 {
     if( face[0].Normal == Vector3.Backward ) return Facing.Forward;
     if( face[0].Normal == Vector3.Forward ) return Facing.Backward;
     if( face[0].Normal == Vector3.Left ) return Facing.Right;
     if( face[0].Normal == Vector3.Right ) return Facing.Left;
     if( face[0].Normal == Vector3.Down ) return Facing.Up;
     return Facing.Down;
 }