|
DATAKIT API
V2025.1
|
|
◆ GltfwInstances()
74 GW.OpenInstance(
"RootNode", -1, useless );
76 for( i = 0; i < 10; i++ )
78 GW.OpenInstance(
"Cube", 1, isNewNode, cubetransfo );
81 GW.WriteMesh( CubeMesh );
83 GW.CloseLastInstance();
86 GW.CloseLastInstance();
◆ GltfWriteSample()
int GltfWriteSample |
( |
const Dtk_string & |
inResultDirectory | ) |
|
94 cout << endl <<
"----------------------------------------------" << endl;
97 outputDirectory = inResultDirectory + L
"dtk/Gltf/";
99 outputDirectory.
mkdir();
101 cout <<
"Gltf Write start" << endl;
102 cout <<
"sample 1" << endl;
104 fileName = outputDirectory + L
"twomeshes.gltf";
107 cout <<
"=> " << fileName.
c_str() << endl;
111 cout <<
"sample 2" << endl;
113 fileName = outputDirectory + L
"instances.gltf";
116 cout <<
"=> " << fileName.
c_str() << endl;
120 cout <<
"Gltf Write end" << endl;
◆ GltfwTwoMeshes()
33 GW.OpenInstance(
"RootNode", -1, useless );
36 GW.OpenInstance(
"Cube", -1, useless );
38 GW.WriteMesh( CubeMesh );
41 GW.CloseLastInstance();
44 GW.OpenInstance(
"Cylinder", -1, useless );
46 GW.WriteMesh( CylinderMesh );
48 GW.CloseLastInstance();
51 GW.CloseLastInstance();
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Dtk_MeshPtr CreateMeshCube()
Mesh Cube sample.
Definition: testcreatemesh.cpp:207
GLTF Writer main class.
Definition: gltfw.hpp:22
This is a high level string class.
Definition: dtk_string.hpp:58
char Dtk_bool
Definition: define.h:725
Dtk_ErrorStatus GltfwTwoMeshes(const Dtk_string &outputFileName)
Definition: testlibgltfwrite.cpp:17
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Definition: util_ptr_dtk.hpp:37
Dtk_string dtkTypeError(Dtk_Int32 errNumero)
const char * c_str() const
Retrieve the ASCII conversion string.
Dtk_MeshPtr CreateMeshCylinder(int nbpoints)
Mesh Cylinder sample.
Definition: testcreatemesh.cpp:337
int mkdir() const
File Utility : Create a Directory.
void FixPathSeparator()
File Utility : Fixes path separator consistency. It lets you replace the '\' or '/' by the OS needed ...
void addTranslate(const Dtk_dir &V)
Translate the Dtk_transfo.
Dtk_ErrorStatus GltfwInstances(const Dtk_string &outputFileName)
Definition: testlibgltfwrite.cpp:57
@ dtkNoError
Definition: error_dtk.hpp:140
This is a mathematical direction class.
Definition: dtk_dir.hpp:15