Пример #1
0
        public void fillVertices(String objFile)
        {
            ObjLoader l = new ObjLoader();

            vertexBuffer = l.loadVertices(objFile);
            indexBuffer  = l.loadIndices(objFile);

            originalVertices = (Vector3[])vertexBuffer.Clone();

            lock (innerRotMatrixLock)
            {
                innerRotMatrix = new Matrix3x3();
                innerRotMatrix.matrix[0, 0] = 1; innerRotMatrix.matrix[1, 0] = 0; innerRotMatrix.matrix[2, 0] = 0;
                innerRotMatrix.matrix[0, 1] = 0; innerRotMatrix.matrix[1, 1] = 1; innerRotMatrix.matrix[2, 1] = 0;
                innerRotMatrix.matrix[0, 2] = 0; innerRotMatrix.matrix[1, 2] = 0; innerRotMatrix.matrix[2, 2] = 1;
            }
        }
Пример #2
0
        public void fillVertices(String objFile)
        {
            ObjLoader l = new ObjLoader();

            vertexBuffer = l.loadVertices(objFile);
            indexBuffer = l.loadIndices(objFile);

            originalVertices = (Vector3[]) vertexBuffer.Clone();

            lock (innerRotMatrixLock)
            {
                innerRotMatrix = new Matrix3x3();
                innerRotMatrix.matrix[0, 0] = 1; innerRotMatrix.matrix[1, 0] = 0; innerRotMatrix.matrix[2, 0] = 0;
                innerRotMatrix.matrix[0, 1] = 0; innerRotMatrix.matrix[1, 1] = 1; innerRotMatrix.matrix[2, 1] = 0;
                innerRotMatrix.matrix[0, 2] = 0; innerRotMatrix.matrix[1, 2] = 0; innerRotMatrix.matrix[2, 2] = 1;
            }
        }