DATAKIT API  V2025.1
dtk_StlReader.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef _UTIL_STL_READER_HPP_
3 #define _UTIL_STL_READER_HPP_
4 
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <signal.h>
8 #include <string.h>
9 
10 
11 
12 class StlReader : public Dtk_Reader
13 {
14 public :
15 
16 protected:
17  struct Dtk_Handle; // Not defined here
18  Dtk_Handle *_Private; // Handle
19 
22 
23 
24 public:
25  virtual ~StlReader();
27 
29  static Dtk_bool Enable();
30 
31  Dtk_ErrorStatus CreateDocument( const Dtk_string& inInputFile, Dtk_MainDocPtr& outDocument );
32  Dtk_ErrorStatus GetFileVersion( const Dtk_string &inInputFile, Dtk_string& outVersion );
33 
34  Dtk_ErrorStatus PopulateComponentsTree( const Dtk_string& inInputFile, Dtk_MainDocPtr& inoutDocument, Dtk_ComponentPtr& outRootComponent );
35  Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr >& inArrayStream, Dtk_MainDocPtr& inoutDocument, Dtk_ComponentPtr& outRootComponent );
37 
39  Dtk_ErrorStatus ReadComponent( const Dtk_ComponentPtr& inComponent, Dtk_NodePtr& outRootNode );
41 
45 
47  void Inventory();
48 
53 
58  static void OptimizeVertexStorage(const Dtk_bool inBval);
59 
63  static Dtk_bool ReadNormal();
64 
69  static void ReadNormal(const Dtk_bool inBval);
70 
71 };
72 
73 #endif
74 
StlReader::ReadNormal
static Dtk_bool ReadNormal()
return status of facet Normal from the STL file
StlReader::Enable
static Dtk_bool Enable()
StlReader::CreateDocument
Dtk_ErrorStatus CreateDocument(const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
Dtk_Reader
Definition: dtk_reader.hpp:15
StlReader
Definition: dtk_StlReader.hpp:13
StlReader::GetVersion
Dtk_Int32 GetVersion()
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
StlReader::GetFileVersion
Dtk_ErrorStatus GetFileVersion(const Dtk_string &inInputFile, Dtk_string &outVersion)
StlReader::Inventory
void Inventory()
StlReader::StlReader
StlReader()
StlReader::ReadEntity
Dtk_ErrorStatus ReadEntity(Dtk_Node &inNode, Dtk_EntityPtr &outEntity)
StlReader::ReadComponentGraphic
Dtk_ErrorStatus ReadComponentGraphic(const Dtk_ComponentPtr &inComponent, Dtk_GraphicalDataPtr &outGraphicalData)
Dtk_bool
char Dtk_bool
Definition: define.h:725
StlReader::EndPopulateComponentsTree
Dtk_ErrorStatus EndPopulateComponentsTree()
StlReader::ReadAdditionalInfos
Dtk_ErrorStatus ReadAdditionalInfos(Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)
StlReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr > &inArrayStream, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
StlReader::OptimizeVertexStorage
static Dtk_bool OptimizeVertexStorage()
return status of vertice array optimization
Dtk_Node
This is the Node Class The Dtk_Node object is used to retrieve informations in a Dtk_ComponentPtr obj...
Definition: dtk_maindoc.hpp:230
StlReader::ReadNormal
static void ReadNormal(const Dtk_bool inBval)
Use to read the facet Normal from the STL file.
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:687
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
StlReader::OptimizeVertexStorage
static void OptimizeVertexStorage(const Dtk_bool inBval)
Use to optimize size of vertice array.
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
StlReader::ReadComponent
Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr &inComponent, Dtk_NodePtr &outRootNode)
StlReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_string &inInputFile, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
StlReader::DesactivateReader
Dtk_ErrorStatus DesactivateReader()
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:85
StlReader::ActivateReader
Dtk_ErrorStatus ActivateReader()
StlReader::_UniqueReader
static StlReader * _UniqueReader
Definition: dtk_StlReader.hpp:20
StlReader::_Private
Dtk_Handle * _Private
Definition: dtk_StlReader.hpp:17
StlReader::~StlReader
virtual ~StlReader()
StlReader::GetStlReader
static StlReader * GetStlReader()
StlReader::EndComponent
Dtk_ErrorStatus EndComponent(Dtk_ComponentPtr &inComponent)