HIOUtilityExchange.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #ifndef _HIOUTILITYEXCHANGE_H
11 #define _HIOUTILITYEXCHANGE_H
12 
13 #ifdef H_PACK_8
14 #pragma pack(push)
15 #pragma pack(8)
16 #endif
17 
18 #include "HTools.h"
19 #include "HIOManager.h"
20 #include "vlist.h"
21 
22 #if defined(HIO_EXCHANGE) && defined(_MSC_VER)
23 #define HIO_API __declspec (dllexport)
24 #elif defined(HIO_EXCHANGE) && defined(LINUX_SYSTEM)
25 #define HIO_API __attribute__ ((visibility ("default")))
26 #else
27 #define HIO_API
28 #endif
29 
30 class HPDFLayoutManager;
31 class HPDFOptions;
36 class HIO_API HIOUtilityExchange: public HInputHandler, public HOutputHandler
37 {
38 
39 public:
40 
43  virtual ~HIOUtilityExchange() {};
44 
49  const char * GetOutputName() { return "HIOUtilityExchange"; }
50  const char * GetInputName() { return "HIOUtilityExchange"; }
51 
53  const char * GetInputTypesString() {
54  return "prc;prd;x_t;x_b;step;stp;igs;iges;CATPart;CATProduct;"
55  "cgr;session;model;3dxml;CADDS;PD;XV3;XV0;prt;asm;xpr;xas;neu;asm.1;prt.1;jt;SLDPRT;SLDASM;mf1;"
56  "arc;unv;pkg;sdp;sdpc;sdw;sdwc;sda;sdac;sds;sdsc;ses;bdl;psm;pwd;par;asm;sat;sab;ipt;iam;ifc;dae;dwg;dxf";
57  }
58 
59 
60 
63 
71  HFileInputResult FileInputByKey(const wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options);
72 
73  HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){
74  return FileInputByKey(H_WCS(FileName).encodedText(), key, options);
75  };
76 
77  HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){
78  H_UTF16 utf16;
79  utf16.encodedText((utf16_char const*) FileName);
80  return FileInputByKey(H_WCS(utf16).encodedText(), key, options);
81  };
82 
83  HFileOutputResult FileOutputByKey(const wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
84 
85  HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
86  H_UTF16 utf16;
87  utf16.encodedText((utf16_char const*) filename);
88  return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
89  }
90 
91  HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
92  return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
93  }
94 
96 
103  virtual void *BuildPRCModel(HOutputHandlerOptions * options, HC_KEY key);
104 
105 
106  const char * GetOutputTypesString() {
107  return "prc;iges;step;x_t;stl";
108  }
109 
111  return HOutputHandlerStyleModel;
112  }
113  int m_TextureLastCount;
114 };
115 
120 class HIO_API HTessellationSettings {
121 public:
122  // Level of Details
124  TessLODExtraLow,
126  TessLODLow,
128  TessLODMedium,
130  TessLODHigh,
132  TessLODExtraHigh,
134  TessLODUserDefined,
139  TessLODControlledPrecision
143  };
144  HTessellationLOD m_TessLod;
164  m_TessLod = TessLODMedium;
165  m_dChordHeightRatio = 2000;
166  m_dAngleToleranceDeg = 40;
167  m_dMinimalTriangleAngleDeg = 30;
168  m_bAccurateTessellation = true;
169  m_bDoNotComputeNormalsInAccurateTessellation = false;
170  m_bAccurateTessellationWithGrid = false;
171  m_dAccurateTessellationWithGridMaximumStitchLength = 0;
172  m_bKeepUVPoints = false;
173  m_bUseHeightInsteadOfRatio = false;
174  m_dMaximalTriangleEdgeLength = 0;
175  }
176 };
177 
179 {
180 public:
181  HExchangeInputOptions(): m_TessSettings() {}
183  m_TessSettings = s;
184  }
186  HTessellationSettings m_TessSettings;
187 };
188 
189 #ifdef HIO_EXCHANGE
190 extern "C" {
191  HIO_API void * CreateInput(HIOManager *manager);
192  HIO_API void * CreateOutput(HIOManager *manager);
193  HIO_API void * CreateConnector(void * unused);
194  HIO_API void Free(HIOUtilityExchange *);
195  }
196 
197 
198 #endif
199 
200 #ifdef H_PACK_8
201 #pragma pack(pop)
202 #endif
203 
204 #endif
Definition: HIOManager.h:1434
HTessellationLOD
Definition: HIOUtilityExchange.h:123
virtual HFileOutputResult FileOutputByKey(const char *filename, HC_KEY key, HOutputHandlerOptions *options)
virtual void RegisterInputHandlerTypes()=0
const char * GetInputName()
Definition: HIOUtilityExchange.h:50
const char * GetOutputName()
Definition: HIOUtilityExchange.h:49
Specifies an HInputHandler for model data.
Definition: HIOManager.h:226
HOutputHandlerStyle GetOutputStyle()
Definition: HIOUtilityExchange.h:110
virtual HFileInputResult FileInputByKey(const char *filename, HC_KEY key, HInputHandlerOptions *options)
HInputHandler an abstract base class for model and image input.
Definition: HIOManager.h:655
Definition: HIOUtilityExchange.h:120
HInputHandlerStyle GetInputStyle()
Definition: HIOUtilityExchange.h:62
bool m_bUseHeightInsteadOfRatio
Definition: HIOUtilityExchange.h:160
HOutputHandlerStyle
Definition: HIOManager.h:846
HOutputHandler an abstract base class for model and image output.
Definition: HIOManager.h:1247
double m_dMaximalTriangleEdgeLength
Definition: HIOUtilityExchange.h:161
virtual void RegisterOutputHandlerTypes()=0
bool m_bAccurateTessellation
Definition: HIOUtilityExchange.h:155
double m_dMinimalTriangleAngleDeg
Definition: HIOUtilityExchange.h:149
HInputHandlerStyle
Definition: HIOManager.h:225
Definition: HIOManager.h:892
bool m_bDoNotComputeNormalsInAccurateTessellation
Definition: HIOUtilityExchange.h:156
bool m_bKeepUVPoints
Definition: HIOUtilityExchange.h:159
const char * GetInputTypesString()
Definition: HIOUtilityExchange.h:53
Definition: HIOUtilityPublish.h:135
Definition: HIOUtilityExchange.h:36
bool m_bAccurateTessellationWithGrid
Definition: HIOUtilityExchange.h:157
Definition: HIOUtilityExchange.h:178
double m_dMaxChordHeight
Definition: HIOUtilityExchange.h:152
Definition: HIOManager.h:246
A header file containing the HIO classes for passing to HBaseView::FileInput and HBaseView::FileOutpu...
double m_dAccurateTessellationWithGridMaximumStitchLength
Definition: HIOUtilityExchange.h:158
double m_dChordHeightRatio
Definition: HIOUtilityExchange.h:145
const char * GetOutputTypesString()
Definition: HIOUtilityExchange.h:106
double m_dAngleToleranceDeg
Definition: HIOUtilityExchange.h:146