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