diff --git a/test/models/X/bottom.tga b/test/models/X/bottom.tga new file mode 100644 index 000000000..4d6fd56e6 Binary files /dev/null and b/test/models/X/bottom.tga differ diff --git a/test/models/X/cube_withRGBAVertexColor.source.txt b/test/models/X/cube_withRGBAVertexColor.source.txt new file mode 100644 index 000000000..d173f5a47 --- /dev/null +++ b/test/models/X/cube_withRGBAVertexColor.source.txt @@ -0,0 +1,16 @@ +From kwxport +http://www.kwxport.org/ + +>> +The kW Xport plug-in source is released under the MIT license. +Basically, it means "feel free to use it; credit the source; don't sue me +if something goes wrong." +>> + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/test/models/X/cube_withRGBAVertexColor.x b/test/models/X/cube_withRGBAVertexColor.x new file mode 100644 index 000000000..2344f1ddd --- /dev/null +++ b/test/models/X/cube_withRGBAVertexColor.x @@ -0,0 +1,505 @@ +xof 0303txt 0032 +template KeyValuePair { + <26e6b1c3-3d4d-4a1d-a437-b33668ffa1c2> + STRING key; + STRING value; +} + +template Frame { + <3d82ab46-62da-11cf-ab39-0020af71e433> + [...] +} + +template Matrix4x4 { + + array FLOAT matrix[16]; +} + +template FrameTransformMatrix { + + Matrix4x4 frameMatrix; +} + +template ObjectMatrixComment { + <95a48e28-7ef4-4419-a16a-ba9dbdf0d2bc> + Matrix4x4 objectMatrix; +} + +template Vector { + <3d82ab5e-62da-11cf-ab39-0020af71e433> + FLOAT x; + FLOAT y; + FLOAT z; +} + +template MeshFace { + <3d82ab5f-62da-11cf-ab39-0020af71e433> + DWORD nFaceVertexIndices; + array DWORD faceVertexIndices[nFaceVertexIndices]; +} + +template Mesh { + <3d82ab44-62da-11cf-ab39-0020af71e433> + DWORD nVertices; + array Vector vertices[nVertices]; + DWORD nFaces; + array MeshFace faces[nFaces]; + [...] +} + +template MeshNormals { + + DWORD nNormals; + array Vector normals[nNormals]; + DWORD nFaceNormals; + array MeshFace faceNormals[nFaceNormals]; +} + +template Coords2d { + + FLOAT u; + FLOAT v; +} + +template MeshTextureCoords { + + DWORD nTextureCoords; + array Coords2d textureCoords[nTextureCoords]; +} + +template ColorRGBA { + <35ff44e0-6c7c-11cf-8f52-0040333594a3> + FLOAT red; + FLOAT green; + FLOAT blue; + FLOAT alpha; +} + +template IndexedColor { + <1630b820-7842-11cf-8f52-0040333594a3> + DWORD index; + ColorRGBA indexColor; +} + +template MeshVertexColors { + <1630b821-7842-11cf-8f52-0040333594a3> + DWORD nVertexColors; + array IndexedColor vertexColors[nVertexColors]; +} + +template VertexElement { + + DWORD Type; + DWORD Method; + DWORD Usage; + DWORD UsageIndex; +} + +template DeclData { + + DWORD nElements; + array VertexElement Elements[nElements]; + DWORD nDWords; + array DWORD data[nDWords]; +} + +template ColorRGB { + + FLOAT red; + FLOAT green; + FLOAT blue; +} + +template Material { + <3d82ab4d-62da-11cf-ab39-0020af71e433> + ColorRGBA faceColor; + FLOAT power; + ColorRGB specularColor; + ColorRGB emissiveColor; + [...] +} + +template MeshMaterialList { + + DWORD nMaterials; + DWORD nFaceIndexes; + array DWORD faceIndexes[nFaceIndexes]; + [Material <3d82ab4d-62da-11cf-ab39-0020af71e433>] +} + +template TextureFilename { + + STRING filename; +} + + +KeyValuePair { + "Date"; + "2008-05-15 15:37:55"; +} + +KeyValuePair { + "File"; + "c:\\code\\sourceforge\\kwxport\\trunkMerged\\test\\data\\cube.max"; +} + +KeyValuePair { + "User"; + "JWatte"; +} + +KeyValuePair { + "CoreTime"; + "0"; +} + +Frame Box01 { + + + FrameTransformMatrix relative { + 1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.492126,0.000000,1.000000;; + } + + ObjectMatrixComment object { + 1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000;; + } + + Mesh mesh_Box01 { + 24; + -0.492126;0.000000;-0.492126;, + -0.492126;0.000000;0.492126;, + 0.492126;0.000000;0.492126;, + 0.492126;0.000000;-0.492126;, + -0.492126;0.984252;-0.492126;, + 0.492126;0.984252;-0.492126;, + 0.492126;0.984252;0.492126;, + -0.492126;0.984252;0.492126;, + -0.492126;0.000000;-0.492126;, + 0.492126;0.000000;-0.492126;, + 0.492126;0.984252;-0.492126;, + -0.492126;0.984252;-0.492126;, + 0.492126;0.000000;-0.492126;, + 0.492126;0.000000;0.492126;, + 0.492126;0.984252;0.492126;, + 0.492126;0.984252;-0.492126;, + 0.492126;0.000000;0.492126;, + -0.492126;0.000000;0.492126;, + -0.492126;0.984252;0.492126;, + 0.492126;0.984252;0.492126;, + -0.492126;0.000000;0.492126;, + -0.492126;0.000000;-0.492126;, + -0.492126;0.984252;-0.492126;, + -0.492126;0.984252;0.492126;; + 12; + 3;0,2,1;, + 3;2,0,3;, + 3;4,6,5;, + 3;6,4,7;, + 3;8,10,9;, + 3;10,8,11;, + 3;12,14,13;, + 3;14,12,15;, + 3;16,18,17;, + 3;18,16,19;, + 3;20,22,21;, + 3;22,20,23;; + + MeshNormals normals { + 24; + 0.000000;-1.000000;0.000000;, + 0.000000;-1.000000;0.000000;, + 0.000000;-1.000000;0.000000;, + 0.000000;-1.000000;0.000000;, + 0.000000;1.000000;0.000000;, + 0.000000;1.000000;0.000000;, + 0.000000;1.000000;0.000000;, + 0.000000;1.000000;0.000000;, + 0.000000;0.000000;-1.000000;, + 0.000000;0.000000;-1.000000;, + 0.000000;0.000000;-1.000000;, + 0.000000;0.000000;-1.000000;, + 1.000000;0.000000;0.000000;, + 1.000000;0.000000;0.000000;, + 1.000000;0.000000;0.000000;, + 1.000000;0.000000;0.000000;, + 0.000000;0.000000;1.000000;, + 0.000000;0.000000;1.000000;, + 0.000000;0.000000;1.000000;, + 0.000000;0.000000;1.000000;, + -1.000000;0.000000;0.000000;, + -1.000000;0.000000;0.000000;, + -1.000000;0.000000;0.000000;, + -1.000000;0.000000;0.000000;; + 12; + 3;0,2,1;, + 3;2,0,3;, + 3;4,6,5;, + 3;6,4,7;, + 3;8,10,9;, + 3;10,8,11;, + 3;12,14,13;, + 3;14,12,15;, + 3;16,18,17;, + 3;18,16,19;, + 3;20,22,21;, + 3;22,20,23;; + } + + MeshTextureCoords tc0 { + 24; + -0.000000;-0.000000;, + -0.000000;1.000000;, + 1.000000;1.000000;, + 1.000000;0.000000;, + 0.000000;1.000000;, + 1.000000;1.000000;, + 1.000000;0.000000;, + 0.000000;0.000000;, + 0.000000;1.000000;, + 1.000000;1.000000;, + 1.000000;0.000000;, + 0.000000;0.000000;, + 0.000000;1.000000;, + 1.000000;1.000000;, + 1.000000;0.000000;, + 0.000000;0.000000;, + 0.000000;1.000000;, + 1.000000;1.000000;, + 1.000000;0.000000;, + 0.000000;0.000000;, + 0.000000;1.000000;, + 1.000000;1.000000;, + 1.000000;0.000000;, + 0.000000;0.000000;; + } + + MeshVertexColors col0 { + 24; + 0;1.000000;0.000000;0.000000;1.000000;;, + 1;1.000000;1.000000;1.000000;1.000000;;, + 2;1.000000;1.000000;1.000000;1.000000;;, + 3;1.000000;0.000000;0.000000;1.000000;;, + 4;1.000000;1.000000;1.000000;1.000000;;, + 5;1.000000;1.000000;1.000000;1.000000;;, + 6;0.000000;1.000000;0.000000;1.000000;;, + 7;0.000000;1.000000;0.000000;1.000000;;, + 8;1.000000;0.000000;0.000000;1.000000;;, + 9;1.000000;0.000000;0.000000;1.000000;;, + 10;1.000000;1.000000;1.000000;1.000000;;, + 11;1.000000;1.000000;1.000000;1.000000;;, + 12;1.000000;0.000000;0.000000;1.000000;;, + 13;1.000000;1.000000;1.000000;1.000000;;, + 14;0.000000;1.000000;0.000000;1.000000;;, + 15;1.000000;1.000000;1.000000;1.000000;;, + 16;1.000000;1.000000;1.000000;1.000000;;, + 17;1.000000;1.000000;1.000000;1.000000;;, + 18;0.000000;1.000000;0.000000;1.000000;;, + 19;0.000000;1.000000;0.000000;1.000000;;, + 20;1.000000;1.000000;1.000000;1.000000;;, + 21;1.000000;0.000000;0.000000;1.000000;;, + 22;1.000000;1.000000;1.000000;1.000000;;, + 23;0.000000;1.000000;0.000000;1.000000;;; + } + + DeclData { + 2; + 2;0;7;0;, + 2;0;6;0;; + 144; + 3031830834, + 0, + 3212836864, + 1065353216, + 0, + 3031830834, + 0, + 1065353216, + 0, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 0, + 0, + 3212836864, + 3033535400, + 0, + 3212836864, + 1065353216, + 0, + 3033535400, + 0, + 1065353216, + 0, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 0, + 0, + 1065353216, + 3030126269, + 0, + 3212836864, + 1065353216, + 0, + 3030126269, + 0, + 1065353216, + 0, + 3212836864, + 0, + 0, + 0, + 1065353216, + 0, + 0, + 0, + 3212836864, + 3031830834, + 0, + 3212836864, + 1065353216, + 0, + 3031830834, + 0, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 1065353216, + 0, + 3212836864, + 0, + 0, + 0, + 0, + 1065353216, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 0, + 0, + 3212836864, + 0, + 0, + 1065353216, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 0, + 1065353216, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 3212836864, + 0, + 0, + 0, + 1065353216, + 0, + 0, + 0, + 3212836864, + 0, + 0, + 1065353216, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 0, + 0, + 1065353216, + 0, + 1065353216, + 0, + 3212836864, + 0, + 0; + } + + MeshMaterialList mtls { + 3; + 12; + 0, + 0, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2; + + Material bottom { + 0.588000;0.588000;0.588000;1.000000;; + 31.000000; + 0.380000;0.380000;0.380000;; + 0.000000;0.000000;0.000000;; + + TextureFilename Diffuse { + "C:\\code\\sourceforge\\kwxport\\trunkMerged\\test\\data\\bottom.tga"; + } + } + + Material top { + 0.588235;0.588235;0.588235;1.000000;; + 52.999996; + 0.780000;0.780000;0.780000;; + 0.000000;0.000000;0.000000;; + + TextureFilename Diffuse { + "C:\\code\\sourceforge\\kwxport\\trunkMerged\\test\\data\\top.tga"; + } + } + + Material side { + 0.588000;0.588000;0.588000;1.000000;; + 57.000000; + 0.700000;0.700000;0.700000;; + 0.000000;0.000000;0.000000;; + + TextureFilename Diffuse { + "C:\\code\\sourceforge\\kwxport\\trunkMerged\\test\\data\\updown.tga"; + } + } + } + } +} \ No newline at end of file diff --git a/test/models/X/top.tga b/test/models/X/top.tga new file mode 100644 index 000000000..16691cd1d Binary files /dev/null and b/test/models/X/top.tga differ diff --git a/test/models/X/updown.tga b/test/models/X/updown.tga new file mode 100644 index 000000000..effa9f0d3 Binary files /dev/null and b/test/models/X/updown.tga differ