From 897a7f7ae31694d58f667f0b640f9e66d3d0d077 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Thu, 23 Apr 2009 18:46:25 +0000 Subject: [PATCH] - Adding a collada test file with two UV channels. - Fixing ColladaLoader's error message if an UV set is invalid. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@401 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ColladaParser.cpp | 2 +- test/models/Collada/cube_with_2UVs.DAE | 156 +++++++++++++++++++++++++ 2 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 test/models/Collada/cube_with_2UVs.DAE diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 8f1116691..5b4321dd1 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -1806,7 +1806,7 @@ void ColladaParser::ReadInputChannel( std::vector& poChannels) if(attrSet > -1){ attrSet = mReader->getAttributeValueAsInt( attrSet); if(attrSet < 0) - ThrowException( boost::str( boost::format( "Invalid index \"%i\" for set attribute") % (channel.mIndex+1))); + ThrowException( boost::str( boost::format( "Invalid index \"%i\" for set attribute") % (attrSet))); channel.mIndex = attrSet; } diff --git a/test/models/Collada/cube_with_2UVs.DAE b/test/models/Collada/cube_with_2UVs.DAE new file mode 100644 index 000000000..d9561a74d --- /dev/null +++ b/test/models/Collada/cube_with_2UVs.DAE @@ -0,0 +1,156 @@ + + + + + Draco + COLLADAMax NextGen; Version: 0.9.5; Revision: 447; Platform: Win32; Configuration: Release Max2008 + file:///C:/Dokumente%20und%20Einstellungen/Draco/Desktop/W%C3%BCrfel.max + + 2008-04-22T19:32:42 + 2008-04-22T19:32:42 + + Z_UP + + + + + + + + 0 0 0 1 + + + 0 0 0 1 + + + 1 1 1 1 + + + 10 + + + 0 0 0 1 + + + 1 1 1 1 + + + 1 + + + + + + + + + + + 0.541176 0.0313725 0.431373 1 + + + 0.541176 0.0313725 0.431373 1 + + + 1 1 1 1 + + + 10 + + + 0 0 0 1 + + + 1 1 1 1 + + + 1 + + + + + + + + + + + + + + + + + + + -1 -1 0 1 -1 0 -1 1 0 1 1 0 -1 -1 2 1 -1 2 -1 1 2 1 1 2 + + + + + + + + + + 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 1 0 0 1 0 0 1 0 0 1 0 -1 0 0 -1 0 0 -1 0 0 -1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 + + + + + + + + + + 0.9995 0.000499487 0.000499547 0.000499547 0.000499487 0.9995 0.000499547 0.000499487 0.000499785 0.000499547 0.000499487 0.9995 0.9995 0.999501 0.000499547 0.000499547 0.999501 0.9995 0.000499547 0.999501 0.000499785 0.000499547 0.999501 0.9995 0.9995 0.000499785 0.000499487 0.9995 0.9995 0.000499487 0.000499547 0.9995 0.000499487 0.000499547 0.9995 0.000499487 0.000499785 0.000499547 0.000499487 0.9995 0.000499785 0.000499487 0.000499547 0.000499785 0.999501 0.9995 0.000499547 0.999501 0.9995 0.9995 0.999501 0.9995 0.9995 0.999501 0.000499785 0.9995 0.999501 0.000499547 0.000499785 0.999501 0.000499547 0.000499487 0.000499785 0.9995 0.000499487 0.000499547 0.9995 0.999501 0.000499547 0.9995 0.999501 0.000499547 0.000499547 0.999501 0.000499785 0.000499547 0.000499487 0.000499785 0.000499547 0.000499487 0.9995 0.9995 0.000499487 0.9995 0.9995 0.999501 0.9995 0.9995 0.999501 0.9995 0.000499547 0.000499487 0.9995 0.9995 0.000499487 0.9995 0.9995 0.999501 0.9995 0.9995 0.999501 0.9995 0.000499547 0.000499487 0.000499785 0.9995 0.999501 0.000499547 + + + + + + + + + + 0.000249892 0.49975 0.49975 0.49975 0.49975 0.000249892 0.49975 0.49975 0.49975 0.49975 0.49975 0.000249892 0.000249892 0.000249743 0.49975 0.49975 0.000249743 0.000249892 0.49975 0.000249743 0.49975 0.49975 0.000249743 0.000249892 0.000249773 0.49975 0.49975 0.000249892 0.000249773 0.49975 0.49975 0.000249892 0.49975 0.49975 0.000249892 0.49975 0.49975 0.49975 0.49975 0.000249773 0.49975 0.49975 0.49975 0.49975 0.000249743 0.000249892 0.49975 0.000249743 0.000249773 0.000249892 0.000249743 0.000249773 0.000249892 0.000249743 0.49975 0.000249773 0.000249743 0.49975 0.49975 0.000249743 0.49975 0.49975 0.49975 0.000249892 0.49975 0.49975 0.000249892 0.000249743 0.49975 0.000249892 0.000249743 0.49975 0.49975 0.000249743 0.49975 0.49975 0.49975 0.49975 0.49975 0.49975 0.000249892 0.000249892 0.49975 0.000249773 0.000249892 0.000249743 0.000249773 0.000249892 0.000249743 0.000249773 0.49975 0.49975 0.000249892 0.000249892 0.49975 0.000249773 0.000249892 0.000249743 0.000249773 0.000249892 0.000249743 0.000249773 0.49975 0.49975 0.49975 0.000249892 0.000249743 0.49975 + + + + + + + + + + + + + + + + +

0 0 8 8 2 1 9 9 3 2 10 10 3 2 11 11 1 3 12 12 0 0 13 13 4 4 14 14 5 5 15 15 7 6 16 16 7 6 17 17 6 7 18 18 4 4 19 19 0 8 20 20 1 9 21 21 5 10 22 22 5 10 23 23 4 11 24 24 0 8 25 25 1 12 26 26 3 13 27 27 7 14 28 28 7 14 29 29 5 15 5 5 1 12 1 1 3 16 30 30 2 17 31 31 6 18 32 32 6 18 33 33 7 19 7 7 3 16 3 3 2 20 34 34 0 21 0 0 4 22 35 35 4 22 4 4 6 23 6 6 2 20 2 2

+
+
+
+
+ + + + + + + + + + + + + + + + + + +
\ No newline at end of file