Skip to content
Browse files

add dae23ds

  • Loading branch information...
1 parent eae01b2 commit 8b4eefd17507d5d04c25635af8b9cad8f33eac05 @opencollada-sebastian opencollada-sebastian committed Nov 6, 2009
Showing with 5,782 additions and 0 deletions.
  1. +387 −0 dae23ds/dae23ds.sln
  2. +4 −0 dae23ds/doc/todo.txt
  3. +145 −0 dae23ds/include/DAE23dsBaseWriter.h
  4. +64 −0 dae23ds/include/DAE23dsBitSet.h
  5. +130 −0 dae23ds/include/DAE23dsChunkIDs.h
  6. +58 −0 dae23ds/include/DAE23dsMaterialsBase.h
  7. +46 −0 dae23ds/include/DAE23dsMaterialsLengthCalculator.h
  8. +51 −0 dae23ds/include/DAE23dsMaterialsWriter.h
  9. +93 −0 dae23ds/include/DAE23dsMeshAccessor.h
  10. +146 −0 dae23ds/include/DAE23dsMeshBase.h
  11. +48 −0 dae23ds/include/DAE23dsMeshHandler.h
  12. +52 −0 dae23ds/include/DAE23dsMeshLengthCalculator.h
  13. +79 −0 dae23ds/include/DAE23dsMeshSpliter.h
  14. +59 −0 dae23ds/include/DAE23dsMeshSpliterDumper.h
  15. +78 −0 dae23ds/include/DAE23dsMeshSpliter_impl.h
  16. +111 −0 dae23ds/include/DAE23dsMeshWriter.h
  17. +39 −0 dae23ds/include/DAE23dsPrerequisites.h
  18. +59 −0 dae23ds/include/DAE23dsSceneGraphBase.h
  19. +71 −0 dae23ds/include/DAE23dsSceneGraphHandler.h
  20. +73 −0 dae23ds/include/DAE23dsSceneGraphWriter.h
  21. +27 −0 dae23ds/include/DAE23dsStableHeaders.h
  22. +38 −0 dae23ds/include/DAE23dsTriangle.h
  23. +459 −0 dae23ds/include/DAE23dsWriter.h
  24. +366 −0 dae23ds/scripts/dae23ds.vcproj
  25. +214 −0 dae23ds/src/DAE23dsBaseWriter.cpp
  26. +74 −0 dae23ds/src/DAE23dsBitSet.cpp
  27. +94 −0 dae23ds/src/DAE23dsMaterialsBase.cpp
  28. +40 −0 dae23ds/src/DAE23dsMaterialsLengthCalculator.cpp
  29. +112 −0 dae23ds/src/DAE23dsMaterialsWriter.cpp
  30. +290 −0 dae23ds/src/DAE23dsMeshAccessor.cpp
  31. +328 −0 dae23ds/src/DAE23dsMeshBase.cpp
  32. +44 −0 dae23ds/src/DAE23dsMeshHandler.cpp
  33. +49 −0 dae23ds/src/DAE23dsMeshLengthCalculator.cpp
  34. +46 −0 dae23ds/src/DAE23dsMeshSpliterDumper.cpp
  35. +699 −0 dae23ds/src/DAE23dsMeshWriter.cpp
  36. +11 −0 dae23ds/src/DAE23dsPrecompiledHeaders.cpp
  37. +50 −0 dae23ds/src/DAE23dsSceneGraphBase.cpp
  38. +160 −0 dae23ds/src/DAE23dsSceneGraphHandler.cpp
  39. +274 −0 dae23ds/src/DAE23dsSceneGraphWriter.cpp
  40. +497 −0 dae23ds/src/DAE23dsWriter.cpp
  41. +58 −0 dae23ds/src/main.cpp
  42. +18 −0 dae23ds/template/template.cpp
  43. +41 −0 dae23ds/template/template.h
