   BSP Maps - Texture Mapping Vectors
  I have been writing code to load and render BSP files. It was going great until i got to the texture mapping. No matter what i do, the textures end up tiling completely wrong. To calculate the texture coordinates (u, v) for the particular vertex i am using the following formula.//Calculate texture coordinatesfloat u =TextureInfo[Faces[faceId].texinfo].textureVecsU.dotProduct(Vertexes[vertexIndice]) +TextureInfo[Faces[faceId].texinfo].textureOffsetU;float v =TextureInfo[Faces[faceId].texinfo].textureVecsV.dotProduct(Vertexes[vertexIndice]) +TextureInfo[Faces[faceId].texinfo].textureOffsetV;Where textureVecsU and vextureVecsV are the vectors for the texture plane and Vertexes[vertexIndice] points to a vector containing the vertex.The code that reads in the vectors is:BSPMap->TextureInfo.textureVecsU = readVector3fInvertZY(in);BSPMap->TextureInfo.textureOffsetU = readFloat(in);BSPMap->TextureInfo.textureVecsV = readVector3fInvertZY(in);BSPMap->TextureInfo.textureOffsetV = readFloat(in);Where (in) is the input stream, readFloat reads a float value from it in correct endian form and readVector3fInvertZY reads a vector struct and corrects the Z and Y coordinates for openGL. I cannot see what i am doing wrong at all and would appreciate any input. I am almost certain the vectors are read in at the correct point as the texture names are read in just after and come out fine.   
  Don't worry, i found the answer.Answer can be found here for anyone in the future who comes across the same problems and happens to come across this thread:http://www.gamedev.net/community/forums/topic.asp?topic_id=387575   