IMeshWriter.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef IRR_I_MESH_WRITER_H_INCLUDED
  5. #define IRR_I_MESH_WRITER_H_INCLUDED
  6. #include "IReferenceCounted.h"
  7. #include "EMeshWriterEnums.h"
  8. namespace irr
  9. {
  10. namespace io
  11. {
  12. class IWriteFile;
  13. } // end namespace io
  14. namespace scene
  15. {
  16. class IMesh;
  17. //! Interface for writing meshes
  18. class IMeshWriter : public virtual IReferenceCounted
  19. {
  20. public:
  21. //! Destructor
  22. virtual ~IMeshWriter() {}
  23. //! Get the type of the mesh writer
  24. /** For own implementations, use MAKE_IRR_ID as shown in the
  25. EMESH_WRITER_TYPE enumeration to return your own unique mesh
  26. type id.
  27. \return Type of the mesh writer. */
  28. virtual EMESH_WRITER_TYPE getType() const = 0;
  29. //! Write a static mesh.
  30. /** \param file File handle to write the mesh to.
  31. \param mesh Pointer to mesh to be written.
  32. \param flags Optional flags to set properties of the writer.
  33. \return True if successful */
  34. virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh,
  35. s32 flags=EMWF_NONE) = 0;
  36. // Writes an animated mesh
  37. // for future use, only b3d writer is able to write animated meshes currently and that was implemented using the writeMesh above.
  38. /* \return Returns true if successful */
  39. //virtual bool writeAnimatedMesh(io::IWriteFile* file,
  40. // scene::IAnimatedMesh* mesh,
  41. // s32 flags=EMWF_NONE) = 0;
  42. };
  43. } // end namespace
  44. } // end namespace
  45. #endif