 |
DATAKIT SDK
V2026.4
|
|
◆ ObjWriteSample()
79 std::cout << std::endl <<
"----------------------------------------------" << std::endl;
80 std::cout <<
"Obj Write start" << std::endl;
83 std::cout <<
"Obj Write end" << std::endl;
◆ StandardObjSample()
Entry point: writes a textured cube and a per-face colored cube mesh into a sample.obj file.
27 outputDirectory = inResultDirectory + L
"Obj/";
29 outputDirectory.
mkdir();
30 outputFileName = outputDirectory + L
"sample.obj";
54 texturedMesh->info()->SetName(
"TexturedCube" );
61 cubeMesh->info()->SetName(
"Cube" );
63 cubeMesh->Transform( transfo );
72 std::cout <<
"=> " << outputFileName.
c_str() << std::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.
DtkErrorStatus StandardObjSample(const Dtk_string &inResultDirectory)
Entry point: writes a textured cube and a per-face colored cube mesh into a sample....
Definition: testlibobjwrite.cpp:15
#define DTK_TRUE
Definition: define.h:726
This is a high level string class.
Definition: dtk_string.hpp:53
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.
@ dtkNoError
Definition: error_dtk.hpp:151
This is a mathematical direction class.
Definition: dtk_dir.hpp:14