Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

124 wiersze
4.0 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 remove specific parts of the scene */
  34. #ifndef AI_REMOVEVCPROCESS_H_INCLUDED
  35. #define AI_REMOVEVCPROCESS_H_INCLUDED
  36. #include "BaseProcess.h"
  37. #include "../include/assimp/mesh.h"
  38. class RemoveVCProcessTest;
  39. namespace Assimp {
  40. // ---------------------------------------------------------------------------
  41. /** RemoveVCProcess: Class to exclude specific parts of the data structure
  42. * from further processing by removing them,
  43. */
  44. class ASSIMP_API RemoveVCProcess : public BaseProcess
  45. {
  46. public:
  47. /// The default class constructor.
  48. RemoveVCProcess();
  49. /// The class destructor.
  50. ~RemoveVCProcess();
  51. public:
  52. // -------------------------------------------------------------------
  53. /** Returns whether the processing step is present in the given flag field.
  54. * @param pFlags The processing flags the importer was called with. A bitwise
  55. * combination of #aiPostProcessSteps.
  56. * @return true if the process is present in this flag fields, false if not.
  57. */
  58. bool IsActive( unsigned int pFlags) const;
  59. // -------------------------------------------------------------------
  60. /** Executes the post processing step on the given imported data.
  61. * At the moment a process is not supposed to fail.
  62. * @param pScene The imported data to work at.
  63. */
  64. void Execute( aiScene* pScene);
  65. // -------------------------------------------------------------------
  66. /** Called prior to ExecuteOnScene().
  67. * The function is a request to the process to update its configuration
  68. * basing on the Importer's configuration property list.
  69. */
  70. virtual void SetupProperties(const Importer* pImp);
  71. // -------------------------------------------------------------------
  72. /** Manually setup the configuration flags for the step
  73. *
  74. * @param Bitwise combination of the #aiComponent enumerated values.
  75. */
  76. void SetDeleteFlags(unsigned int f)
  77. {
  78. configDeleteFlags = f;
  79. }
  80. // -------------------------------------------------------------------
  81. /** Query the current configuration.
  82. */
  83. unsigned int GetDeleteFlags() const
  84. {
  85. return configDeleteFlags;
  86. }
  87. private:
  88. bool ProcessMesh (aiMesh* pcMesh);
  89. /** Configuration flag
  90. */
  91. unsigned int configDeleteFlags;
  92. /** The scene we're working with
  93. */
  94. aiScene* mScene;
  95. };
  96. // ---------------------------------------------------------------------------
  97. } // end of namespace Assimp
  98. #endif // !!AI_REMOVEVCPROCESS_H_INCLUDED