DATAKIT SDK  V2026.2
fbxw.hpp
Go to the documentation of this file.
1 #ifndef _DTK_FBXW_HPP
2 #define _DTK_FBXW_HPP
3 
4 //! \defgroup fbxw_utils Fbx Write Util Functions
5 //! \brief.
6 
7 //! \class Dtk_FBXWriter
8 //! \brief FBX Writer main class.
10 {
11 private:
12  void* m_p;
13 private:
14  // Anticopy methods.
15  Dtk_FBXWriter(const Dtk_FBXWriter&) {}
16  Dtk_FBXWriter& operator=(const Dtk_FBXWriter&) { return *this; }
17 public:
18  //! \ingroup fbxw_utils
19  //! \brief Constructor : Initialize the writer for a FBX File.
20  //! \param [in] inFicout : File to write.
21  //! \param [out] outErr : dtkNoError if ok
22  //! \param [in] inVersion : Version to write, default is 7.4 (use 7400), supports also 7.5 (use 7500)
23  Dtk_FBXWriter(const Dtk_string& inFicout,Dtk_ErrorStatus& outErr, Dtk_Int32 inVersion = 7400); // 7400 = 32 bits ; 7500 = 64 bits
24  //! \ingroup fbxw_utils
25  //! \brief Destructor, Save the current work into a FBX file.
27  //! \ingroup fbxw_utils
28  //! \brief Add a Mesh in current instance node. Supports colors, normals per vertex.
29  //! \return dtkNoError if ok.
30  //! \param [in] inMesh : Mesh to write
31  //! \param [in] inGroup_mesh_faces : group per mesh faces of mesh
32  Dtk_ErrorStatus WriteMesh(const Dtk_MeshPtr& inMesh, int inGroup_mesh_faces=0);
33  //! \ingroup fbxw_utils
34  //! \brief Open a new instance node for internal tree.
35  //! \return dtkNoError if ok.
36  //! \param [in] inInstanceName : Instance name
37  //! \param [in] inProtoID : provide a proto ID if you need to reinstanciate it later. Provide -1 if not.
38  //! \param [out] outWasAlreadyInstancied : gives back if this was reinstanciated (same ID given another time), in this case, previous prototype under instance is linker, you should just call CloseLastInstance.
39  //! \param [in] inTrans : Matrice to apply on the instance
40  //! \param [in] inRgb : Instance color (not yet supported)
42  Dtk_bool& outWasAlreadyInstancied, const Dtk_transfo& inTrans=Dtk_transfo(), const Dtk_RGB& inRgb = Dtk_RGB());
43  //! \ingroup fbxw_utils
44  //! \brief Close last instance node for internal tree. It should be called as many time as OpenInstance is called.
45  //! \return dtkNoError if ok.
47 };
48 
49 #endif // _DTK_FBXW_HPP
Dtk_FBXWriter::~Dtk_FBXWriter
~Dtk_FBXWriter()
Destructor, Save the current work into a FBX file.
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Dtk_FBXWriter::CloseLastInstance
Dtk_ErrorStatus CloseLastInstance()
Close last instance node for internal tree. It should be called as many time as OpenInstance is calle...
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_FBXWriter::Dtk_FBXWriter
Dtk_FBXWriter(const Dtk_string &inFicout, Dtk_ErrorStatus &outErr, Dtk_Int32 inVersion=7400)
Constructor : Initialize the writer for a FBX File.
Dtk_bool
char Dtk_bool
Definition: define.h:717
Dtk_FBXWriter
FBX Writer main class.
Definition: fbxw.hpp:10
Dtk_Int64
int64_t Dtk_Int64
Definition: define.h:684
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:679
Dtk_FBXWriter::WriteMesh
Dtk_ErrorStatus WriteMesh(const Dtk_MeshPtr &inMesh, int inGroup_mesh_faces=0)
Add a Mesh in current instance node. Supports colors, normals per vertex.
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
catiav5w::inInstanceName
const Dtk_string & inInstanceName
Definition: catiav5w.hpp:621
Dtk_RGB
Definition: dtk_rgb.hpp:7
Dtk_FBXWriter::OpenInstance
Dtk_ErrorStatus OpenInstance(const Dtk_string &inInstanceName, Dtk_Int64 inProtoID, Dtk_bool &outWasAlreadyInstancied, const Dtk_transfo &inTrans=Dtk_transfo(), const Dtk_RGB &inRgb=Dtk_RGB())
Open a new instance node for internal tree.