TriangulateProcess.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /** @file Defines a post processing step to triangulate all faces with more than three vertices.*/
  2. #ifndef AI_TRIANGULATEPROCESS_H_INC
  3. #define AI_TRIANGULATEPROCESS_H_INC
  4. #include "BaseProcess.h"
  5. struct aiMesh;
  6. namespace Assimp
  7. {
  8. // ---------------------------------------------------------------------------
  9. /** The TriangulateProcess splits up all faces with more than three indices
  10. * into triangles. You usually want this to happen because the graphics cards
  11. * need their data as triangles.
  12. */
  13. class TriangulateProcess : public BaseProcess
  14. {
  15. friend class Importer;
  16. protected:
  17. /** Constructor to be privately used by Importer */
  18. TriangulateProcess();
  19. /** Destructor, private as well */
  20. ~TriangulateProcess();
  21. public:
  22. // -------------------------------------------------------------------
  23. /** Returns whether the processing step is present in the given flag field.
  24. * @param pFlags The processing flags the importer was called with. A bitwise
  25. * combination of #aiPostProcessSteps.
  26. * @return true if the process is present in this flag fields, false if not.
  27. */
  28. bool IsActive( unsigned int pFlags) const;
  29. // -------------------------------------------------------------------
  30. /** Executes the post processing step on the given imported data.
  31. * At the moment a process is not supposed to fail.
  32. * @param pScene The imported data to work at.
  33. */
  34. void Execute( aiScene* pScene);
  35. protected:
  36. // -------------------------------------------------------------------
  37. /** Triangulates the given mesh.
  38. * @param pMesh The mesh to triangulate.
  39. */
  40. void TriangulateMesh( aiMesh* pMesh);
  41. };
  42. } // end of namespace Assimp
  43. #endif // AI_TRIANGULATEPROCESS_H_INC