OpenGL



             

31. Milkshape 3D - 5


1.0f-pTriangle->m_t[2] };

memcpy( m_pTriangles[i].m_vertexNormals, pTriangle->m_vertexNormals,

sizeof( float )*3*3 );

memcpy( m_pTriangles[i].m_s, pTriangle->m_s, sizeof( float )*3 );

memcpy( m_pTriangles[i].m_t, t, sizeof( float )*3 );

memcpy( m_pTriangles[i].m_vertexIndices, vertexIndices, sizeof( int )*3 );

pPtr += sizeof( MS3DTriangle );

}

, . , vertexIndeces t-. word, int ( ). 3 int. t 1.0 - ( ). , OpenGL , Milkshape (.: ) . y.

int nGroups = *( word* )pPtr;

m_numMeshes = nGroups;

m_pMeshes = new Mesh[nGroups];

pPtr += sizeof( word );

for ( i = 0; i < nGroups; i++ )

{

pPtr += sizeof( byte ); //

pPtr += 32; //

 

word nTriangles = *( word* )pPtr;

pPtr += sizeof( word );

int *pTriangleIndices = new int[nTriangles];

for ( int j = 0; j < nTriangles; j++ )

{

pTriangleIndices[j] = *( word* )pPtr;

pPtr += sizeof( word );

}

 

char materialIndex = *( char* )pPtr;

pPtr += sizeof( char );