diff --git a/enginecustom/applicationclass.cpp b/enginecustom/applicationclass.cpp index 3084822..ff5e4d2 100644 --- a/enginecustom/applicationclass.cpp +++ b/enginecustom/applicationclass.cpp @@ -23,6 +23,7 @@ ApplicationClass::~ApplicationClass() bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd) { char modelFilename[128]; + char outputModelFilename[128]; char textureFilename[128]; bool result; @@ -54,7 +55,9 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd) m_Camera->SetRotation(0.0f, 0.0f, 10.0f); // Set the file name of the model. - strcpy_s(modelFilename, "cube.txt"); + strcpy_s(modelFilename, "cube.obj"); + + strcpy_s(outputModelFilename, "output.txt"); // Set the name of the texture file that we will be loading. strcpy_s(textureFilename, "stone01.tga"); @@ -62,7 +65,7 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd) // Create and initialize the model object. m_Model = new ModelClass; - result = m_Model->Initialize(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), modelFilename, textureFilename); + result = m_Model->Initialize(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), modelFilename, outputModelFilename, textureFilename); if (!result) { MessageBox(hwnd, L"Could not initialize the model object.", L"Error", MB_OK); diff --git a/enginecustom/cube.mtl b/enginecustom/cube.mtl new file mode 100644 index 0000000..d189f87 --- /dev/null +++ b/enginecustom/cube.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'None' +# Material Count: 2 + +newmtl Material +Ns 323.999994 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 + +newmtl Material.001 +Ns 225.000000 +Ka 1.000000 1.000000 1.000000 +Kd 0.000000 0.002280 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 diff --git a/enginecustom/enginecustom.vcxproj b/enginecustom/enginecustom.vcxproj index aa0bfa9..369e28f 100644 --- a/enginecustom/enginecustom.vcxproj +++ b/enginecustom/enginecustom.vcxproj @@ -45,6 +45,7 @@ <ClInclude Include="textureclass.h" /> </ItemGroup> <ItemGroup> + <None Include="cube.mtl" /> <None Include="light.ps" /> <None Include="light.vs" /> <None Include="packages.config" /> @@ -73,6 +74,16 @@ <ItemGroup> <Text Include="cube.txt" /> </ItemGroup> + <ItemGroup> + <None Include="cylinder.obj"> + <FileType>Document</FileType> + </None> + </ItemGroup> + <ItemGroup> + <None Include="cube.obj"> + <FileType>Document</FileType> + </None> + </ItemGroup> <PropertyGroup Label="Globals"> <VCProjectVersion>17.0</VCProjectVersion> <Keyword>Win32Proj</Keyword> diff --git a/enginecustom/modelclass.cpp b/enginecustom/modelclass.cpp index 25846f3..3debce5 100644 --- a/enginecustom/modelclass.cpp +++ b/enginecustom/modelclass.cpp @@ -19,12 +19,14 @@ ModelClass::~ModelClass() { } -bool ModelClass::Initialize(ID3D11Device* device, ID3D11DeviceContext* deviceContext, char* modelFilename, char* textureFilename) +bool ModelClass::Initialize(ID3D11Device* device, ID3D11DeviceContext* deviceContext, char* modelFilename, char* outputModelFilename, char* textureFilename) { bool result; + ConvertObjToTxt(modelFilename, outputModelFilename); + // Load in the model data. - result = LoadModel(modelFilename); + result = LoadModel(outputModelFilename); if (!result) { return false; @@ -310,6 +312,71 @@ bool ModelClass::LoadModel(char* filename) return true; } +void ModelClass::ConvertObjToTxt(const std::string& inputFilename, const std::string& outputFilename) { + std::ifstream inputFile(inputFilename); + std::ofstream outputFile(outputFilename); + + std::string line; + std::vector<XMFLOAT3> positions; + std::vector<XMFLOAT2> texCoords; + std::vector<XMFLOAT3> normals; + std::vector<ModelType> vertices; + + while (std::getline(inputFile, line)) { + std::istringstream iss(line); + std::string prefix; + + if (!(iss >> prefix)) { break; } + + if (prefix == "v") { + XMFLOAT3 pos; + if (!(iss >> pos.x >> pos.y >> pos.z)) { break; } + positions.push_back(pos); + } + else if (prefix == "vt") { + XMFLOAT2 texCoord; + if (!(iss >> texCoord.x >> texCoord.y)) { break; } + texCoords.push_back(texCoord); + } + else if (prefix == "vn") { + XMFLOAT3 normal; + if (!(iss >> normal.x >> normal.y >> normal.z)) { break; } + normals.push_back(normal); + } + else if (prefix == "f") { + ModelType v; + char slash; // To skip slashes + int posIndex, texIndex, normIndex; + + for (int i = 0; i < 3; ++i) { // For each vertex of the face + if (!(iss >> posIndex >> slash >> texIndex >> slash >> normIndex)) { break; } + + // .obj indices start at 1, so subtract 1 to get 0-based indices + v.x = positions[posIndex - 1].x; + v.y = positions[posIndex - 1].y; + v.z = positions[posIndex - 1].z; + v.tu = texCoords[texIndex - 1].x; + v.tv = texCoords[texIndex - 1].y; + v.nx = normals[normIndex - 1].x; + v.ny = normals[normIndex - 1].y; + v.nz = normals[normIndex - 1].z; + + vertices.push_back(v); + } + } + } + + // Write to output file in the desired format + outputFile << "Vertex Count: " << vertices.size() << "\n\n"; + outputFile << "Data:\n\n"; + + for (const ModelType& v : vertices) { + outputFile << v.x << " " << v.y << " " << v.z << " "; + outputFile << v.tu << " " << v.tv << " "; + outputFile << v.nx << " " << v.ny << " " << v.nz << "\n"; + } +} + void ModelClass::ReleaseModel() { if (m_model) diff --git a/enginecustom/modelclass.h b/enginecustom/modelclass.h index 9ffdcda..a2578e0 100644 --- a/enginecustom/modelclass.h +++ b/enginecustom/modelclass.h @@ -8,6 +8,9 @@ #include <d3d11.h> #include <directxmath.h> #include <fstream> +#include <sstream> +#include <vector> +#include <string> using namespace DirectX; using namespace std; @@ -38,13 +41,30 @@ private: float nx, ny, nz; }; + struct Vertex { + float x, y, z; + }; + + struct Texture { + float u, v; + }; + + struct Normal { + float nx, ny, nz; + }; + + struct Face { + int v1, v2, v3; + int t1, t2, t3; + int n1, n2, n3; + }; public: ModelClass(); ModelClass(const ModelClass&); ~ModelClass(); - bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, char*); + bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, char*, char*); void Shutdown(); void Render(ID3D11DeviceContext*); @@ -62,6 +82,8 @@ private: bool LoadModel(char*); void ReleaseModel(); + void ConvertObjToTxt(const std::string&, const std::string&); + private: ID3D11Buffer* m_vertexBuffer, * m_indexBuffer; int m_vertexCount, m_indexCount; diff --git a/enginecustom/objects/New Bitmap Image.mtl b/enginecustom/objects/New Bitmap Image.mtl new file mode 100644 index 0000000..e69de29 diff --git a/enginecustom/objects/cube.txt b/enginecustom/objects/cube.txt new file mode 100644 index 0000000..00b34ba --- /dev/null +++ b/enginecustom/objects/cube.txt @@ -0,0 +1,40 @@ +Vertex Count: 36 + +Data: + +-1.0 1.0 -1.0 0.0 0.0 0.0 0.0 -1.0 + 1.0 1.0 -1.0 1.0 0.0 0.0 0.0 -1.0 +-1.0 -1.0 -1.0 0.0 1.0 0.0 0.0 -1.0 +-1.0 -1.0 -1.0 0.0 1.0 0.0 0.0 -1.0 + 1.0 1.0 -1.0 1.0 0.0 0.0 0.0 -1.0 + 1.0 -1.0 -1.0 1.0 1.0 0.0 0.0 -1.0 + 1.0 1.0 -1.0 0.0 0.0 1.0 0.0 0.0 + 1.0 1.0 1.0 1.0 0.0 1.0 0.0 0.0 + 1.0 -1.0 -1.0 0.0 1.0 1.0 0.0 0.0 + 1.0 -1.0 -1.0 0.0 1.0 1.0 0.0 0.0 + 1.0 1.0 1.0 1.0 0.0 1.0 0.0 0.0 + 1.0 -1.0 1.0 1.0 1.0 1.0 0.0 0.0 + 1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 +-1.0 1.0 1.0 1.0 0.0 0.0 0.0 1.0 + 1.0 -1.0 1.0 0.0 1.0 0.0 0.0 1.0 + 1.0 -1.0 1.0 0.0 1.0 0.0 0.0 1.0 +-1.0 1.0 1.0 1.0 0.0 0.0 0.0 1.0 +-1.0 -1.0 1.0 1.0 1.0 0.0 0.0 1.0 +-1.0 1.0 1.0 0.0 0.0 -1.0 0.0 0.0 +-1.0 1.0 -1.0 1.0 0.0 -1.0 0.0 0.0 +-1.0 -1.0 1.0 0.0 1.0 -1.0 0.0 0.0 +-1.0 -1.0 1.0 0.0 1.0 -1.0 0.0 0.0 +-1.0 1.0 -1.0 1.0 0.0 -1.0 0.0 0.0 +-1.0 -1.0 -1.0 1.0 1.0 -1.0 0.0 0.0 +-1.0 1.0 1.0 0.0 0.0 0.0 1.0 0.0 + 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 +-1.0 1.0 -1.0 0.0 1.0 0.0 1.0 0.0 +-1.0 1.0 -1.0 0.0 1.0 0.0 1.0 0.0 + 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 + 1.0 1.0 -1.0 1.0 1.0 0.0 1.0 0.0 +-1.0 -1.0 -1.0 0.0 0.0 0.0 -1.0 0.0 + 1.0 -1.0 -1.0 1.0 0.0 0.0 -1.0 0.0 +-1.0 -1.0 1.0 0.0 1.0 0.0 -1.0 0.0 +-1.0 -1.0 1.0 0.0 1.0 0.0 -1.0 0.0 + 1.0 -1.0 -1.0 1.0 0.0 0.0 -1.0 0.0 + 1.0 -1.0 1.0 1.0 1.0 0.0 -1.0 0.0 \ No newline at end of file diff --git a/enginecustom/objects/cylinder.mtl b/enginecustom/objects/cylinder.mtl new file mode 100644 index 0000000..6d43325 --- /dev/null +++ b/enginecustom/objects/cylinder.mtl @@ -0,0 +1,2 @@ +# Blender 4.0.1 MTL File: 'None' +# www.blender.org diff --git a/enginecustom/objects/cylinder_obj.fbx b/enginecustom/objects/cylinder_obj.fbx new file mode 100644 index 0000000..70e0121 Binary files /dev/null and b/enginecustom/objects/cylinder_obj.fbx differ diff --git a/enginecustom/output.txt b/enginecustom/output.txt new file mode 100644 index 0000000..a0908a9 --- /dev/null +++ b/enginecustom/output.txt @@ -0,0 +1,262 @@ +Vertex Count: 258 + +Data: + +1 1 -1 0.625 0.5 0 1 0 +-1 1 -1 0.875 0.5 0 1 0 +-1 1 1 0.875 0.75 0 1 0 +1 -1 1 0.375 0.75 0 0 1 +1 -0.777778 1 0.402778 0.75 0 0 1 +1 -0.555556 1 0.430556 0.75 0 0 1 +-1 -1 1 0.375 0 -1 0 0 +-1 1 1 0.625 0 -1 0 0 +-1 1 -1 0.625 0.25 -1 0 0 +-1 -1 -1 0.125 0.5 0 -1 0 +1 -1 -1 0.375 0.5 0 -1 0 +1 -1 -0.777778 0.375 0.527778 0 -1 0 +1 0.777778 0.777778 0.597222 0.722222 1 0 0 +1 1 0.777778 0.625 0.722222 1 0 0 +1 1 1 0.625 0.75 1 0 0 +-1 -1 -1 0.375 0.25 0 0 -1 +-1 1 -1 0.625 0.25 0 0 -1 +1 1 -1 0.625 0.5 0 0 -1 +1 -1 0.777778 0.375 0.722222 1 0 0 +1 -0.777778 0.777778 0.402778 0.722222 1 0 0 +1 -0.777778 1 0.402778 0.75 1 0 0 +1 -0.777778 0.777778 0.402778 0.722222 1 0 0 +1 -0.555556 0.777778 0.430556 0.722222 1 0 0 +1 -0.555556 1 0.430556 0.75 1 0 0 +1 -0.555556 0.777778 0.430556 0.722222 1 0 0 +1 -0.333333 0.777778 0.458333 0.722222 1 0 0 +1 -0.333333 1 0.458333 0.75 1 0 0 +1 -0.333333 0.777778 0.458333 0.722222 1 0 0 +1 -0.111111 0.777778 0.486111 0.722222 1 0 0 +1 -0.111111 1 0.486111 0.75 1 0 0 +1 -0.111111 0.777778 0.486111 0.722222 1 0 0 +1 0.111111 0.777778 0.513889 0.722222 1 0 0 +1 0.111111 1 0.513889 0.75 1 0 0 +1 0.111111 0.777778 0.513889 0.722222 1 0 0 +1 0.333333 0.777778 0.541667 0.722222 1 0 0 +1 0.333333 1 0.541667 0.75 1 0 0 +1 0.333333 0.777778 0.541667 0.722222 1 0 0 +1 0.555556 0.777778 0.569445 0.722222 1 0 0 +1 0.555556 1 0.569444 0.75 1 0 0 +1 0.555556 0.777778 0.569445 0.722222 1 0 0 +1 0.777778 0.777778 0.597222 0.722222 1 0 0 +1 0.777778 1 0.597222 0.75 1 0 0 +1 -1 -1 0.375 0.5 1 0 0 +1 -0.777778 -1 0.402778 0.5 1 0 0 +1 -0.777778 -0.777778 0.402778 0.527778 1 0 0 +1 -1 -0.777778 0.375 0.527778 1 0 0 +1 -0.777778 -0.777778 0.402778 0.527778 1 0 0 +1 -0.777778 -0.555556 0.402778 0.555556 1 0 0 +1 -1 -0.555556 0.375 0.555556 1 0 0 +1 -0.777778 -0.555556 0.402778 0.555556 1 0 0 +1 -0.777778 -0.333333 0.402778 0.583333 1 0 0 +1 -1 -0.333333 0.375 0.583333 1 0 0 +1 -0.777778 -0.333333 0.402778 0.583333 1 0 0 +1 -0.777778 -0.111111 0.402778 0.611111 1 0 0 +1 -1 -0.111111 0.375 0.611111 1 0 0 +1 -0.777778 -0.111111 0.402778 0.611111 1 0 0 +1 -0.777778 0.111111 0.402778 0.638889 1 0 0 +1 -1 0.111111 0.375 0.638889 1 0 0 +1 -0.777778 0.111111 0.402778 0.638889 1 0 0 +1 -0.777778 0.333333 0.402778 0.666667 1 0 0 +1 -1 0.333333 0.375 0.666667 1 0 0 +1 -0.777778 0.333333 0.402778 0.666667 1 0 0 +1 -0.777778 0.555556 0.402778 0.694444 1 0 0 +1 -1 0.555556 0.375 0.694444 1 0 0 +1 -0.777778 0.555556 0.402778 0.694444 1 0 0 +1 -0.777778 0.777778 0.402778 0.722222 1 0 0 +1 -0.777778 -1 0.402778 0.5 1 0 0 +1 -0.555556 -1 0.430556 0.5 1 0 0 +1 -0.555556 -0.777778 0.430556 0.527778 1 0 0 +1 -0.777778 -0.777778 0.402778 0.527778 1 0 0 +1 -0.555556 -0.777778 0.430556 0.527778 1 0 0 +1 -0.555556 -0.555556 0.430556 0.555556 1 0 0 +1 -0.777778 -0.333333 0.402778 0.583333 1 0 0 +1 -0.555556 -0.333333 0.430556 0.583333 1 0 0 +1 -0.555556 -0.111111 0.430556 0.611111 1 0 0 +1 -0.777778 -0.111111 0.402778 0.611111 1 0 0 +1 -0.555556 -0.111111 0.430556 0.611111 1 0 0 +1 -0.555556 0.111111 0.430556 0.638889 1 0 0 +1 -0.777778 0.333333 0.402778 0.666667 1 0 0 +1 -0.555556 0.333333 0.430556 0.666667 1 0 0 +1 -0.555556 0.555556 0.430556 0.694444 1 0 0 +1 -0.555556 -1 0.430556 0.5 1 0 0 +1 -0.333333 -1 0.458333 0.5 1 0 0 +1 -0.333333 -0.777778 0.458333 0.527778 1 0 0 +1 -0.555556 -0.777778 0.430556 0.527778 1 0 0 +1 -0.333333 -0.777778 0.458333 0.527778 1 0 0 +1 -0.333333 -0.555556 0.458333 0.555556 1 0 0 +1 -0.555556 -0.333333 0.430556 0.583333 1 0 0 +1 -0.333333 -0.333333 0.458333 0.583333 1 0 0 +1 -0.333333 -0.111111 0.458333 0.611111 1 0 0 +1 -0.555556 -0.111111 0.430556 0.611111 1 0 0 +1 -0.333333 -0.111111 0.458333 0.611111 1 0 0 +1 -0.333333 0.111111 0.458333 0.638889 1 0 0 +1 -0.555556 0.333333 0.430556 0.666667 1 0 0 +1 -0.333333 0.333333 0.458333 0.666667 1 0 0 +1 -0.333333 0.555556 0.458333 0.694444 1 0 0 +1 -0.333333 -1 0.458333 0.5 1 0 0 +1 -0.111111 -1 0.486111 0.5 1 0 0 +1 -0.111111 -0.777778 0.486111 0.527778 1 0 0 +1 -0.333333 -0.777778 0.458333 0.527778 1 0 0 +1 -0.111111 -0.777778 0.486111 0.527778 1 0 0 +1 -0.111111 -0.555556 0.486111 0.555556 1 0 0 +1 -0.333333 -0.333333 0.458333 0.583333 1 0 0 +1 -0.111111 -0.333333 0.486111 0.583333 1 0 0 +1 -0.111111 -0.111111 0.486111 0.611111 1 0 0 +1 -0.333333 -0.111111 0.458333 0.611111 1 0 0 +1 -0.111111 -0.111111 0.486111 0.611111 1 0 0 +1 -0.111111 0.111111 0.486111 0.638889 1 0 0 +1 -0.333333 0.333333 0.458333 0.666667 1 0 0 +1 -0.111111 0.333333 0.486111 0.666667 1 0 0 +1 -0.111111 0.555556 0.486111 0.694444 1 0 0 +1 -0.111111 -1 0.486111 0.5 1 0 0 +1 0.111111 -1 0.513889 0.5 1 0 0 +1 0.111111 -0.777778 0.513889 0.527778 1 0 0 +1 -0.111111 -0.777778 0.486111 0.527778 1 0 0 +1 0.111111 -0.777778 0.513889 0.527778 1 0 0 +1 0.111111 -0.555556 0.513889 0.555556 1 0 0 +1 -0.111111 -0.333333 0.486111 0.583333 1 0 0 +1 0.111111 -0.333333 0.513889 0.583333 1 0 0 +1 0.111111 -0.111111 0.513889 0.611111 1 0 0 +1 -0.111111 -0.111111 0.486111 0.611111 1 0 0 +1 0.111111 -0.111111 0.513889 0.611111 1 0 0 +1 0.111111 0.111111 0.513889 0.638889 1 0 0 +1 0.111111 -1 0.513889 0.5 1 0 0 +1 0.333333 -1 0.541667 0.5 1 0 0 +1 0.333333 -0.777778 0.541667 0.527778 1 0 0 +1 0.111111 -0.777778 0.513889 0.527778 1 0 0 +1 0.333333 -0.777778 0.541667 0.527778 1 0 0 +1 0.333333 -0.555556 0.541667 0.555556 1 0 0 +1 0.111111 -0.333333 0.513889 0.583333 1 0 0 +1 0.333333 -0.333333 0.541667 0.583333 1 0 0 +1 0.333333 -0.111111 0.541667 0.611111 1 0 0 +1 0.111111 -0.111111 0.513889 0.611111 1 0 0 +1 0.333333 -0.111111 0.541667 0.611111 1 0 0 +1 0.333333 0.111111 0.541667 0.638889 1 0 0 +1 0.111111 0.333333 0.513889 0.666667 1 0 0 +1 0.333333 0.333333 0.541667 0.666667 1 0 0 +1 0.333333 0.555556 0.541667 0.694444 1 0 0 +1 0.333333 -1 0.541667 0.5 1 0 0 +1 0.555556 -1 0.569444 0.5 1 0 0 +1 0.555556 -0.777778 0.569445 0.527778 1 0 0 +1 0.333333 -0.777778 0.541667 0.527778 1 0 0 +1 0.555556 -0.777778 0.569445 0.527778 1 0 0 +1 0.555556 -0.555556 0.569445 0.555556 1 0 0 +1 0.333333 -0.555556 0.541667 0.555556 1 0 0 +1 0.555556 -0.555556 0.569445 0.555556 1 0 0 +1 0.555556 -0.333333 0.569445 0.583333 1 0 0 +1 0.333333 -0.333333 0.541667 0.583333 1 0 0 +1 0.555556 -0.333333 0.569445 0.583333 1 0 0 +1 0.555556 -0.111111 0.569445 0.611111 1 0 0 +1 0.333333 -0.111111 0.541667 0.611111 1 0 0 +1 0.555556 -0.111111 0.569445 0.611111 1 0 0 +1 0.555556 0.111111 0.569445 0.638889 1 0 0 +1 0.333333 0.333333 0.541667 0.666667 1 0 0 +1 0.555556 0.333333 0.569445 0.666667 1 0 0 +1 0.555556 0.555556 0.569445 0.694444 1 0 0 +1 0.555556 -1 0.569444 0.5 1 0 0 +1 0.777778 -1 0.597222 0.5 1 0 0 +1 0.777778 -0.777778 0.597222 0.527778 1 0 0 +1 0.555556 -0.777778 0.569445 0.527778 1 0 0 +1 0.777778 -0.777778 0.597222 0.527778 1 0 0 +1 0.777778 -0.555556 0.597222 0.555556 1 0 0 +1 0.555556 -0.333333 0.569445 0.583333 1 0 0 +1 0.777778 -0.333333 0.597222 0.583333 1 0 0 +1 0.777778 -0.111111 0.597222 0.611111 1 0 0 +1 0.555556 -0.111111 0.569445 0.611111 1 0 0 +1 0.777778 -0.111111 0.597222 0.611111 1 0 0 +1 0.777778 0.111111 0.597222 0.638889 1 0 0 +1 0.555556 0.333333 0.569445 0.666667 1 0 0 +1 0.777778 0.333333 0.597222 0.666667 1 0 0 +1 0.777778 0.555556 0.597222 0.694444 1 0 0 +1 0.777778 -1 0.597222 0.5 1 0 0 +1 1 -1 0.625 0.5 1 0 0 +1 1 -0.777778 0.625 0.527778 1 0 0 +1 0.777778 -0.777778 0.597222 0.527778 1 0 0 +1 1 -0.777778 0.625 0.527778 1 0 0 +1 1 -0.555556 0.625 0.555556 1 0 0 +1 0.777778 -0.555556 0.597222 0.555556 1 0 0 +1 1 -0.555556 0.625 0.555556 1 0 0 +1 1 -0.333333 0.625 0.583333 1 0 0 +1 0.777778 -0.333333 0.597222 0.583333 1 0 0 +1 1 -0.333333 0.625 0.583333 1 0 0 +1 1 -0.111111 0.625 0.611111 1 0 0 +1 0.777778 -0.111111 0.597222 0.611111 1 0 0 +1 1 -0.111111 0.625 0.611111 1 0 0 +1 1 0.111111 0.625 0.638889 1 0 0 +1 0.777778 0.111111 0.597222 0.638889 1 0 0 +1 1 0.111111 0.625 0.638889 1 0 0 +1 1 0.333333 0.625 0.666667 1 0 0 +1 0.777778 0.333333 0.597222 0.666667 1 0 0 +1 1 0.333333 0.625 0.666667 1 0 0 +1 1 0.555556 0.625 0.694444 1 0 0 +1 0.777778 0.555556 0.597222 0.694444 1 0 0 +1 1 0.555556 0.625 0.694444 1 0 0 +1 1 0.777778 0.625 0.722222 1 0 0 +1 -0.777778 -0.555556 0.402778 0.555556 1 0 0 +1 -0.555556 -0.555556 0.430556 0.555556 1 0 0 +1 -0.555556 -0.333333 0.430556 0.583333 1 0 0 +1 -0.777778 0.111111 0.402778 0.638889 1 0 0 +1 -0.555556 0.111111 0.430556 0.638889 1 0 0 +1 -0.555556 0.333333 0.430556 0.666667 1 0 0 +1 -0.777778 0.555556 0.402778 0.694444 1 0 0 +1 -0.555556 0.555556 0.430556 0.694444 1 0 0 +1 -0.555556 0.777778 0.430556 0.722222 1 0 0 +1 -0.555556 -0.555556 0.430556 0.555556 1 0 0 +1 -0.333333 -0.555556 0.458333 0.555556 1 0 0 +1 -0.333333 -0.333333 0.458333 0.583333 1 0 0 +1 -0.555556 0.111111 0.430556 0.638889 1 0 0 +1 -0.333333 0.111111 0.458333 0.638889 1 0 0 +1 -0.333333 0.333333 0.458333 0.666667 1 0 0 +1 -0.555556 0.555556 0.430556 0.694444 1 0 0 +1 -0.333333 0.555556 0.458333 0.694444 1 0 0 +1 -0.333333 0.777778 0.458333 0.722222 1 0 0 +1 -0.333333 -0.555556 0.458333 0.555556 1 0 0 +1 -0.111111 -0.555556 0.486111 0.555556 1 0 0 +1 -0.111111 -0.333333 0.486111 0.583333 1 0 0 +1 -0.333333 0.111111 0.458333 0.638889 1 0 0 +1 -0.111111 0.111111 0.486111 0.638889 1 0 0 +1 -0.111111 0.333333 0.486111 0.666667 1 0 0 +1 -0.333333 0.555556 0.458333 0.694444 1 0 0 +1 -0.111111 0.555556 0.486111 0.694444 1 0 0 +1 -0.111111 0.777778 0.486111 0.722222 1 0 0 +1 -0.111111 -0.555556 0.486111 0.555556 1 0 0 +1 0.111111 -0.555556 0.513889 0.555556 1 0 0 +1 0.111111 -0.333333 0.513889 0.583333 1 0 0 +1 -0.111111 0.111111 0.486111 0.638889 1 0 0 +1 0.111111 0.111111 0.513889 0.638889 1 0 0 +1 0.111111 0.333333 0.513889 0.666667 1 0 0 +1 -0.111111 0.333333 0.486111 0.666667 1 0 0 +1 0.111111 0.333333 0.513889 0.666667 1 0 0 +1 0.111111 0.555556 0.513889 0.694444 1 0 0 +1 -0.111111 0.555556 0.486111 0.694444 1 0 0 +1 0.111111 0.555556 0.513889 0.694444 1 0 0 +1 0.111111 0.777778 0.513889 0.722222 1 0 0 +1 0.111111 -0.555556 0.513889 0.555556 1 0 0 +1 0.333333 -0.555556 0.541667 0.555556 1 0 0 +1 0.333333 -0.333333 0.541667 0.583333 1 0 0 +1 0.111111 0.111111 0.513889 0.638889 1 0 0 +1 0.333333 0.111111 0.541667 0.638889 1 0 0 +1 0.333333 0.333333 0.541667 0.666667 1 0 0 +1 0.111111 0.555556 0.513889 0.694444 1 0 0 +1 0.333333 0.555556 0.541667 0.694444 1 0 0 +1 0.333333 0.777778 0.541667 0.722222 1 0 0 +1 0.333333 0.111111 0.541667 0.638889 1 0 0 +1 0.555556 0.111111 0.569445 0.638889 1 0 0 +1 0.555556 0.333333 0.569445 0.666667 1 0 0 +1 0.333333 0.555556 0.541667 0.694444 1 0 0 +1 0.555556 0.555556 0.569445 0.694444 1 0 0 +1 0.555556 0.777778 0.569445 0.722222 1 0 0 +1 0.555556 -0.555556 0.569445 0.555556 1 0 0 +1 0.777778 -0.555556 0.597222 0.555556 1 0 0 +1 0.777778 -0.333333 0.597222 0.583333 1 0 0 +1 0.555556 0.111111 0.569445 0.638889 1 0 0 +1 0.777778 0.111111 0.597222 0.638889 1 0 0 +1 0.777778 0.333333 0.597222 0.666667 1 0 0 +1 0.555556 0.555556 0.569445 0.694444 1 0 0 +1 0.777778 0.555556 0.597222 0.694444 1 0 0 +1 0.777778 0.777778 0.597222 0.722222 1 0 0