![Logo](tetiere_ht.jpg) |
DATAKIT API
V2025.1
|
|
◆ ObjWriteSample()
int ObjWriteSample |
( |
const Dtk_string & |
inResultDirectory | ) |
|
81 cout << endl <<
"----------------------------------------------" << endl;
82 cout <<
"Obj Write start" << endl;
85 cout <<
"Obj Write end" << endl;
◆ StandardObjSample()
int StandardObjSample |
( |
const Dtk_string & |
inResultDirectory | ) |
|
29 outputDirectory = inResultDirectory + L
"dtk/Obj/";
31 outputDirectory.
mkdir();
32 outputFileName = outputDirectory + L
"sample.obj";
56 texturedMesh->info()->SetName(
"TexturedCube" );
63 cubeMesh->info()->SetName(
"Cube" );
65 cubeMesh->Transform( transfo );
74 cout <<
"=> " << outputFileName.
c_str() << endl;
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Dtk_MeshPtr CreateMeshCube()
Mesh Cube sample.
Definition: testcreatemesh.cpp:207
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity, Dtk_transfo inMat=Dtk_transfo())
Write the entity provided in parameter in a node.
#define DTK_TRUE
Definition: define.h:727
This is a high level string class.
Definition: dtk_string.hpp:58
bool m_UseRender
Use of Dtk_RGB or Dtk_RenderInfos.
Definition: objw.hpp:29
void FillFacesColors(Dtk_MeshPtr &inoutCubeMesh)
Filling mesh faces with colors.
Definition: testcreatemesh.cpp:244
This class provides several options to tune Obj Writer. It must be provided to Objw::InitWrite method...
Definition: objw.hpp:18
Dtk_MeshPtr CreateTexturedMeshCube(const Dtk_string &inImageDirectory)
Textured Mesh Cube sample.
Definition: testcreatemesh.cpp:272
DtkErrorStatus InitWrite(const Dtk_string &inOutputFile, const Dtk_string &inLogFile, WriteOptions &inOptions)
Initialize the Obj Writer
static Dtk_SmartPtr< Dtk_Entity > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Definition: util_ptr_dtk.hpp:37
Dtk_string dtkTypeError(Dtk_Int32 errNumero)
DtkErrorStatus EndWrite()
Creation of the output file and free the Obj Writer
const char * c_str() const
Retrieve the ASCII conversion string.
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.
int StandardObjSample(const Dtk_string &inResultDirectory)
Definition: testlibobjwrite.cpp:17
@ dtkNoError
Definition: error_dtk.hpp:140
This is a mathematical direction class.
Definition: dtk_dir.hpp:15