DATAKIT SDK  V2026.2
objw.hpp
Go to the documentation of this file.
1 #ifndef _OBJW_HPP_
2 #define _OBJW_HPP_
3 //! \brief Exported APIs for Obj (.obj) Write Library
4 namespace Objw
5 {
6 
7  //! \class WriteOptions
8  //! \brief This class provides several options to tune Obj Writer.\n
9  //! It must be provided to Objw::InitWrite method.
10  //! \code
11  //! //...
12  //! Dtk_string LogFile = L"MyLogFile.log";
13  //! Objw::WriteOptions ObjOptions;
14  //! Dtk_ErrorStatus err = Objw::InitWrite( LogFile, ObjOptions);
15  //! //...
16  //! \endcode
18  {
19  protected:
20 
21  public:
22  // Supported file encoding
24  {
26  UTF8BOM
27  };
28  //! Use of Dtk_RGB or Dtk_RenderInfos
30  //! Use of FileEncoding
32  //! \BaseConstructor
34 
35  //! \BaseDestructor
37 
38  };
39 
40  //! \brief Initialize the Obj Writer
41  //! \return dtkNoError if it is OK.
42  //! \param [in] inOutputFile : Output file name
43  //! \param [in] inLogFile : Log file
44  //! \param [in] inOptions : Options
45  //! \remark This function is the first call for the writer, it must me called after Dtk_API::StartAPI(...)
46  DtkErrorStatus InitWrite(const Dtk_string& inOutputFile, const Dtk_string& inLogFile, WriteOptions& inOptions);
47 
48  //! \brief Creation of the output file and free the Obj Writer
49  //! \return dtkNoError if it is OK.
50  //! \remark used as the last function used for the writer.
52 
53  //! \brief Write the entity provided in parameter in a node.
54  //! \param [in] inEntity : The Entity to be written
55  //! \param [in] inMat : The matrice that needs to be applied before the writing
56  //! \return dtkNoError if it is OK.
57  //! \remark This function is used to write entities (only Dtk_MeshPtr ) .
59 
60 }
61 
62 #endif
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Objw::WriteEntity
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity, Dtk_transfo inMat=Dtk_transfo())
Write the entity provided in parameter in a node.
Objw::WriteOptions::FileEncoding
FileEncoding
Definition: objw.hpp:24
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Objw::WriteOptions::m_UseRender
bool m_UseRender
Use of Dtk_RGB or Dtk_RenderInfos.
Definition: objw.hpp:29
Objw
Exported APIs for Obj (.obj) Write Library.
Definition: objw.hpp:5
Objw::WriteOptions
This class provides several options to tune Obj Writer. It must be provided to Objw::InitWrite method...
Definition: objw.hpp:18
Objw::WriteOptions::~WriteOptions
~WriteOptions()
Destructor.
Definition: objw.hpp:36
Objw::WriteOptions::WriteOptions
WriteOptions()
Default constructor.
Definition: objw.hpp:33
Objw::InitWrite
DtkErrorStatus InitWrite(const Dtk_string &inOutputFile, const Dtk_string &inLogFile, WriteOptions &inOptions)
Initialize the Obj Writer
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr< Dtk_Entity >
Objw::EndWrite
DtkErrorStatus EndWrite()
Creation of the output file and free the Obj Writer
Objw::WriteOptions::UTF8BOM
@ UTF8BOM
Definition: objw.hpp:26
Objw::WriteOptions::UTF8
@ UTF8
Definition: objw.hpp:25
Objw::WriteOptions::m_FileEncoding
FileEncoding m_FileEncoding
Use of FileEncoding.
Definition: objw.hpp:31