View
387 dae23ds/dae23ds.sln
@@ -0,0 +1,387 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dae23ds", "scripts\dae23ds.vcproj", "{06180FAB-1DCF-4E3A-AEF6-0506D0349F49}"
+ ProjectSection(ProjectDependencies) = postProject
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB} = {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68} = {F36A0F1F-D046-4DD9-B231-F3A478443A68}
+ {71A48A24-8603-49FB-9458-CB4E97309378} = {71A48A24-8603-49FB-9458-CB4E97309378}
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7} = {F1DEFC38-6AA9-4799-983B-96610117CAF7}
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A} = {8628A8F8-BD50-4463-9EE7-F9118CBA194A}
+ {D7F466F4-2AEA-4648-BE09-024C887BC157} = {D7F466F4-2AEA-4648-BE09-024C887BC157}
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF} = {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}
+ {2C3C4869-D684-4981-98E7-6D9798B72145} = {2C3C4869-D684-4981-98E7-6D9798B72145}
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39} = {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibXML", "..\Externals\LibXML\scripts\LibXML.vcproj", "{D7F466F4-2AEA-4648-BE09-024C887BC157}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MathMLSolver", "..\Externals\MathMLSolver\scripts\MathMLSolver.vcproj", "{F1DEFC38-6AA9-4799-983B-96610117CAF7}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcre", "..\Externals\pcre\scripts\pcre.vcproj", "{71A48A24-8603-49FB-9458-CB4E97309378}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "COLLADABaseUtils", "..\COLLADABaseUtils\scripts\COLLADABaseUtils.vcproj", "{2C3C4869-D684-4981-98E7-6D9798B72145}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "COLLADAFramework", "..\COLLADAFramework\scripts\COLLADAFramework.vcproj", "{9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7} = {F1DEFC38-6AA9-4799-983B-96610117CAF7}
+ {71A48A24-8603-49FB-9458-CB4E97309378} = {71A48A24-8603-49FB-9458-CB4E97309378}
+ {2C3C4869-D684-4981-98E7-6D9798B72145} = {2C3C4869-D684-4981-98E7-6D9798B72145}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "COLLADASaxFrameworkLoader", "..\COLLADASaxFrameworkLoader\scripts\COLLADASaxFrameworkLoader.vcproj", "{8628A8F8-BD50-4463-9EE7-F9118CBA194A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D7F466F4-2AEA-4648-BE09-024C887BC157} = {D7F466F4-2AEA-4648-BE09-024C887BC157}
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF} = {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}
+ {2C3C4869-D684-4981-98E7-6D9798B72145} = {2C3C4869-D684-4981-98E7-6D9798B72145}
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39} = {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7} = {F1DEFC38-6AA9-4799-983B-96610117CAF7}
+ {71A48A24-8603-49FB-9458-CB4E97309378} = {71A48A24-8603-49FB-9458-CB4E97309378}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GeneratedSaxParser", "..\GeneratedSaxParser\scripts\GeneratedSaxParser.vcproj", "{0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D7F466F4-2AEA-4648-BE09-024C887BC157} = {D7F466F4-2AEA-4648-BE09-024C887BC157}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBuffer", "..\common\libBuffer\scripts\libBuffer.vcproj", "{F36A0F1F-D046-4DD9-B231-F3A478443A68}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libftoa", "..\common\libftoa\scripts\libftoa.vcproj", "{12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug Expat NoValidation|Win32 = Debug Expat NoValidation|Win32
+ Debug Expat NoValidation|x64 = Debug Expat NoValidation|x64
+ Debug Expat|Win32 = Debug Expat|Win32
+ Debug Expat|x64 = Debug Expat|x64
+ Debug LibXML NoValidation|Win32 = Debug LibXML NoValidation|Win32
+ Debug LibXML NoValidation|x64 = Debug LibXML NoValidation|x64
+ Debug LibXML|Win32 = Debug LibXML|Win32
+ Debug LibXML|x64 = Debug LibXML|x64
+ Release Expat NoValidation|Win32 = Release Expat NoValidation|Win32
+ Release Expat NoValidation|x64 = Release Expat NoValidation|x64
+ Release Expat|Win32 = Release Expat|Win32
+ Release Expat|x64 = Release Expat|x64
+ Release LibXML NoValidation|Win32 = Release LibXML NoValidation|Win32
+ Release LibXML NoValidation|x64 = Release LibXML NoValidation|x64
+ Release LibXML|Win32 = Release LibXML|Win32
+ Release LibXML|x64 = Release LibXML|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug Expat NoValidation|Win32.ActiveCfg = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug Expat NoValidation|Win32.Build.0 = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug Expat NoValidation|x64.ActiveCfg = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug Expat|Win32.ActiveCfg = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug Expat|Win32.Build.0 = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug Expat|x64.ActiveCfg = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug LibXML NoValidation|Win32.Build.0 = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug LibXML NoValidation|x64.ActiveCfg = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug LibXML|Win32.ActiveCfg = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug LibXML|Win32.Build.0 = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Debug LibXML|x64.ActiveCfg = Debug|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release Expat NoValidation|Win32.ActiveCfg = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release Expat NoValidation|Win32.Build.0 = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release Expat NoValidation|x64.ActiveCfg = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release Expat|Win32.ActiveCfg = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release Expat|Win32.Build.0 = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release Expat|x64.ActiveCfg = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release LibXML NoValidation|Win32.ActiveCfg = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release LibXML NoValidation|Win32.Build.0 = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release LibXML NoValidation|x64.ActiveCfg = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release LibXML|Win32.ActiveCfg = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release LibXML|Win32.Build.0 = Release|Win32
+ {06180FAB-1DCF-4E3A-AEF6-0506D0349F49}.Release LibXML|x64.ActiveCfg = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug Expat NoValidation|Win32.ActiveCfg = Debug|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug Expat NoValidation|Win32.Build.0 = Debug|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug Expat NoValidation|x64.ActiveCfg = Debug|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug Expat NoValidation|x64.Build.0 = Debug|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug Expat|Win32.ActiveCfg = Debug|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug Expat|Win32.Build.0 = Debug|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug Expat|x64.ActiveCfg = Debug|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug Expat|x64.Build.0 = Debug|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug LibXML NoValidation|Win32.Build.0 = Debug|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug LibXML NoValidation|x64.ActiveCfg = Debug|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug LibXML NoValidation|x64.Build.0 = Debug|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug LibXML|Win32.ActiveCfg = Debug|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug LibXML|Win32.Build.0 = Debug|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug LibXML|x64.ActiveCfg = Debug|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Debug LibXML|x64.Build.0 = Debug|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release Expat NoValidation|Win32.ActiveCfg = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release Expat NoValidation|Win32.Build.0 = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release Expat NoValidation|x64.ActiveCfg = Release|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release Expat NoValidation|x64.Build.0 = Release|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release Expat|Win32.ActiveCfg = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release Expat|Win32.Build.0 = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release Expat|x64.ActiveCfg = Release|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release Expat|x64.Build.0 = Release|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release LibXML NoValidation|Win32.ActiveCfg = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release LibXML NoValidation|Win32.Build.0 = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release LibXML NoValidation|x64.ActiveCfg = Release|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release LibXML NoValidation|x64.Build.0 = Release|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release LibXML|Win32.ActiveCfg = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release LibXML|Win32.Build.0 = Release|Win32
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release LibXML|x64.ActiveCfg = Release|x64
+ {D7F466F4-2AEA-4648-BE09-024C887BC157}.Release LibXML|x64.Build.0 = Release|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug Expat NoValidation|Win32.ActiveCfg = Debug|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug Expat NoValidation|Win32.Build.0 = Debug|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug Expat NoValidation|x64.ActiveCfg = Debug|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug Expat NoValidation|x64.Build.0 = Debug|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug Expat|Win32.ActiveCfg = Debug|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug Expat|Win32.Build.0 = Debug|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug Expat|x64.ActiveCfg = Debug|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug Expat|x64.Build.0 = Debug|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug LibXML NoValidation|Win32.Build.0 = Debug|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug LibXML NoValidation|x64.ActiveCfg = Debug|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug LibXML NoValidation|x64.Build.0 = Debug|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug LibXML|Win32.ActiveCfg = Debug|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug LibXML|Win32.Build.0 = Debug|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug LibXML|x64.ActiveCfg = Debug|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Debug LibXML|x64.Build.0 = Debug|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release Expat NoValidation|Win32.ActiveCfg = Release|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release Expat NoValidation|Win32.Build.0 = Release|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release Expat NoValidation|x64.ActiveCfg = Release|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release Expat NoValidation|x64.Build.0 = Release|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release Expat|Win32.ActiveCfg = Release|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release Expat|Win32.Build.0 = Release|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release Expat|x64.ActiveCfg = Release|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release Expat|x64.Build.0 = Release|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release LibXML NoValidation|Win32.ActiveCfg = Release|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release LibXML NoValidation|Win32.Build.0 = Release|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release LibXML NoValidation|x64.ActiveCfg = Release|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release LibXML NoValidation|x64.Build.0 = Release|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release LibXML|Win32.ActiveCfg = Release|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release LibXML|Win32.Build.0 = Release|Win32
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release LibXML|x64.ActiveCfg = Release|x64
+ {F1DEFC38-6AA9-4799-983B-96610117CAF7}.Release LibXML|x64.Build.0 = Release|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug Expat NoValidation|Win32.ActiveCfg = Debug|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug Expat NoValidation|Win32.Build.0 = Debug|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug Expat NoValidation|x64.ActiveCfg = Debug|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug Expat NoValidation|x64.Build.0 = Debug|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug Expat|Win32.ActiveCfg = Debug|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug Expat|Win32.Build.0 = Debug|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug Expat|x64.ActiveCfg = Debug|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug Expat|x64.Build.0 = Debug|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug LibXML NoValidation|Win32.Build.0 = Debug|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug LibXML NoValidation|x64.ActiveCfg = Debug|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug LibXML NoValidation|x64.Build.0 = Debug|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug LibXML|Win32.ActiveCfg = Debug|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug LibXML|Win32.Build.0 = Debug|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug LibXML|x64.ActiveCfg = Debug|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Debug LibXML|x64.Build.0 = Debug|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release Expat NoValidation|Win32.ActiveCfg = Release|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release Expat NoValidation|Win32.Build.0 = Release|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release Expat NoValidation|x64.ActiveCfg = Release|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release Expat NoValidation|x64.Build.0 = Release|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release Expat|Win32.ActiveCfg = Release|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release Expat|Win32.Build.0 = Release|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release Expat|x64.ActiveCfg = Release|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release Expat|x64.Build.0 = Release|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release LibXML NoValidation|Win32.ActiveCfg = Release|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release LibXML NoValidation|Win32.Build.0 = Release|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release LibXML NoValidation|x64.ActiveCfg = Release|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release LibXML NoValidation|x64.Build.0 = Release|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release LibXML|Win32.ActiveCfg = Release|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release LibXML|Win32.Build.0 = Release|Win32
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release LibXML|x64.ActiveCfg = Release|x64
+ {71A48A24-8603-49FB-9458-CB4E97309378}.Release LibXML|x64.Build.0 = Release|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug Expat NoValidation|Win32.ActiveCfg = Debug|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug Expat NoValidation|Win32.Build.0 = Debug|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug Expat NoValidation|x64.ActiveCfg = Debug|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug Expat NoValidation|x64.Build.0 = Debug|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug Expat|Win32.ActiveCfg = Debug|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug Expat|Win32.Build.0 = Debug|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug Expat|x64.ActiveCfg = Debug|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug Expat|x64.Build.0 = Debug|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug LibXML NoValidation|Win32.Build.0 = Debug|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug LibXML NoValidation|x64.ActiveCfg = Debug|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug LibXML NoValidation|x64.Build.0 = Debug|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug LibXML|Win32.ActiveCfg = Debug|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug LibXML|Win32.Build.0 = Debug|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug LibXML|x64.ActiveCfg = Debug|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Debug LibXML|x64.Build.0 = Debug|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release Expat NoValidation|Win32.ActiveCfg = Release|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release Expat NoValidation|Win32.Build.0 = Release|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release Expat NoValidation|x64.ActiveCfg = Release|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release Expat NoValidation|x64.Build.0 = Release|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release Expat|Win32.ActiveCfg = Release|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release Expat|Win32.Build.0 = Release|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release Expat|x64.ActiveCfg = Release|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release Expat|x64.Build.0 = Release|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release LibXML NoValidation|Win32.ActiveCfg = Release|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release LibXML NoValidation|Win32.Build.0 = Release|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release LibXML NoValidation|x64.ActiveCfg = Release|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release LibXML NoValidation|x64.Build.0 = Release|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release LibXML|Win32.ActiveCfg = Release|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release LibXML|Win32.Build.0 = Release|Win32
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release LibXML|x64.ActiveCfg = Release|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release LibXML|x64.Build.0 = Release|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug Expat NoValidation|Win32.ActiveCfg = Debug|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug Expat NoValidation|Win32.Build.0 = Debug|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug Expat NoValidation|x64.ActiveCfg = Debug|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug Expat NoValidation|x64.Build.0 = Debug|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug Expat|Win32.ActiveCfg = Debug|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug Expat|Win32.Build.0 = Debug|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug Expat|x64.ActiveCfg = Debug|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug Expat|x64.Build.0 = Debug|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug LibXML NoValidation|Win32.Build.0 = Debug|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug LibXML NoValidation|x64.ActiveCfg = Debug|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug LibXML NoValidation|x64.Build.0 = Debug|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug LibXML|Win32.ActiveCfg = Debug|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug LibXML|Win32.Build.0 = Debug|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug LibXML|x64.ActiveCfg = Debug|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Debug LibXML|x64.Build.0 = Debug|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release Expat NoValidation|Win32.ActiveCfg = Release|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release Expat NoValidation|Win32.Build.0 = Release|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release Expat NoValidation|x64.ActiveCfg = Release|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release Expat NoValidation|x64.Build.0 = Release|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release Expat|Win32.ActiveCfg = Release|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release Expat|Win32.Build.0 = Release|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release Expat|x64.ActiveCfg = Release|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release Expat|x64.Build.0 = Release|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release LibXML NoValidation|Win32.ActiveCfg = Release|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release LibXML NoValidation|Win32.Build.0 = Release|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release LibXML NoValidation|x64.ActiveCfg = Release|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release LibXML NoValidation|x64.Build.0 = Release|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release LibXML|Win32.ActiveCfg = Release|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release LibXML|Win32.Build.0 = Release|Win32
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release LibXML|x64.ActiveCfg = Release|x64
+ {9F164B41-40E0-4EFA-A7C7-A89C12B4FB39}.Release LibXML|x64.Build.0 = Release|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug Expat NoValidation|Win32.ActiveCfg = Debug Expat NoValidation|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug Expat NoValidation|Win32.Build.0 = Debug Expat NoValidation|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug Expat NoValidation|x64.ActiveCfg = Debug Expat NoValidation|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug Expat NoValidation|x64.Build.0 = Debug Expat NoValidation|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug Expat|Win32.ActiveCfg = Debug Expat|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug Expat|Win32.Build.0 = Debug Expat|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug Expat|x64.ActiveCfg = Debug Expat|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug Expat|x64.Build.0 = Debug Expat|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug LibXML NoValidation|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug LibXML NoValidation|Win32.Build.0 = Debug LibXML NoValidation|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug LibXML NoValidation|x64.ActiveCfg = Debug LibXML NoValidation|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug LibXML NoValidation|x64.Build.0 = Debug LibXML NoValidation|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug LibXML|Win32.ActiveCfg = Debug LibXML|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug LibXML|Win32.Build.0 = Debug LibXML|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug LibXML|x64.ActiveCfg = Debug LibXML|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Debug LibXML|x64.Build.0 = Debug LibXML|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release Expat NoValidation|Win32.ActiveCfg = Release Expat NoValidation|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release Expat NoValidation|Win32.Build.0 = Release Expat NoValidation|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release Expat NoValidation|x64.ActiveCfg = Release Expat NoValidation|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release Expat NoValidation|x64.Build.0 = Release Expat NoValidation|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release Expat|Win32.ActiveCfg = Release Expat|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release Expat|Win32.Build.0 = Release Expat|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release Expat|x64.ActiveCfg = Release Expat|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release Expat|x64.Build.0 = Release Expat|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release LibXML NoValidation|Win32.ActiveCfg = Release LibXML NoValidation|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release LibXML NoValidation|Win32.Build.0 = Release LibXML NoValidation|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release LibXML NoValidation|x64.ActiveCfg = Release LibXML NoValidation|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release LibXML NoValidation|x64.Build.0 = Release LibXML NoValidation|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release LibXML|Win32.ActiveCfg = Release LibXML|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release LibXML|Win32.Build.0 = Release LibXML|Win32
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release LibXML|x64.ActiveCfg = Release LibXML|x64
+ {8628A8F8-BD50-4463-9EE7-F9118CBA194A}.Release LibXML|x64.Build.0 = Release LibXML|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug Expat NoValidation|Win32.ActiveCfg = Debug Expat|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug Expat NoValidation|Win32.Build.0 = Debug Expat|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug Expat NoValidation|x64.ActiveCfg = Debug Expat|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug Expat NoValidation|x64.Build.0 = Debug Expat|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug Expat|Win32.ActiveCfg = Debug Expat|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug Expat|Win32.Build.0 = Debug Expat|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug Expat|x64.ActiveCfg = Debug Expat|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug Expat|x64.Build.0 = Debug Expat|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug LibXML|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug LibXML NoValidation|Win32.Build.0 = Debug LibXML|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug LibXML NoValidation|x64.ActiveCfg = Debug LibXML|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug LibXML NoValidation|x64.Build.0 = Debug LibXML|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug LibXML|Win32.ActiveCfg = Debug LibXML|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug LibXML|Win32.Build.0 = Debug LibXML|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug LibXML|x64.ActiveCfg = Debug LibXML|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Debug LibXML|x64.Build.0 = Debug LibXML|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release Expat NoValidation|Win32.ActiveCfg = Release Expat|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release Expat NoValidation|Win32.Build.0 = Release Expat|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release Expat NoValidation|x64.ActiveCfg = Release Expat|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release Expat NoValidation|x64.Build.0 = Release Expat|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release Expat|Win32.ActiveCfg = Release Expat|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release Expat|Win32.Build.0 = Release Expat|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release Expat|x64.ActiveCfg = Release Expat|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release Expat|x64.Build.0 = Release Expat|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release LibXML NoValidation|Win32.ActiveCfg = Release LibXML|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release LibXML NoValidation|Win32.Build.0 = Release LibXML|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release LibXML NoValidation|x64.ActiveCfg = Release LibXML|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release LibXML NoValidation|x64.Build.0 = Release LibXML|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release LibXML|Win32.ActiveCfg = Release LibXML|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release LibXML|Win32.Build.0 = Release LibXML|Win32
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release LibXML|x64.ActiveCfg = Release LibXML|x64
+ {0B6C3FEA-0065-44D2-A69A-28F810A4F2AF}.Release LibXML|x64.Build.0 = Release LibXML|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug Expat NoValidation|Win32.ActiveCfg = Debug lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug Expat NoValidation|Win32.Build.0 = Debug lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug Expat NoValidation|x64.ActiveCfg = Debug performance test|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug Expat NoValidation|x64.Build.0 = Debug performance test|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug Expat|Win32.ActiveCfg = Debug lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug Expat|Win32.Build.0 = Debug lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug Expat|x64.ActiveCfg = Debug performance test|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug Expat|x64.Build.0 = Debug performance test|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug LibXML NoValidation|Win32.Build.0 = Debug lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug LibXML NoValidation|x64.ActiveCfg = Debug lib|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug LibXML NoValidation|x64.Build.0 = Debug lib|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug LibXML|Win32.ActiveCfg = Debug lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug LibXML|Win32.Build.0 = Debug lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug LibXML|x64.ActiveCfg = Debug lib|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Debug LibXML|x64.Build.0 = Debug lib|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release Expat NoValidation|Win32.ActiveCfg = Release lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release Expat NoValidation|Win32.Build.0 = Release lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release Expat NoValidation|x64.ActiveCfg = Release performance test|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release Expat NoValidation|x64.Build.0 = Release performance test|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release Expat|Win32.ActiveCfg = Release lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release Expat|Win32.Build.0 = Release lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release Expat|x64.ActiveCfg = Release performance test|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release Expat|x64.Build.0 = Release performance test|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release LibXML NoValidation|Win32.ActiveCfg = Release lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release LibXML NoValidation|Win32.Build.0 = Release lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release LibXML NoValidation|x64.ActiveCfg = Release lib|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release LibXML NoValidation|x64.Build.0 = Release lib|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release LibXML|Win32.ActiveCfg = Release lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release LibXML|Win32.Build.0 = Release lib|Win32
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release LibXML|x64.ActiveCfg = Release lib|x64
+ {F36A0F1F-D046-4DD9-B231-F3A478443A68}.Release LibXML|x64.Build.0 = Release lib|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug Expat NoValidation|Win32.ActiveCfg = Debug lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug Expat NoValidation|Win32.Build.0 = Debug lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug Expat NoValidation|x64.ActiveCfg = Debug performance test|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug Expat NoValidation|x64.Build.0 = Debug performance test|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug Expat|Win32.ActiveCfg = Debug lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug Expat|Win32.Build.0 = Debug lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug Expat|x64.ActiveCfg = Debug performance test|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug Expat|x64.Build.0 = Debug performance test|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug LibXML NoValidation|Win32.ActiveCfg = Debug lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug LibXML NoValidation|Win32.Build.0 = Debug lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug LibXML NoValidation|x64.ActiveCfg = Debug lib|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug LibXML NoValidation|x64.Build.0 = Debug lib|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug LibXML|Win32.ActiveCfg = Debug lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug LibXML|Win32.Build.0 = Debug lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug LibXML|x64.ActiveCfg = Debug lib|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Debug LibXML|x64.Build.0 = Debug lib|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release Expat NoValidation|Win32.ActiveCfg = Release lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release Expat NoValidation|Win32.Build.0 = Release lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release Expat NoValidation|x64.ActiveCfg = Release performance test|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release Expat NoValidation|x64.Build.0 = Release performance test|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release Expat|Win32.ActiveCfg = Release lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release Expat|Win32.Build.0 = Release lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release Expat|x64.ActiveCfg = Release performance test|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release Expat|x64.Build.0 = Release performance test|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release LibXML NoValidation|Win32.ActiveCfg = Release lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release LibXML NoValidation|Win32.Build.0 = Release lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release LibXML NoValidation|x64.ActiveCfg = Release lib|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release LibXML NoValidation|x64.Build.0 = Release lib|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release LibXML|Win32.ActiveCfg = Release lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release LibXML|Win32.Build.0 = Release lib|Win32
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release LibXML|x64.ActiveCfg = Release lib|x64
+ {12BBEF01-C49C-4DE5-B9C9-8E5BD3F4B0AB}.Release LibXML|x64.Build.0 = Release lib|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
4 dae23ds/doc/todo.txt
@@ -0,0 +1,4 @@
+
+- write local mesh matrix for splitted objects
+
+remove calculateMeshNameWithBlockIndex
View
145 dae23ds/include/DAE23dsBaseWriter.h
@@ -0,0 +1,145 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_BASEWRITER_H__
+#define __DAE23DS_BASEWRITER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsWriter.h"
+
+
+namespace DAE23ds
+{
+
+ static const char FILENAME[] = "MAXSCENE";
+
+ class BaseWriter
+ {
+ public:
+
+ private:
+ Writer* mWriter;
+
+ public:
+ BaseWriter( Writer* writer3ds);
+
+ virtual ~BaseWriter();
+
+ static void reportError(const String& method, const String& message, Writer::Severity severity);
+
+ const Writer::GeometryUniqueIdInstanceGeometryInfoMap& getGeometryUniqueIdInstanceGeometryInfoMap();
+
+ void addInstanceGeometryInstanceGeometryInfoPair(const COLLADAFW::UniqueId& geoId, const Writer::InstanceGeometryInfo& instanceGeoInfo);
+
+ void addInstanceGeometryObjectId( const Writer::InstanceGeometryIdentifier& instanceGeometryIdentifier, const Writer::ObjectId& objectId );
+
+ const Writer::ObjectIdList& getInstanceGeometryObjectIds( const Writer::InstanceGeometryIdentifier& instanceGeometryIdentifier );
+
+ const Writer::UniqueIdFWMaterialMap& getUniqueIdFWMaterialMap() { return mWriter->getUniqueIdFWMaterialMap(); }
+
+ const COLLADAFW::Material* getFWMaterialByUniqueId(const COLLADAFW::UniqueId& materialUniqueId);
+
+ const Writer::UniqueIdFWImageMap& getUniqueIdFWImageMap() { return mWriter->getUniqueIdFWImageMap(); }
+
+ const Writer::UniqueIdFWEffectMap& getUniqueIdFWEffectMap() { return mWriter->getUniqueIdFWEffectMap(); }
+
+ const COLLADAFW::Effect* getFWEffectByUniqueId(const COLLADAFW::UniqueId& effectUniqueId);
+
+ void addUniqueIdMaterialNumberPair( const COLLADAFW::UniqueId& materialUniqueId, MaterialNumber materialNumber );
+
+ MaterialNumber getMaterialNumberByUniqueId( const COLLADAFW::UniqueId& materialUniqueId );
+
+ const String& getFileNameByGeometryMaterialBinding(const Writer::GeometryMaterialBinding& binding) const;
+
+ void addGeometryMaterialBindingFileNamePair(const Writer::GeometryMaterialBinding& binding, const String& fileName);
+
+ size_t getAndIncreaseMeshOccurence(const COLLADAFW::UniqueId& meshUniqueId);
+
+ const COLLADABU::URI& getInputFile() const { return mWriter->getInputFile(); }
+
+ const COLLADABU::URI& getOutputFile() const { return mWriter->getOutputFile(); }
+
+ Common::Buffer& getBuffer() { return mWriter->getBuffer(); }
+
+ /** The chunk length of all object block and material blocks.*/
+ ChunkLength getObjectAndMaterialBlockLength() const { return mWriter->getObjectAndMaterialBlockLength(); }
+
+ /** The chunk length of all object block and material blocks.*/
+ void setObjectAndMaterialBlockLength(ChunkLength val) { mWriter->setObjectAndMaterialBlockLength(val); }
+
+ void addToObjectAndMaterialBlockLength(ChunkLength val);
+
+ void addMeshData( const Writer::MeshData& meshData );
+
+ const Writer::MeshData& getMeshData( const COLLADAFW::UniqueId& meshUniqueId ) const;
+
+ Writer::UniqueIdNodeMap& getUniqueIdNodeMap() { return mWriter->getUniqueIdNodeMap(); }
+
+ /** The Object Id of the next object that will be exported.*/
+ Writer::ObjectId getNextObjectId() const { return mWriter->getNextObjectId(); }
+
+ /** Returns and increases the Object Id of the next object that will be exported.*/
+ Writer::ObjectId getAndIncreaseNextObjectId() const;
+
+ /** The Object Id of the next object that will be exported.*/
+ MaterialNumber getNextMaterialNumber() const { return mWriter->getNextMaterialNumber(); }
+
+ /** Returns and increases the Object Id of the next object that will be exported.*/
+ MaterialNumber getAndIncreaseNextMaterialNumber() const;
+
+ /** If true, all the transformations will be applied to meshes and the scene graph will not contain any meshes.*/
+ bool getApplyTransformationsToMeshes() const { return mWriter->getApplyTransformationsToMeshes(); }
+
+
+
+ private:
+
+ /** Disable default copy ctor. */
+ BaseWriter( const BaseWriter& pre );
+
+ /** Disable default assignment operator. */
+ const BaseWriter& operator= ( const BaseWriter& pre );
+
+ };
+
+
+ // do not use in threads!!!!!
+ template<size_t MAX_LENGTH>
+ const char* calculateNameWithIndex( ChunkLength index, const String& name )
+ {
+ // we do not support to big meshes here
+ assert(index < 10000);
+ static char buffer[MAX_LENGTH + 1];
+ size_t basePartLength = min( name.length(), MAX_LENGTH - 4);
+ char* p = buffer;
+ memcpy( p, name.c_str(), basePartLength);
+ p += basePartLength;
+ if ( index < 1000) *(p++) = '0';
+ if ( index < 100) *(p++) = '0';
+ if ( index < 10) *(p++) = '0';
+ p += Common::itoa( index, p, 10);
+ *(p++) = 0;
+ return buffer;
+ }
+
+
+ template<class T>
+ T min(T a, T b)
+ {
+ return (a<b) ? a : b;
+ }
+
+
+ ChunkLength getNodeNameLength( const COLLADAFW::Node* node );
+
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_BASEWRITER_H__
View
64 dae23ds/include/DAE23dsBitSet.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_BITSET_H__
+#define __DAE23DS_BITSET_H__
+
+#include "DAE23dsPrerequisites.h"
+
+
+namespace DAE23ds
+{
+
+ /** Fixed size bit set.*/
+ class BitSet
+ {
+ private:
+
+ /** The buffer that contains the bits.*/
+ char* mBuffer;
+
+ /** The number of bits.*/
+ size_t mBitCount;
+
+ public:
+
+ /** Constructor.
+ @param bitCount number of bits*/
+ BitSet( size_t bitCount );
+
+ /** Constructor.
+ @param bitCount number of bits
+ @param defaultValue the value the bits should be set on construction*/
+ BitSet( size_t bitCount, bool defaultValue );
+
+
+ /** Destructor. */
+ virtual ~BitSet();
+
+ /** Sets the n'th bit. No check is performed if n is in [0...bitCount]*/
+ void setBit( size_t n, bool value);
+
+ /** Returns the n'th bit. No check is performed if n is in [0...bitCount]*/
+ bool setBit( size_t n);
+
+ private:
+
+ /** Disable default copy ctor. */
+ BitSet( const BitSet& pre );
+
+ /** Disable default assignment operator. */
+ const BitSet& operator= ( const BitSet& pre );
+
+ };
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_BITSET_H__
View
130 dae23ds/include/DAE23dsChunkIDs.h
@@ -0,0 +1,130 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_CHUNKIDS_H__
+#define __DAE23DS_CHUNKIDS_H__
+
+#include "DAE23dsPrerequisites.h"
+
+
+namespace DAE23ds
+{
+
+ typedef unsigned short ChunkID;
+
+
+ //>------ Primary chunk
+
+ static const ChunkID MAIN3DS = 0x4D4D;
+
+ //>------ Main Chunks
+
+ static const ChunkID EDIT3DS = 0x3D3D; // this is the start of the editor config
+ static const ChunkID MESH3DS_VERSION= 0x3D3E; // the mesh version
+ static const ChunkID KEYF3DS = 0xB000; // this is the start of the keyframer config
+ static const ChunkID M3D3DS_VERSION = 0x0002; // M3D_VERSION
+
+ //>------ sub defines of EDIT3DS
+
+ static const ChunkID EDIT_MATERIAL = 0xAFFF;
+ static const ChunkID EDIT_MASTERSCALE = 0x0100;
+ static const ChunkID EDIT_CONFIG2 = 0x3E3D;
+ static const ChunkID EDIT_VIEW_P1 = 0x7012;
+ static const ChunkID EDIT_VIEW_P2 = 0x7011;
+ static const ChunkID EDIT_VIEW_P3 = 0x7020;
+ static const ChunkID EDIT_VIEW1 = 0x7001;
+ static const ChunkID EDIT_BACKGR = 0x1200;
+ static const ChunkID EDIT_AMBIENT = 0x2100;
+ static const ChunkID EDIT_OBJECT = 0x4000;
+
+ static const ChunkID EDIT_UNKNW01 = 0x1100;
+ static const ChunkID EDIT_UNKNW02 = 0x1201;
+ static const ChunkID EDIT_UNKNW03 = 0x1300;
+ static const ChunkID EDIT_UNKNW04 = 0x1400;
+ static const ChunkID EDIT_UNKNW05 = 0x1420;
+ static const ChunkID EDIT_UNKNW06 = 0x1450;
+ static const ChunkID EDIT_UNKNW07 = 0x1500;
+ static const ChunkID EDIT_UNKNW08 = 0x2200;
+ static const ChunkID EDIT_UNKNW09 = 0x2201;
+ static const ChunkID EDIT_UNKNW10 = 0x2210;
+ static const ChunkID EDIT_UNKNW11 = 0x2300;
+ static const ChunkID EDIT_UNKNW12 = 0x2302;
+ static const ChunkID EDIT_UNKNW13 = 0x3000;
+ static const ChunkID EDIT_UNKNW14 = 0xAFFF;
+
+ //>------ sub defines of EDIT_OBJECT
+ static const ChunkID OBJ_TRIMESH = 0x4100;
+ static const ChunkID OBJ_LIGHT = 0x4600;
+ static const ChunkID OBJ_CAMERA = 0x4700;
+
+ static const ChunkID OBJ_UNKNWN01 = 0x4010;
+ static const ChunkID OBJ_UNKNWN02 = 0x4012; //>>---- Could be shadow
+
+ //>------ sub defines of OBJ_CAMERA
+ static const ChunkID CAM_UNKNWN01 = 0x4710;
+ static const ChunkID CAM_UNKNWN02 = 0x4720;
+
+ //>------ sub defines of OBJ_LIGHT
+ static const ChunkID LIT_OFF = 0x4620;
+ static const ChunkID LIT_SPOT = 0x4610;
+ static const ChunkID LIT_UNKNWN01 = 0x465A;
+
+ //>------ sub defines of OBJ_TRIMESH
+ static const ChunkID TRI_VERTEXL = 0x4110;
+ static const ChunkID TRI_FACEL2 = 0x4111;
+ static const ChunkID TRI_FACEL1 = 0x4120;
+ static const ChunkID TRI_FACES_MAT = 0x4130;
+ static const ChunkID TRI_SMOOTH = 0x4150;
+ static const ChunkID TRI_LOCAL = 0x4160;
+ static const ChunkID TRI_VISIBLE = 0x4165;
+
+
+ //>>------ sub defs of EDIT_MATERIAL
+ static const ChunkID MATERIAL_NAME = 0xA000;
+ static const ChunkID MATERIAL_AMBIENT_COLOR = 0xA010;
+ static const ChunkID MATERIAL_DIFFUSE_COLOR = 0xA020;
+ static const ChunkID MATERIAL_SPECULAR_COLOR = 0xA030;
+
+
+ //>>------ sub defs of KEYF3DS
+
+ static const ChunkID KEYF_CURTIME = 0xB009;
+ static const ChunkID KEYF_OBJDES = 0xB002;
+ static const ChunkID KEYF_OBJHIERARCH = 0xB010;
+ static const ChunkID KEYF_NODE_ID = 0xB030;
+ static const ChunkID POS_TRACK_TAG = 0xB020;
+ static const ChunkID ROT_TRACK_TAG = 0xB021;
+ static const ChunkID SCL_TRACK_TAG = 0xB022;
+ static const ChunkID PIVOT = 0xB013;
+ static const ChunkID KEYF_HDR = 0xB00A;
+ static const ChunkID KEYF_FRAMES = 0xB008;
+
+ //>>------ these define the different color chunk types
+ static const ChunkID COL_RGB = 0x0010;
+ static const ChunkID COL_TRU = 0x0011;
+ static const ChunkID COL_UNK = 0x0013;
+
+ //>>------ defines for viewport chunks
+
+ static const ChunkID TOP = 0x0001;
+ static const ChunkID BOTTOM = 0x0002;
+ static const ChunkID LEFT = 0x0003;
+ static const ChunkID RIGHT = 0x0004;
+ static const ChunkID FRONT = 0x0005;
+ static const ChunkID BACK = 0x0006;
+ static const ChunkID USER = 0x0007;
+ static const ChunkID CAMERA = 0x0008; // 0xFFFF is the actual code read from file
+ static const ChunkID LIGHT = 0x0009;
+ static const ChunkID DISABLED = 0x0010;
+ static const ChunkID BOGUS = 0x0011;
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_CHUNKIDS_H__
View
58 dae23ds/include/DAE23dsMaterialsBase.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MATERIALSBASE_H__
+#define __DAE23DS_MATERIALSBASE_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsBaseWriter.h"
+
+
+namespace DAE23ds
+{
+
+ class MaterialsBase : public BaseWriter
+ {
+ protected:
+ const Writer::UniqueIdFWMaterialMap& mUniqueIdFWMaterialMap;
+// const Writer::UniqueIdFWImageMap& mUniqueIdFWImageMap;
+ const Writer::UniqueIdFWEffectMap& mUniqueIdFWEffectMap;
+
+ public:
+
+ /** Constructor. */
+ MaterialsBase(Writer* writer3ds);
+
+ /** Destructor. */
+ virtual ~MaterialsBase();
+
+ protected:
+ /** Returns the first common effect of the effect referenced by material.*/
+ const COLLADAFW::EffectCommon* getEffectCommon( const COLLADAFW::Material* material);
+
+ /** Calculates the length of the material block that will be created for @a material.*/
+ ChunkLength calculateMaterialBlockLength( const COLLADAFW::Material* material);
+
+ /** Calculates the length of the color blocks that will be created for @a material.*/
+ ChunkLength MaterialsBase::calculateMaterialColorLength( const COLLADAFW::Material* material);
+
+ private:
+
+ /** Disable default copy ctor. */
+ MaterialsBase( const MaterialsBase& pre );
+
+ /** Disable default assignment operator. */
+ const MaterialsBase& operator= ( const MaterialsBase& pre );
+
+ };
+
+} // namespace DAE23DS
+
+#endif // __DAE23DS_MATERIALSBASE_H__
View
46 dae23ds/include/DAE23dsMaterialsLengthCalculator.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MATERIALSLENGTHCALCULATOR_H__
+#define __DAE23DS_MATERIALSLENGTHCALCULATOR_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsMaterialsBase.h"
+
+
+namespace DAE23ds
+{
+
+ class MaterialsLengthCalculator : public MaterialsBase
+ {
+ public:
+
+ /** Constructor. */
+ MaterialsLengthCalculator(Writer* writer3ds);
+
+ /** Destructor. */
+ virtual ~MaterialsLengthCalculator();
+
+ /** Calculates the length of the entire material block. */
+ void calculate();
+
+ private:
+
+ /** Disable default copy ctor. */
+ MaterialsLengthCalculator( const MaterialsLengthCalculator& pre );
+
+ /** Disable default assignment operator. */
+ const MaterialsLengthCalculator& operator= ( const MaterialsLengthCalculator& pre );
+
+ };
+
+} // namespace DAE23DS
+
+#endif // __DAE23DS_MATERIALSLENGTHCALCULATOR_H__
View
51 dae23ds/include/DAE23dsMaterialsWriter.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MATERIALWRITER_H__
+#define __DAE23DS_MATERIALWRITER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsMaterialsBase.h"
+
+
+namespace DAE23ds
+{
+
+ class MaterialsWriter : public MaterialsBase
+ {
+ private:
+ Common::Buffer& mBuffer;
+
+ public:
+
+ /** Constructor. */
+ MaterialsWriter(Writer* writer3ds);
+
+ /** Destructor. */
+ virtual ~MaterialsWriter();
+
+ /** Writes all the material block and fill the Unique ID Material Number map.*/
+ bool write();
+
+ private:
+
+ /** Disable default copy ctor. */
+ MaterialsWriter( const MaterialsWriter& pre );
+
+ /** Disable default assignment operator. */
+ const MaterialsWriter& operator= ( const MaterialsWriter& pre );
+
+ /** writes one color block using rgb byte .*/
+ bool writeColorBlock(const COLLADAFW::Color& color, ChunkID chunkId);
+ };
+
+} // namespace DAE23DS
+
+#endif // __DAE23DS_MATERIALWRITER_H__
View
93 dae23ds/include/DAE23dsMeshAccessor.h
@@ -0,0 +1,93 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MESHACCESSOR_H__
+#define __DAE23DS_MESHACCESSOR_H__
+
+#include "DAE23dsPrerequisites.h"
+
+#include "DAE23dsTriangle.h"
+
+namespace COLLADAFW
+{
+ class Mesh;
+}
+
+namespace DAE23ds
+{
+
+ /** Helper to access triangles in a mesh.*/
+ class MeshAccessor
+ {
+ public:
+ typedef Triangle<unsigned int> TriangleType;
+ private:
+ /** The mesh.*/
+ const COLLADAFW::Mesh* mMesh;
+
+ /** Number of mesh primitives.*/
+ size_t mMeshPrimitiveCount;
+
+ /** Number of triangles per mesh primitive.*/
+ size_t* mMeshPrimitiveTrianglesCount;
+
+ /** Number of triangles of the mesh.*/
+ size_t mTrianglesCount;
+
+ /** The primitive that contains the current triangle.*/
+ mutable size_t mCurrentPrimitiveIndex;
+
+ /** The current strip or fan of the current triangle, 0 for triangles.*/
+ mutable size_t mCurrentStripFanIndex;
+
+ /** Index of the triangle within the current triangle, strip, or fan.*/
+ mutable size_t mCurrentTriangleInTriStripFanIndex;
+
+ /** Index of the current triangle.*/
+ mutable size_t mCurrentTriangleIndex;
+
+ /** Index in the positions array of the first vertex of the current strip or fan. Only Used by strips and fans*/
+ mutable size_t mCurrentTrianglePositionsArrayIndex;
+
+ public:
+
+ /** Constructor. */
+ MeshAccessor(const COLLADAFW::Mesh* mesh );
+
+ /** Destructor. */
+ virtual ~MeshAccessor();
+
+ /** Returns the number of triangles of the mesh.*/
+ size_t getTrianglesCount() const { return mTrianglesCount; }
+
+ /** Returns the number of triangles of the @a index'th mesh primitive.*/
+ size_t getMeshPrimitiveTriangleCount( size_t index ) const { assert(index < mMeshPrimitiveCount); return mMeshPrimitiveTrianglesCount[index]; }
+
+ /** Returns the @a n'th triangle.*/
+ TriangleType getTriangle( size_t n) const;
+
+ TriangleType getNextTriangle() const;
+
+ private:
+
+ /** Disable default copy ctor. */
+ MeshAccessor( const MeshAccessor& pre );
+
+ /** Disable default assignment operator. */
+ const MeshAccessor& operator= ( const MeshAccessor& pre );
+
+ size_t calculateTrianglesCount() const;
+
+ size_t calculateMeshPrimitiveTriangleCount(const COLLADAFW::MeshPrimitive* meshPrimitive) const;
+ };
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_MESHACCESSOR_H__
View
146 dae23ds/include/DAE23dsMeshBase.h
@@ -0,0 +1,146 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MESHBASE_H__
+#define __DAE23DS_MESHBASE_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsBaseWriter.h"
+
+#include "DAE23dsMeshAccessor.h"
+
+
+
+namespace DAE23ds
+{
+
+ class MeshBase : public BaseWriter
+ {
+ protected:
+ /** Used */
+ struct ObjectBlockData
+ {
+ // ChunkLength verticesCount;
+ CountType trianglesCount;
+ size_t firstTriangleIndex;
+ };
+
+ struct WriteMeshIntoMultipleObjectsData
+ {
+ ChunkLength editObjectLength;
+ ChunkLength fullBlocksCount;
+ ChunkLength remainingTriangles;
+ };
+
+
+ struct WriteMeshIntoOneObject
+ {
+ ChunkLength editObjectLength;
+ ChunkLength triangularMeshLength;
+ ChunkLength verticesLength;
+ ChunkLength facesDescriptionLength;
+ CountType trianglesCount;
+ };
+
+ private:
+ Writer::MeshData mMeshData;
+
+ /** Set of GeometryMaterialBinding that have been handled already. Is used to avoid multiple export of identical meshes.*/
+ Writer::GeometryMaterialBindingSet mGeometryMaterialBindingSet;
+
+ public:
+
+ /** Constructor. */
+ MeshBase(Writer* writer3ds, const Writer::MeshData& meshData);
+
+ /** Constructor. */
+ MeshBase(Writer* writer3ds);
+
+ /** Destructor. */
+ virtual ~MeshBase();
+
+ /** handles the mesh.*/
+ bool handle();
+
+ static void calculateBlockCountAndRemainingTriangles( size_t trianglesCount, ChunkLength& remainingTriangles, ChunkLength& blockCount, ChunkLength& fullBlockCount);
+
+ private:
+
+ /** Disable default copy ctor. */
+ MeshBase( const MeshBase& pre );
+
+ /** Disable default assignment operator. */
+ const MeshBase& operator= ( const MeshBase& pre );
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ bool handleMesh(const Writer::InstanceGeometryInfo& instanceGeometryInfo);
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ bool handleMeshIntoOneObject( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const COLLADAFW::InstanceGeometry* alreadyUsingInstance );
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ bool handleMeshIntoMultipleObjects( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const COLLADAFW::InstanceGeometry* alreadyUsingInstance);
+
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ virtual bool writeMeshIntoMultipleObjects( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const WriteMeshIntoMultipleObjectsData& data, const COLLADAFW::InstanceGeometry* alreadyUsingInstance) = 0;
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ virtual bool writeMeshIntoOneObject( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const WriteMeshIntoOneObject& data, const COLLADAFW::InstanceGeometry* alreadyUsingInstance) = 0;
+
+
+ protected:
+ void setMeshData(const Writer::MeshData& meshData) { mMeshData = meshData; }
+
+
+ /** Calculates the length of the vertices of the current mesh.*/
+ ChunkLength calculateVerticesLength();
+
+ /** Calculates the length of the vertices for a mesh with (verticesCount_times3 / 3) vertices.*/
+ ChunkLength calculateVerticesLength(ChunkLength verticesCount_times3);
+
+ /** Calculates the length of all the vertices of the current mesh, if written into multiple objects.*/
+ ChunkLength calculateTotalVerticesLengthMultiObject(size_t trianglesCount, ChunkLength blockCount );
+
+ /** Calculates the length of the object of the current mesh given the length of the triangular mesh.*/
+ ChunkLength calculateObjectLength(ChunkLength triangularMeshLength);
+
+ /** Calculates the length of all the object of the current mesh given the length of the triangular mesh.*/
+ ChunkLength calculateTotalObjectLengthMultiObject(ChunkLength triangularMeshLength, ChunkLength blockCount);
+
+ /** Calculates the number of triangles in the mesh.*/
+ size_t calculateTrianglesCount();
+
+ /** Calculates the length including null termination of all materials names.*/
+// ChunkLength calculateMaterialNamesLength( const COLLADAFW::InstanceGeometry::MaterialBindingArray& materialBindings);
+
+ /** Calculates the length of all material faces.*/
+ ChunkLength calculateFacesMaterialsLength(CountType trianglesCount, const COLLADAFW::InstanceGeometry::MaterialBindingArray& materialBindings);
+
+ /** Calculates the length of the faces description, given the number of triangles.*/
+ ChunkLength calculateFacesDescriptionLength(CountType trianglesCount, ChunkLength facesMaterialsLength);
+
+ /** Calculates the length of the faces description, given the number of triangles and blocks. The calculated size is for all object blocks.*/
+ ChunkLength calculateFacesDescriptionLengthMultiObject(size_t trianglesCount, ChunkLength blockCount, ChunkLength facesMaterialsLength, ChunkLength remainderFacesMaterialsLength, ChunkLength fullBlocksCount);
+
+ bool splitMeshInChunks();
+
+// ChunkLength calculateMaterialNameLengthFromMaterialBinding( const COLLADAFW::InstanceGeometry::MaterialBinding& materialBinding);
+
+// const char* calculateMaterialNameFromMaterialBinding( const COLLADAFW::InstanceGeometry::MaterialBinding& materialBinding, ChunkLength& length);
+
+ const char* calculateMeshNameWithBlockIndex( ChunkLength blockIndex, const String& meshName );
+
+ };
+
+
+} // namespace DAE23DS
+
+#endif // __DAE23DS_MESHBASE_H__
View
48 dae23ds/include/DAE23dsMeshHandler.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MESHHANDLER_H__
+#define __DAE23DS_MESHHANDLER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsBaseWriter.h"
+
+
+namespace DAE23ds
+{
+
+ class MeshHandler : public BaseWriter
+ {
+ private:
+ const COLLADAFW::Mesh* mMesh;
+
+ public:
+
+ /** Constructor. */
+ MeshHandler(Writer* writer3ds, const COLLADAFW::Mesh* mesh);
+
+ /** Destructor. */
+ virtual ~MeshHandler();
+
+ bool handle();
+
+ private:
+
+ /** Disable default copy ctor. */
+ MeshHandler( const MeshHandler& pre );
+
+ /** Disable default assignment operator. */
+ const MeshHandler& operator= ( const MeshHandler& pre );
+
+ };
+
+} // namespace DAE23DS
+
+#endif // __DAE23DS_MESHHANDLER_H__
View
52 dae23ds/include/DAE23dsMeshLengthCalculator.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MESHLENGTHCALCULATOR_H__
+#define __DAE23DS_MESHLENGTHCALCULATOR_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsMeshBase.h"
+
+
+namespace DAE23ds
+{
+
+ class MeshLengthCalculator: public MeshBase
+ {
+ private:
+
+ public:
+
+ /** Constructor. */
+ MeshLengthCalculator(Writer* writer3ds, const Writer::MeshData& meshData);
+
+ /** Destructor. */
+ virtual ~MeshLengthCalculator();
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ bool writeMeshIntoMultipleObjects( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const WriteMeshIntoMultipleObjectsData& data, const COLLADAFW::InstanceGeometry* alreadyUsingInstance);
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ bool writeMeshIntoOneObject( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const WriteMeshIntoOneObject& data, const COLLADAFW::InstanceGeometry* alreadyUsingInstance);
+
+
+ private:
+
+ /** Disable default copy ctor. */
+ MeshLengthCalculator( const MeshLengthCalculator& pre );
+
+ /** Disable default assignment operator. */
+ const MeshLengthCalculator& operator= ( const MeshLengthCalculator& pre );
+
+ };
+
+} // namespace DAE23DS
+
+#endif // __DAE23DS_MESHLENGTHCALCULATOR_H__
View
79 dae23ds/include/DAE23dsMeshSpliter.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MESHSPLITER_H__
+#define __DAE23DS_MESHSPLITER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsBitSet.h"
+
+namespace COLLADAFW
+{
+ class Mesh;
+}
+
+namespace DAE23ds
+{
+
+ template<class MeshAccessor, class _AccessorIndexType, class TriangleHandler, class _HandlerIndexType>
+ class MeshSpliter
+ {
+ public:
+ typedef _AccessorIndexType AccessorIndexType;
+ typedef _HandlerIndexType HandlerIndexType;
+
+ typedef Triangle<AccessorIndexType> AccessorTriangle;
+ typedef Triangle<HandlerIndexType> HandlerTriangle;
+ private:
+
+ /** The mesh accessor of the mesh to split. */
+ const MeshAccessor& mMeshAccessor;
+
+ /** The triangle handler that handles the triangles and chunks. */
+ TriangleHandler& mTriangleHandler;
+
+ /** The number of triangles in the mesh.*/
+ AccessorIndexType mTrianglesCount;
+
+ /** bitset to store which triangle has already been handled true = "is exported"*/
+ BitSet mHandledTriangles;
+
+ /** Maximal number of tringles per block.*/
+ size_t mMaxTrianglesPerBlock;
+
+ public:
+ /** Constructor. */
+ MeshSpliter( const MeshAccessor& meshAccessor, TriangleHandler& triangleHandler);
+
+ /** Destructor. */
+ virtual ~MeshSpliter();
+
+ /** Performances the splitting of the mesh.*/
+ bool split();
+
+ /** Performances the splitting of the mesh.*/
+ bool splitTest();
+
+ private:
+
+ /** Disable default copy ctor. */
+ MeshSpliter( const MeshSpliter& pre );
+
+ /** Disable default assignment operator. */
+ const MeshSpliter& operator= ( const MeshSpliter& pre );
+
+ };
+
+} // namespace DAE23ds
+
+
+#include "DAE23dsMeshSpliter_impl.h"
+
+#endif // __DAE23DS_MESHSPLITER_H__
View
59 dae23ds/include/DAE23dsMeshSpliterDumper.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MESHSPLITERDUMPER_H__
+#define __DAE23DS_MESHSPLITERDUMPER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "CommonCharacterBuffer.h"
+#include "CommonFWriteBufferFlusher.h"
+
+#include "DAE23dsTriangle.h"
+
+
+namespace DAE23ds
+{
+
+ class MeshSpliterDumper
+ {
+ public:
+ typedef Triangle<short> TriangleType;
+
+ private:
+
+ Common::FWriteBufferFlusher mFlusher;
+
+ Common::CharacterBuffer mCharacterBuffer;
+
+ public:
+
+ /** Constructor. */
+ MeshSpliterDumper();
+
+ /** Destructor. */
+ virtual ~MeshSpliterDumper();
+
+ void handleTriangle( const TriangleType& triangle);
+
+ void handleNewBlock();
+
+ private:
+
+ /** Disable default copy ctor. */
+ MeshSpliterDumper( const MeshSpliterDumper& pre );
+
+ /** Disable default assignment operator. */
+ const MeshSpliterDumper& operator= ( const MeshSpliterDumper& pre );
+
+ };
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_MESHSPLITERDUMPER_H__
View
78 dae23ds/include/DAE23dsMeshSpliter_impl.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MESHSPLITER_IMPL_H__
+#define __DAE23DS_MESHSPLITER_IMPL_H__
+
+#include "DAE23dsPrerequisites.h"
+
+namespace DAE23ds
+{
+
+
+ //------------------------------
+ template<class MeshAccessor, class _AccessorIndexType, class TriangleHandler, class _HandlerIndexType>
+ MeshSpliter<MeshAccessor, _AccessorIndexType, TriangleHandler, _HandlerIndexType>::MeshSpliter( const MeshAccessor& meshAccessor, TriangleHandler& triangleHandler)
+ : mMeshAccessor(meshAccessor)
+ , mTriangleHandler(triangleHandler)
+ , mTrianglesCount( mMeshAccessor.getTrianglesCount())
+ , mHandledTriangles( mTrianglesCount, false )
+ {
+
+ }
+
+
+ //------------------------------
+ template<class MeshAccessor, class _AccessorIndexType, class TriangleHandler, class _HandlerIndexType>
+ DAE23ds::MeshSpliter<MeshAccessor, _AccessorIndexType, TriangleHandler, _HandlerIndexType>::~MeshSpliter()
+ {
+
+ }
+
+ //------------------------------
+ template<class MeshAccessor, class _AccessorIndexType, class TriangleHandler, class _HandlerIndexType>
+ bool
+ DAE23ds::MeshSpliter<MeshAccessor, _AccessorIndexType, TriangleHandler, _HandlerIndexType>::splitTest()
+ {
+
+ //testing
+ AccessorIndexType count = mMeshAccessor.getTrianglesCount();
+ AccessorTriangle triAccessor = mMeshAccessor.getTriangle( 0 );
+ HandlerTriangle triHandler((HandlerIndexType)triAccessor.indices[0],
+ (HandlerIndexType)triAccessor.indices[1],
+ (HandlerIndexType)triAccessor.indices[2]);
+ mTriangleHandler.handleTriangle(triHandler);
+
+
+ for ( AccessorIndexType i = 1; i < count; ++i)
+ {
+ AccessorTriangle triAccessor = mMeshAccessor.getNextTriangle( );
+ HandlerTriangle triHandler((HandlerIndexType)triAccessor.indices[0],
+ (HandlerIndexType)triAccessor.indices[1],
+ (HandlerIndexType)triAccessor.indices[2]);
+ mTriangleHandler.handleTriangle(triHandler);
+ }
+ return true;
+ }
+
+ //------------------------------
+ template<class MeshAccessor, class _AccessorIndexType, class TriangleHandler, class _HandlerIndexType>
+ bool
+ DAE23ds::MeshSpliter<MeshAccessor, _AccessorIndexType, TriangleHandler, _HandlerIndexType>::split()
+ {
+
+
+ return true;
+ }
+
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_MESHSPLITER_IMPL_H__
View
111 dae23ds/include/DAE23dsMeshWriter.h
@@ -0,0 +1,111 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_MESHWRITER_H__
+#define __DAE23DS_MESHWRITER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsMeshBase.h"
+
+#include "DAE23dsChunkIDs.h"
+
+namespace Common
+{
+ class Buffer;
+}
+
+namespace DAE23ds
+{
+ class Writer;
+
+ class MeshWriter : public MeshBase
+ {
+ private:
+
+ const COLLADAFW::Mesh* mMesh;
+
+ Common::Buffer& mBuffer;
+
+ // material ids of the triangles in the last block written
+ COLLADAFW::MaterialId mMaterialIds[MAX_TRIANGLES_PER_BLOCK];
+
+ MeshAccessor mMeshAccessor;
+
+ const COLLADAFW::MeshVertexData& mMeshPositions;
+ const COLLADAFW::MeshVertexData& mMeshNormals;
+ const COLLADAFW::MeshVertexData& mMeshUVCoordinates;
+ const COLLADAFW::MeshVertexData& mMeshColors;
+
+
+ public:
+
+ /** Constructor. */
+ MeshWriter(Writer* writer3ds, const COLLADAFW::Mesh* mesh );
+
+ /** Destructor. */
+ virtual ~MeshWriter();
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ bool writeMeshIntoOneObject( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const WriteMeshIntoOneObject& data, const COLLADAFW::InstanceGeometry* alreadyUsingInstance);
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ bool writeMeshIntoMultipleObjects( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const WriteMeshIntoMultipleObjectsData& data, const COLLADAFW::InstanceGeometry* alreadyUsingInstance);
+
+ /** Writes the mesh using @a materialBindings to assign materials.*/
+ bool writeMeshIntoObject( const Writer::InstanceGeometryInfo& instanceGeometryInfo);
+
+ /** Writes the mesh using @a materialBindings to assign materials and data provided in @a blockData.*/
+ bool writeMeshIntoObject( const Writer::InstanceGeometryInfo& instanceGeometryInfo, const ObjectBlockData& blockData);
+
+ /** Writes the vertices/position as floats into @a buffer.*/
+ bool writeVertices(const COLLADABU::Math::Matrix4& worldMatrix);
+
+ /** Writes the positions for @a trianglesCount triangles, starting at @a firstTriangleIndex.*/
+ bool writeVerticesForMultipleObjects(size_t firstTriangleIndex, CountType trianglesCount, const COLLADABU::Math::Matrix4& worldMatrix);
+
+ /** Writes all the triangles/fans/strips into @a buffer.*/
+ bool writeTriangles();
+
+
+ /** Writes the numbers 0...@a trianglesCount into @a buffer.*/
+ bool writeTrianglesForMultipleObjects(CountType trianglesCount);
+
+ /** writes the faces materials.*/
+ bool writeFaceMaterials(const COLLADAFW::InstanceGeometry::MaterialBindingArray& materialBindings);
+
+ /** */
+ bool writeFaceMaterialsForMultipleObjects(const COLLADAFW::InstanceGeometry::MaterialBindingArray& materialBindings, const ObjectBlockData& blockData);
+
+ /** Writes the mesh matrix of the tri object.*/
+ bool writeMeshMatrix(const COLLADABU::Math::Matrix4& worldMatrix);
+
+ /** Calculates the number of triangles in the @a meshPrimitiveIndex'th meshPrimitive.*/
+ IndexType calculateMeshPrimitivesTriangleCount(size_t meshPrimitiveIndex);
+
+ private:
+
+ /** Disable default copy ctor. */
+ MeshWriter( const MeshWriter& pre );
+
+ /** Disable default assignment operator. */
+ const MeshWriter& operator= ( const MeshWriter& pre );
+
+ bool splitMeshInChunks();
+
+ template<class T>
+ void transformAndWriteVertex( const T& vertex, float wm[3][4], size_t index);
+
+ template<class T>
+ void transformAndWriteVertex( const T& vertex, const COLLADABU::Math::Matrix4& worldMatrix, size_t index);
+ };
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_MESHWRITER_H__
View
39 dae23ds/include/DAE23dsPrerequisites.h
@@ -0,0 +1,39 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_PREREQUISITES_H__
+#define __DAE23DS_PREREQUISITES_H__
+
+#include <string>
+
+namespace DAE23ds
+{
+ typedef std::string String;
+}
+
+
+// Endian Settings
+// check for BIG_ENDIAN config flag, set CPF_ENDIAN correctly
+#ifdef CPF_CONFIG_BIG_ENDIAN
+# define CPF_ENDIAN CPF_ENDIAN_BIG
+#else
+# define CPF_ENDIAN CPF_ENDIAN_LITTLE
+#endif
+
+// Integer formats of fixed bit width
+typedef unsigned int uint32;
+typedef unsigned short uint16;
+typedef unsigned char uint8;
+
+
+
+#endif //__DAE23DS_PREREQUISITES_H__
+
+
View
59 dae23ds/include/DAE23dsSceneGraphBase.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_SCENEGRAPHBASE_H__
+#define __DAE23DS_SCENEGRAPHBASE_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsBaseWriter.h"
+
+
+namespace DAE23ds
+{
+
+ class SceneGraphBase : public BaseWriter
+ {
+ private:
+ typedef std::map<const COLLADAFW::InstanceGeometry*, size_t> InstanceGeometryNextInstanceNumberMap;
+
+ protected:
+ const COLLADAFW::VisualScene* mVisualScene;
+ const Writer::LibraryNodesList& mLibraryNodesList;
+
+ private:
+ /** Maps each instance to the next instance number.*/
+ InstanceGeometryNextInstanceNumberMap mInstanceGeometryNextInstanceNumberMap;
+
+ public:
+
+ /** Constructor. */
+ SceneGraphBase( Writer* writer3ds, const COLLADAFW::VisualScene* visualScene, const Writer::LibraryNodesList& libraryNodesList );
+
+ /** Destructor. */
+ virtual ~SceneGraphBase();
+
+ protected:
+
+ /** Returns the next instance number for @a instance. It is used to uniquely identify instances that occur multiple times.*/
+ size_t getNextInstanceNumber( const COLLADAFW::InstanceGeometry* instance);
+
+ private:
+
+ /** Disable default copy ctor. */
+ SceneGraphBase( const SceneGraphBase& pre );
+
+ /** Disable default assignment operator. */
+ const SceneGraphBase& operator= ( const SceneGraphBase& pre );
+
+ };
+
+} // namespace DAE23DS
+
+#endif // __DAE23DS_SCENEGRAPHBASE_H__
View
71 dae23ds/include/DAE23dsSceneGraphHandler.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_SCENEGRAPHHANDLER_H__
+#define __DAE23DS_SCENEGRAPHHANDLER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsSceneGraphBase.h"
+
+
+namespace DAE23ds
+{
+
+ class SceneGraphHandler : public SceneGraphBase
+ {
+ private:
+ struct NodeInfo
+ {
+ NodeInfo( COLLADABU::Math::Matrix4 _worldTransformation)
+ : worldTransformation(_worldTransformation){}
+ COLLADABU::Math::Matrix4 worldTransformation;
+ };
+
+ typedef std::stack<NodeInfo> NodeInfoStack;
+
+ private:
+ NodeInfoStack mNodeInfoStack;
+ Writer::UniqueIdNodeMap& mUniqueIdNodeMap;
+
+ ChunkLength mSceneGraphLength;
+
+ public:
+
+ SceneGraphHandler( Writer* writer3ds, const COLLADAFW::VisualScene* visualScene, const Writer::LibraryNodesList& libraryNodesList );
+
+ virtual ~SceneGraphHandler();
+
+ bool handle();
+
+ ChunkLength getScenegraphLength() const { return mSceneGraphLength; }
+
+
+ private:
+
+ /** Disable default copy ctor. */
+ SceneGraphHandler( const SceneGraphHandler& pre );
+
+ /** Disable default assignment operator. */
+ const SceneGraphHandler& operator= ( const SceneGraphHandler& pre );
+
+ bool handleNodes( const COLLADAFW::NodePointerArray& nodesToWriter);
+
+ bool handleNode( const COLLADAFW::Node* nodeToWriter);
+
+ void handleInstanceGeometries( const COLLADAFW::Node* node, const COLLADABU::Math::Matrix4& matrix );
+
+ void handleInstanceNodes( const COLLADAFW::InstanceNodePointerArray& instanceNodes);
+
+ void addNodeLength( ChunkLength objectRefLength, ChunkLength factor , const COLLADABU::Math::Matrix4& matrix);
+ };
+
+} // namespace DAE23DS
+
+#endif // __DAE23DS_SCENEGRAPHHANDLER_H__
View
73 dae23ds/include/DAE23dsSceneGraphWriter.h
@@ -0,0 +1,73 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_SCENEGRAPHWRITER_H__
+#define __DAE23DS_SCENEGRAPHWRITER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsSceneGraphBase.h"
+
+namespace DAE23ds
+{
+
+ class SceneGraphWriter : public SceneGraphBase
+ {
+ private:
+ struct NodeInfo
+ {
+ NodeInfo( COLLADABU::Math::Matrix4 _worldTransformation)
+ : worldTransformation(_worldTransformation){}
+ COLLADABU::Math::Matrix4 worldTransformation;
+ };
+
+ typedef std::stack<NodeInfo> NodeInfoStack;
+
+
+ private:
+ Common::Buffer& mBuffer;
+
+ NodeInfoStack mNodeInfoStack;
+ Writer::UniqueIdNodeMap& mUniqueIdNodeMap;
+
+ /** The 3ds node id that will be used by the next frame work node.*/
+ short mNext3dsNodeId;
+
+ public:
+
+ SceneGraphWriter( Writer* writer3ds, const COLLADAFW::VisualScene* visualScene, const Writer::LibraryNodesList& libraryNodesList );
+
+ virtual ~SceneGraphWriter();
+
+ bool write( ChunkLength scenegraphLength );
+
+
+ private:
+
+ /** Disable default copy ctor. */
+ SceneGraphWriter( const SceneGraphWriter& pre );
+
+ /** Disable default assignment operator. */
+ const SceneGraphWriter& operator= ( const SceneGraphWriter& pre );
+
+ bool writeNodes( const COLLADAFW::NodePointerArray& nodesToWriter, short parent3dsNodeId);
+
+ bool writeNode(const char* objectRefName, ChunkLength objectRefLength, short nodeId, short parent3dsNodeId, const COLLADABU::Math::Matrix4& matrix );
+
+ bool writeNode( const COLLADAFW::Node* nodeToWriter, short parent3dsNodeId);
+
+ void writeInstanceGeometries( const COLLADAFW::InstanceGeometryPointerArray& instanceGeometries, short parent3dsNodeId );
+
+ void writeInstanceNodes( const COLLADAFW::InstanceNodePointerArray& instanceNodes, short parent3dsNodeIde);
+
+ };
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_SCENEGRAPHWRITER_H__
View
27 dae23ds/include/DAE23dsStableHeaders.h
@@ -0,0 +1,27 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_STABLE_HEADERS_H__
+#define __DAE23DS_STABLE_HEADERS_H__
+
+#include <string>
+#include <map>
+#include <list>
+#include <stack>
+#include <vector>
+#include <iostream>
+
+// base utils
+#include "COLLADABU.h"
+
+// framework
+#include "COLLADAFW.h"
+
+#endif //__DAE23DS_STABLE_HEADERS_H__
View
38 dae23ds/include/DAE23dsTriangle.h
@@ -0,0 +1,38 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_TRIANGLE_H__
+#define __DAE23DS_TRIANGLE_H__
+
+#include "DAE23dsPrerequisites.h"
+
+
+namespace DAE23ds
+{
+
+ template<class T>
+ struct Triangle
+ {
+ Triangle( T i1, T i2, T i3, COLLADAFW::MaterialId _materialId)
+ : materialId(_materialId)
+ {
+ indices[0] = i1;
+ indices[1] = i2;
+ indices[2] = i3;
+ }
+
+ COLLADAFW::MaterialId materialId;
+ T indices[3];
+ };
+
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_TRIANGLE_H__
View
459 dae23ds/include/DAE23dsWriter.h
@@ -0,0 +1,459 @@
+/*
+ Copyright (c) 2009 NetAllied Systems GmbH
+
+ This file is part of dae23ds.
+
+ Licensed under the MIT Open Source License,
+ for details please see LICENSE file or the website
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+#ifndef __DAE23DS_WRITER_H__
+#define __DAE23DS_WRITER_H__
+
+#include "DAE23dsPrerequisites.h"
+#include "DAE23dsChunkIDs.h"
+
+#include "COLLADAFWIWriter.h"
+#include "COLLADAFWUniqueId.h"
+#include "COLLADAFWVisualScene.h"
+#include "COLLADAFWLibraryNodes.h"
+#include "COLLADAFWMaterial.h"
+#include "COLLADAFWEffect.h"
+#include "COLLADAFWImage.h"
+
+#include "COLLADABUURI.h"
+#include "Math/COLLADABUMathMatrix4.h"
+
+#include <stack>
+#include <list>
+#include <map>
+
+
+namespace Common
+{
+ class Buffer;
+}
+
+
+namespace DAE23ds
+{
+
+ typedef unsigned int ChunkLength;
+ typedef unsigned short CountType;
+ typedef unsigned short IndexType;
+
+ /** Number used to uniquely identify material in the .3ds file.*/
+ typedef unsigned long MaterialNumber;
+
+ /** The name of an object name including null termination.*/
+ static const size_t OBJECT_NAME_LENGTH = 8;
+
+
+ // The length of an empty chunk
+ static const ChunkLength EMPTY_CHUNK_LENGTH = sizeof(ChunkID) + sizeof(ChunkLength);
+
+
+ // .3ds support only indices up to 65535
+ static const IndexType MAX_INDEX_COUNT = 65535;
+// static const IndexType MAX_INDEX_COUNT = 5;
+
+ static const IndexType MAX_TRIANGLES_PER_BLOCK = MAX_INDEX_COUNT/3;
+
+ // the flags used for faces
+ static const CountType FACES_FLAGS = 6;
+
+ // the length of a color chunk that uses rgb byte
+ static const ChunkLength COLOR_CHUNK_LENGTH_RGB_BYTE = 15;
+
+ // the length of a rgb byte chunk
+ static const ChunkLength CHUNK_RGB_BYTE_LENGTH = 9;
+
+ // the length of the mesh version chunk
+ static const ChunkLength MESH_VERSION_CHUNK_LENGTH = EMPTY_CHUNK_LENGTH + sizeof(ChunkLength);
+
+ // mesh version. taken from max export
+ static const ChunkLength MESH_VERSION = 3;
+
+ // the length of the M3D_VERSION version chunk
+ static const ChunkLength M3D_VERSION_CHUNK_LENGTH = EMPTY_CHUNK_LENGTH + sizeof(ChunkLength);
+
+ // the length of the master scale chunk chunk
+ static const ChunkLength EDIT_MASTERSCALE_CHUNK_LENGTH = EMPTY_CHUNK_LENGTH + sizeof(float);
+
+ // M3D_VERSION version. taken from max export
+ static const ChunkLength M3D_VERSION = 3;
+
+ // length of a mesh object node pivot
+ static const ChunkLength PIVOT_LENGTH = EMPTY_CHUNK_LENGTH + 3*sizeof(float);
+
+ // length of a potion track chunk with one frame
+ static const ChunkLength POS_TRACK_TAG_LENGTH = 0x26;
+
+ // length of a rotation track chunk with one frame
+ static const ChunkLength ROT_TRACK_TAG_LENGTH = 0x2A;
+
+ // length of a rotation track chunk with one frame
+ static const ChunkLength SCL_TRACK_TAG_LENGTH = 0x26;
+
+ // length of a local matrix
+ static const ChunkLength TRI_LOCAL_LENGTH = EMPTY_CHUNK_LENGTH + 4*3*sizeof(float);
+
+
+ static const char MATERIAL_NAME_PREFIX[] ="Mat";
+
+
+
+ class Writer : public COLLADAFW::IWriter
+ {
+ public:
+ enum Runs
+ {
+ SCENEGRAPH_RUN,
+ GEOMETRY_RUN
+ };
+
+ typedef std::list<const COLLADAFW::LibraryNodes> LibraryNodesList;
+
+ struct InstanceGeometryInfo
+ {
+ InstanceGeometryInfo( const COLLADAFW::InstanceGeometry* _fwInstanceGeometry,
+ const COLLADABU::Math::Matrix4& _worldMatrix,
+ size_t _instanceNumber)
+ : fwInstanceGeometry(_fwInstanceGeometry)
+ , worldMatrix(_worldMatrix)
+ , instanceNumber(_instanceNumber) {}
+ const COLLADAFW::InstanceGeometry* fwInstanceGeometry;
+
+ COLLADABU::Math::Matrix4 worldMatrix;
+
+ /** the consecutive number of the instance. It is used to assign the correct mesh when instantiating it in the scene graph.*/
+ size_t instanceNumber;
+
+ bool operator<( const InstanceGeometryInfo& rhs ) const;
+ };
+
+
+ struct InstanceGeometryIdentifier
+ {
+ InstanceGeometryIdentifier( const COLLADAFW::InstanceGeometry* _fwInstanceGeometry,
+ size_t _instanceNumber)
+ : fwInstanceGeometry(_fwInstanceGeometry)
+ , instanceNumber(_instanceNumber) {}
+ const COLLADAFW::InstanceGeometry* fwInstanceGeometry;
+ /** the consecutive number of the instance. It is used to assign the correct mesh when instantiating it in the scene graph.*/
+ size_t instanceNumber;
+
+ bool operator<( const InstanceGeometryIdentifier& rhs ) const;
+ };
+
+ typedef std::map<COLLADAFW::MaterialId /* material id used by mesh primitives*/, COLLADAFW::UniqueId /* Material UniqueId*/ > MaterialBindingMap;
+
+
+ /** Use to uniquely identify equal meshes, if same geometry with same material binding.*/
+ struct GeometryMaterialBinding
+ {
+ const COLLADAFW::InstanceGeometry* fwInstanceGeometry;
+
+ /** Stores the material binding in a map for faster comparison.*/
+ mutable MaterialBindingMap bindingMap;
+ };
+
+ /** Maps each unique mesh to its file name. Used to avoid duplication of identical meshes.*/
+ typedef std::map< GeometryMaterialBinding, String, bool(*)(const GeometryMaterialBinding& lhs, const GeometryMaterialBinding& rhs)> GeometryMaterialBindingFileNameMap;
+
+ /** Set of GeometryMaterialBinding.*/
+ typedef std::set<GeometryMaterialBinding, bool(*)(const GeometryMaterialBinding& lhs, const GeometryMaterialBinding& rhs)> GeometryMaterialBindingSet;
+
+ /** Maps each mesh to the number of occurrences of the mesh, i.e. how often it has been used with diferen material binding.*/
+ typedef std::map<COLLADAFW::UniqueId /*mesh unique id*/, size_t /*occurrences */> MeshOccurencesMap;
+
+ typedef std::multimap<COLLADAFW::UniqueId, InstanceGeometryInfo> GeometryUniqueIdInstanceGeometryInfoMap;
+
+ typedef std::set<InstanceGeometryInfo> InstanceGeometryInfoSet;
+
+ /** Id of an object created in a .3ds file. This id is used to create a name of the object.*/
+ typedef unsigned long long ObjectId;
+
+ typedef std::vector<ObjectId> ObjectIdList;
+
+
+ typedef std::map<InstanceGeometryIdentifier, ObjectIdList> InstanceGeometryObjectIdMap;
+
+ /** Maps unique ids of framework materials to the corresponding framework material.*/
+ typedef std::map<COLLADAFW::UniqueId, COLLADAFW::Material> UniqueIdFWMaterialMap;
+
+ /** Maps unique ids of framework images to the corresponding framework image.*/
+ typedef std::map<COLLADAFW::UniqueId, COLLADAFW::Image> UniqueIdFWImageMap;
+
+ /** Maps unique ids of framework effects to the corresponding framework material.*/
+ typedef std::map<COLLADAFW::UniqueId, COLLADAFW::Effect> UniqueIdFWEffectMap;
+
+ enum Severity
+ {
+ SEVERITY_INFORMATION,
+ SEVERITY_WARNING,
+ _SEVERITY_ERROR
+ };
+
+ struct MeshData
+ {
+ COLLADAFW::UniqueId meshUniqueId;
+ size_t trianglesCount;
+ size_t positionsCount;
+ String name;
+ };
+
+ typedef std::map< COLLADAFW::UniqueId, MeshData > MeshDataMap;
+
+ typedef std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> UniqueIdNodeMap;
+
+ typedef std::map< COLLADAFW::UniqueId, MaterialNumber> UniqueMaterialNumberMap;
+
+ private:
+ COLLADABU::URI mInputFile;
+ COLLADABU::URI mOutputFile;
+
+ /** If true, all the transformations will be applied to meshes and the scene graph will not contain any meshes.*/
+ bool mApplyTransformationsToMeshes;
+
+ Common::Buffer* mBuffer;
+
+ Runs mCurrentRun;
+
+ COLLADAFW::VisualScene* mVisualScene;
+ LibraryNodesList mLibraryNodesList;
+ UniqueIdNodeMap mUniqueIdNodeMap;
+
+
+ GeometryUniqueIdInstanceGeometryInfoMap mGeometryUniqueIdInstanceGeometryInfoMap;
+
+ /** This set is used to ensure that each instance geometry appears only once in mGeometryUniqueIdInstanceGeometryInfoMap.*/
+ InstanceGeometryInfoSet mInstanceGeometryInfoSet;
+
+ MeshOccurencesMap mMeshOccurencesMap;
+
+ GeometryMaterialBindingFileNameMap mGeometryMaterialBindingFileNameMap;
+
+ /** Maps the InstanceGeometry to a list of the object id of the object created for the object. The
+ list contains more than one item if the object is a mesh that needed to be split.*/
+ InstanceGeometryObjectIdMap mInstanceGeometryObjectIdMap;
+
+ UniqueIdFWMaterialMap mUniqueIdFWMaterialMap;
+ UniqueIdFWImageMap mUniqueIdFWImageMap;
+ UniqueIdFWEffectMap mUniqueIdFWEffectMap;
+
+ /** The chunk length of all object block and material blocks.*/
+ ChunkLength mObjectAndMaterialBlockLength;
+
+ /** The mesh data of all the meshes parsed at the first run.*/
+ MeshDataMap mMeshDataMap;
+
+ /** The Object Id of the next object that will be exported.*/
+ ObjectId mNextObjectId;
+
+ /** Maps the effect unique id to the material number used to generate a unique name.*/
+ UniqueMaterialNumberMap mUniqueMaterialNumberMap;
+
+ /** The Material number of the next material that will be exported.*/
+ MaterialNumber mNextMaterialNumber;
+
+ public:
+ Writer( const COLLADABU::URI& inputFile, const COLLADABU::URI& outputFile, bool applyTransformationsToMeshes );
+ virtual ~Writer();
+
+ public:
+ static void reportError(const String& method, const String& message, Severity severity);
+
+ public:
+
+ bool write();
+
+ /** Deletes the entire scene.
+ @param errorMessage A message containing informations about the error that occurred.
+ */
+ void cancel(const String& errorMessage);;
+
+ /** Prepare to receive data.*/
+ void start();;
+
+ /** Remove all objects that don't have an object. Deletes unused visual scenes.*/
+ void finish();;
+
+ /** When this method is called, the writer must write the global document asset.
+ @return The writer should return true, if writing succeeded, false otherwise.*/
+ virtual bool writeGlobalAsset ( const COLLADAFW::FileInfo* asset );
+
+ /** When this method is called, the writer must write the scene.
+ @return The writer should return true, if writing succeeded, false otherwise.*/
+ virtual bool writeScene ( const COLLADAFW::Scene* scene ){ return true;}
+
+ /** Writes the entire visual scene.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeVisualScene ( const COLLADAFW::VisualScene* visualScene );
+
+ /** Handles all nodes in the library nodes.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeLibraryNodes( const COLLADAFW::LibraryNodes* libraryNodes );
+
+ /** Writes the geometry.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeGeometry ( const COLLADAFW::Geometry* geometry );
+
+ /** Writes the material.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeMaterial( const COLLADAFW::Material* material );
+
+ /** Writes the effect.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeEffect( const COLLADAFW::Effect* effect );
+
+ /** Writes the camera.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeCamera( const COLLADAFW::Camera* camera );
+
+ /** Writes the image.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeImage( const COLLADAFW::Image* image );
+
+ /** Writes the light.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeLight( const COLLADAFW::Light* light );
+
+ /** Writes the animation.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeAnimation( const COLLADAFW::Animation* animation );
+
+ /** Writes the animation.
+ @return True on succeeded, false otherwise.*/
+ virtual bool writeAnimationList( const COLLADAFW::AnimationList* animationList );
+
+ /** When this method is called, the writer must write the skin controller data.
+ @return The writer should return true, if writing succeeded, false otherwise.*/
+ virtual bool writeSkinControllerData( const COLLADAFW::SkinControllerData* skinControllerData ){ return true;}
+
+ /** When this method is called, the writer must write the controller.
+ @return The writer should return true, if writing succeeded, false otherwise.*/
+ virtual bool writeController( const COLLADAFW::Controller* controller ) { return true;}
+
+ /** When this method is called, the writer must write the formulas. All the formulas of the entire
+ COLLADA file are contained in @a formulas.
+ @return The writer should return true, if writing succeeded, false otherwise.*/
+ virtual bool writeFormulas( const COLLADAFW::Formulas* formulas ){ return true;}
+
+ /** When this method is called, the writer must write the kinematics scene.
+ @return The writer should return true, if writing succeeded, false otherwise.*/
+ virtual bool writeKinematicsScene( const COLLADAFW::KinematicsScene* kinematicsScene ){ return true;}
+ public:
+ /** Compares two GeometryMaterialBinding if the geometries look the same, i.e. mesh and material binding are equal.*/
+ static bool compare(const GeometryMaterialBinding& lhs, const GeometryMaterialBinding& rhs);
+
+ /** Returns the string representation of ObjectId @a objectId. This representation is used as the name of the object.
+ Do not use in threads!!!!
+ */
+ static const char* calculateObjectNameFromObjectId( const ObjectId& objectId);
+
+ /** Returns the string representation of MaterialNumber @a materialNumber. This representation is used as
+ the name of the material.
+ Do not use in threads!!!!
+ */
+ static const char* calculateMaterialNameFromMaterialNumer( const MaterialNumber& materialNumber);
+
+ /** Returns the length of an object name including null termination. This length is equal for all objects.*/
+ static ChunkLength getObjectNameLength();
+
+ /** Returns the length of a material name including null termination. This length is equal for all materials.*/
+ static ChunkLength getMaterialNameLength();
+
+ protected:
+ friend class BaseWriter;
+
+ GeometryUniqueIdInstanceGeometryInfoMap& getGeometryUniqueIdInstanceGeometryInfoMap() { return mGeometryUniqueIdInstanceGeometryInfoMap; }
+
+ /** This set is used to ensure that each instance geometry appears only once in mGeometryUniqueIdInstanceGeometryInfoMap.*/
+ InstanceGeometryInfoSet& getInstanceGeometryInfoSet() { return mInstanceGeometryInfoSet; }
+
+ GeometryMaterialBindingFileNameMap& getGeometryMaterialBindingFileNameMap() { return mGeometryMaterialBindingFileNameMap; }
+ const GeometryMaterialBindingFileNameMap& getGeometryMaterialBindingFileNameMap() const { return mGeometryMaterialBindingFileNameMap; }
+
+ MeshOccurencesMap& getMeshOccurencesMap() { return mMeshOccurencesMap; }
+ const MeshOccurencesMap& getMeshOccurencesMap() const { return mMeshOccurencesMap; }
+
+ UniqueIdFWMaterialMap& getUniqueIdFWMaterialMap() { return mUniqueIdFWMaterialMap; }
+
+ UniqueIdFWImageMap& getUniqueIdFWImageMap() { return mUniqueIdFWImageMap; }
+
+ UniqueIdFWEffectMap& getUniqueIdFWEffectMap() { return mUniqueIdFWEffectMap; }
+
+ /** Maps the unique id of a mesh to a list of the object names of the object created for this mesh. The
+ list contains more than one item if the mesh needed to be split.*/
+ InstanceGeometryObjectIdMap& getInstanceGeometryObjectIdMap() { return mInstanceGeometryObjectIdMap; }
+
+ const COLLADABU::URI& getInputFile() const { return mInputFile; }
+
+ const COLLADABU::URI& getOutputFile() const { return mOutputFile; }
+
+ Common::Buffer& getBuffer() { return *mBuffer; }
+
+ /** The chunk length of all object block and material blocks.*/
+ ChunkLength getObjectAndMaterialBlockLength() const { return mObjectAndMaterialBlockLength; }
+
+ /** The chunk length of all object block and material blocks.*/
+ void setObjectAndMaterialBlockLength(ChunkLength val) { mObjectAndMaterialBlockLength = val; }
+
+ /** The mesh data of all the meshes parsed at the first run.*/
+ MeshDataMap& getMeshDataMap() { return mMeshDataMap; }
+
+ /** Calculates the length of all meshes.*/
+ void calculateMeshesLength();
+
+ /** Calculates the length of all material blocks.*/
+ void calculateMaterialsBlockLength();
+
+ /** Writes all material blocks.*/
+ void writeMaterialsBlocks();
+
+ UniqueIdNodeMap& getUniqueIdNodeMap() { return mUniqueIdNodeMap; }
+
+ /** Maps the effect unique id to the material number used to generate a unique name.*/
+ UniqueMaterialNumberMap& getUniqueMaterialNumberMap() { return mUniqueMaterialNumberMap; }
+
+ void createUniqueIdNodeMap( COLLADAFW::Node* node );
+
+ void createUniqueIdNodeMap( const COLLADAFW::NodePointerArray& nodes );
+
+ void createUniqueIdNodeMap();
+
+ /** The Object Id of the next object that will be exported.*/
+ ObjectId getNextObjectId() const { return mNextObjectId; }
+
+ /** The Object Id of the next object that will be exported.*/
+ void setNextObjectId(ObjectId nextObjectId) { mNextObjectId = nextObjectId; }
+
+ /** The Material number of the next material that will be exported.*/
+ MaterialNumber getNextMaterialNumber() const { return mNextMaterialNumber; }
+
+ /** The Material number of the next material that will be exported.*/
+ void setNextMaterialNumber(MaterialNumber nextMaterialNumber) { mNextMaterialNumber = nextMaterialNumber; }
+
+ bool getApplyTransformationsToMeshes() const { return mApplyTransformationsToMeshes; }
+
+
+ private:
+ /** Disable default copy ctor. */
+ Writer( const Writer& pre );
+ /** Disable default assignment operator. */
+ const Writer& operator= ( const Writer& pre );
+
+ /** Fills the bindingMap of @a materialBinding.*/
+ static void fillMaterialBindingMap(const GeometryMaterialBinding& materialBinding);
+
+ bool writeHeader( ChunkLength sceneGraphLength );
+
+ template<class NumberType, char prefix>
+ static const char* calculateNameFromNumber( const NumberType& number);
+ };
+
+} // namespace DAE23ds
+
+#endif // __DAE23DS_WRITER_H__
View
366 dae23ds/scripts/dae23ds.vcproj
@@ -0,0 +1,366 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="dae23ds"
+ ProjectGUID="{06180FAB-1DCF-4e3a-AEF6-0506D0349F49}"
+ RootNamespace="dae23ds"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\bin\win\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="..\obj\win\$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\include;..\..\COLLADABaseUtils\include;..\..\COLLADABaseUtils\include\Math;..\..\COLLADAFramework\include;..\..\COLLADASaxFrameworkLoader\include;..\..\common\libBuffer\include;..\..\common\libftoa\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="DAE23dsStableHeaders.h"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ GenerateManifest="true"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool