DATAKIT API  V2025.1
3mf Write Util Functions

Functions

Dtk_ErrorStatus Dtk_3MFWriter::CloseLastInstance ()
 Close last instance node for internal tree. It should be called as many time as OpenInstance is called. More...
 
 Dtk_3MFWriter::Dtk_3MFWriter ()
 Constructor : Initialize the writer for a FBX File. More...
 
DtkErrorStatus Dtk_3MFWriter::EndWrite ()
 Creation of the output file and free the Obj Writer
More...
 
DtkErrorStatus Dtk_3MFWriter::InitWrite (const Dtk_string &inOutputFile, const Dtk_string &inLogFile, const WriteOptions &inOptions)
 Initialize the 3mf Writer
More...
 
Dtk_ErrorStatus Dtk_3MFWriter::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. More...
 
Dtk_ErrorStatus Dtk_3MFWriter::WriteEntity (const Dtk_EntityPtr &inEntity)
 Write the entity provided in parameter in a node. More...
 
 Dtk_3MFWriter::~Dtk_3MFWriter ()
 Destructor, Save the current work into a FBX file. More...
 

Detailed Description

Function Documentation

◆ CloseLastInstance()

Dtk_ErrorStatus Dtk_3MFWriter::CloseLastInstance ( )

Close last instance node for internal tree. It should be called as many time as OpenInstance is called.

3

Returns
dtkNoError if ok.

◆ Dtk_3MFWriter()

Dtk_3MFWriter::Dtk_3MFWriter ( )

Constructor : Initialize the writer for a FBX File.

3

◆ EndWrite()

DtkErrorStatus Dtk_3MFWriter::EndWrite ( )

Creation of the output file and free the Obj Writer

3

Returns
dtkNoError if it is OK.
Remarks
used as the last function used for the writer.

◆ InitWrite()

DtkErrorStatus Dtk_3MFWriter::InitWrite ( const Dtk_string inOutputFile,
const Dtk_string inLogFile,
const WriteOptions inOptions 
)

Initialize the 3mf Writer

3

Returns
dtkNoError if it is OK.
Parameters
[in]inOutputFile: Output file name
[in]inLogFile: Log file
[in]inOptions: Options
Remarks
This function is the first call for the writer, it must me called after Dtk_API::StartAPI(...)

◆ OpenInstance()

Dtk_ErrorStatus Dtk_3MFWriter::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.

3

Returns
dtkNoError if ok.
Parameters
[in]inInstanceName: Instance name
[in]inProtoID: provide a proto ID if you need to reinstanciate it later. Provide -1 if not.
[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.
[in]inTrans: Matrice to apply on the instance
[in]inRgb: Instance color (not yet supported)

◆ WriteEntity()

Dtk_ErrorStatus Dtk_3MFWriter::WriteEntity ( const Dtk_EntityPtr inEntity)

Write the entity provided in parameter in a node.

3

Parameters
[in]inEntity: The Entity to be written
Returns
dtkNoError if it is OK.
Remarks
This function is used to write entities (only Dtk_MeshPtr ) .

◆ ~Dtk_3MFWriter()

Dtk_3MFWriter::~Dtk_3MFWriter ( )

Destructor, Save the current work into a FBX file.

3