選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

102 行
3.9 KiB

  1. /*
  2. Open Asset Import Library (assimp)
  3. ----------------------------------------------------------------------
  4. Copyright (c) 2006-2012, assimp team
  5. All rights reserved.
  6. Redistribution and use of this software in source and binary forms,
  7. with or without modification, are permitted provided that the
  8. following conditions are met:
  9. * Redistributions of source code must retain the above
  10. copyright notice, this list of conditions and the
  11. following disclaimer.
  12. * Redistributions in binary form must reproduce the above
  13. copyright notice, this list of conditions and the
  14. following disclaimer in the documentation and/or other
  15. materials provided with the distribution.
  16. * Neither the name of the assimp team, nor the names of its
  17. contributors may be used to endorse or promote products
  18. derived from this software without specific prior
  19. written permission of the assimp team.
  20. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. ----------------------------------------------------------------------
  32. */
  33. /** @file Defines a post processing step to bring a given scene
  34. into the verbose format that is expected by most postprocess steps.
  35. This is the inverse of the "JoinIdenticalVertices" step. */
  36. #ifndef AI_MAKEVERBOSEFORMAT_H_INC
  37. #define AI_MAKEVERBOSEFORMAT_H_INC
  38. #include "BaseProcess.h"
  39. namespace Assimp {
  40. // ---------------------------------------------------------------------------
  41. /** MakeVerboseFormatProcess: Class to convert an asset to the verbose
  42. * format which is expected by most postprocess steps.
  43. *
  44. * This is the inverse of what the "JoinIdenticalVertices" step is doing.
  45. * This step has no official flag (since it wouldn't make sense to run it
  46. * during import). It is intended for applications intending to modify the
  47. * returned aiScene. After this step has been executed, they can execute
  48. * other postprocess steps on the data. The code might also be useful to
  49. * quickly adapt code that doesn't result in a verbose representation of
  50. * the scene data.
  51. * The step has been added because it was required by the viewer, however
  52. * it has been moved to the main library since others might find it
  53. * useful, too. */
  54. class ASSIMP_API_WINONLY MakeVerboseFormatProcess : public BaseProcess
  55. {
  56. public:
  57. MakeVerboseFormatProcess();
  58. ~MakeVerboseFormatProcess();
  59. public:
  60. // -------------------------------------------------------------------
  61. /** Returns whether the processing step is present in the given flag field.
  62. * @param pFlags The processing flags the importer was called with. A bitwise
  63. * combination of #aiPostProcessSteps.
  64. * @return true if the process is present in this flag fields, false if not */
  65. bool IsActive( unsigned int /*pFlags*/ ) const
  66. {
  67. // NOTE: There is no direct flag that corresponds to
  68. // this postprocess step.
  69. return false;
  70. }
  71. // -------------------------------------------------------------------
  72. /** Executes the post processing step on the given imported data.
  73. * At the moment a process is not supposed to fail.
  74. * @param pScene The imported data to work at. */
  75. void Execute( aiScene* pScene);
  76. private:
  77. //! Apply the postprocess step to a given submesh
  78. bool MakeVerboseFormat (aiMesh* pcMesh);
  79. };
  80. } // end of namespace Assimp
  81. #endif // !!AI_KILLNORMALPROCESS_H_INC