OpenLexocad  27.0
OBJ_Exporter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <OpenLxApp/Document.h>
4 #include <OpenLxApp/Exporter.h>
6 
7 
8 namespace OpenLxApp
9 {
18 {
19 public:
20  OBJ_Exporter(std::shared_ptr<OpenLxApp::Document> aDoc);
21  OBJ_Exporter() = delete;
22  virtual ~OBJ_Exporter() {}
23  static std::shared_ptr<OBJ_Exporter> createIn(std::shared_ptr<OpenLxApp::Document> aDoc);
24 
25  enum class CoordinateOrder
26  {
27  DEFAULT = 0, // -> X|Y|Z
28  YXMODE = 1, // -> Y|X|Z
29  ESRIMODE = 2 // -> X|Z|Y
30  };
31 
32  void setHeader(const Base::String& aHeader);
33  void setWithMaterials(bool aFlag);
34  void setMerge(bool aFlag);
35  void setCoordinateOrder(CoordinateOrder aCoordOrder);
36 
37  Base::String getHeader() const;
38  bool getWithMaterials() const;
39  bool getMerge() const;
40  CoordinateOrder getCoordinateOrder() const;
41 
42 
43  virtual int exportFile(const Base::String& filename) override;
44 
45 
46 private:
47  Base::String _header;
48  bool _withMaterials = true;
49  bool _merge = false;
50  bool _yxMode = false;
51  bool _esriMode = false;
52 };
53 } // namespace OpenLxApp
Exports the visible Elements of the Document to an OBJ file. The point coordinates can be written out...
Definition: OBJ_Exporter.h:17
CoordinateOrder
Definition: OBJ_Exporter.h:25
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:29
virtual ~OBJ_Exporter()
Definition: OBJ_Exporter.h:22
#define OPENLXAPP_EXPORT
Definition: OpenLxApp_defines.h:12
Definition: ActiveScript.h:9
Core::PropertyText filename
Definition: CoreDocument.h:151
Base class of all Exporters.
Definition: Exporter.h:16