 |
DATAKIT SDK
V2026.1
|
|
◆ ColladaWriteSample()
| int ColladaWriteSample |
( |
const Dtk_string & |
inResultDirectory | ) |
|
32 cout << endl <<
"----------------------------------------------" << endl;
33 cout <<
"Collada Write start" << endl;
36 outputDirectory = inResultDirectory + L
"Collada/";
38 outputDirectory.
mkdir();
39 outputFileName = outputDirectory + L
"sample.dae";
77 transfo.
setXdir( 0.0, 1.0, 0.0 );
78 transfo.
setYdir( 0.0, 0.0, 1.0 );
79 transfo.
setZdir( 1.0, 0.0, 0.0 );
84 nodeName =
"RootNode";
90 nodeName =
"Facetted data";
102 cubeMesh->info()->AddRenderInfos( renderInfos );
113 nodeName =
"Cylinder";
131 nodeName =
"Facetted data (Reinstanciated)";
148 cout <<
"=> " << outputFileName.
c_str() << endl <<
"Collada Write end" << endl;
uint32_t Dtk_ID
Definition: define.h:692
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Dtk_MeshPtr CreateMeshCube()
Mesh Cube sample.
Definition: testcreatemesh.cpp:204
DtkErrorStatus EndNode()
End the node.
void setZdir(const Dtk_dir &Z)
Set a new Z vector.
DtkErrorStatus InitWrite(const Dtk_string &inOutputFile, const Dtk_string &inLogFile, WriteOptions &inOptions)
Initialize the Collada Writer
#define DTK_TRUE
Definition: define.h:730
This is a high level string class.
Definition: dtk_string.hpp:53
char Dtk_bool
Definition: define.h:728
DtkErrorStatus EndWrite()
Creation of the output file and free the Collada Writer
void setXdir(const Dtk_dir &X)
Set a new X vector.
void FillFacesColors(Dtk_MeshPtr &inoutCubeMesh)
Filling mesh faces with colors.
Definition: testcreatemesh.cpp:241
This class provides several options to tune Collada Writer. It must be provided to Colladaw::InitWrit...
Definition: colladaw.hpp:23
Dtk_bool ConvertRenderInfos
Definition: colladaw.hpp:33
static Dtk_SmartPtr< Dtk_Entity > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_RenderInfosPtr CreateCubeRenderInfos()
Definition: testcreatemesh.cpp:495
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:334
void setYdir(const Dtk_dir &Y)
Set a new Y vector.
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 ...
DtkErrorStatus ReinstanciatePrototype(Dtk_ID inID)
Reinstanciate a node.
This is a high level array class.
Definition: util_stl_dtk.hpp:84
void addTranslate(const Dtk_dir &V)
Translate the Dtk_transfo.
DtkErrorStatus InitNode(Dtk_string &inNodeName, const Dtk_transfo &inTransfo, Dtk_InfoPtr &inInfo, Dtk_ID &outID)
Initialize a node.
@ dtkNoError
Definition: error_dtk.hpp:147
static Dtk_SmartPtr< Dtk_Info > create()
Calls default constructor to allocate a new object.
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity)
Write the entity provided in parameter in a node.
This is a mathematical direction class.
Definition: dtk_dir.hpp:14