GenFaceNormalsProcess.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /** @file Defines a post processing step to compute face normals for all loaded faces*/
  2. #ifndef AI_GENFACENORMALPROCESS_H_INC
  3. #define AI_GENFACENORMALPROCESS_H_INC
  4. #include "BaseProcess.h"
  5. #include "../include/aiMesh.h"
  6. namespace Assimp
  7. {
  8. // ---------------------------------------------------------------------------
  9. /** The GenFaceNormalsProcess computes face normals for all faces of all meshes
  10. */
  11. class GenFaceNormalsProcess : public BaseProcess
  12. {
  13. friend class Importer;
  14. protected:
  15. /** Constructor to be privately used by Importer */
  16. GenFaceNormalsProcess();
  17. /** Destructor, private as well */
  18. ~GenFaceNormalsProcess();
  19. public:
  20. // -------------------------------------------------------------------
  21. /** Returns whether the processing step is present in the given flag field.
  22. * @param pFlags The processing flags the importer was called with. A bitwise
  23. * combination of #aiPostProcessSteps.
  24. * @return true if the process is present in this flag fields, false if not.
  25. */
  26. bool IsActive( unsigned int pFlags) const;
  27. // -------------------------------------------------------------------
  28. /** Executes the post processing step on the given imported data.
  29. * At the moment a process is not supposed to fail.
  30. * @param pScene The imported data to work at.
  31. */
  32. void Execute( aiScene* pScene);
  33. private:
  34. void GenMeshFaceNormals (aiMesh* pcMesh);
  35. };
  36. } // end of namespace Assimp
  37. #endif // !!AI_GENFACENORMALPROCESS_H_INC