Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HIOManager.h
Go to the documentation of this file.
1 // Copyright (c) 1998-2014 by 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 
16 #ifndef _HIOMANAGER_H
17 #define _HIOMANAGER_H
18 
19 #ifdef H_PACK_8
20 #pragma pack(push)
21 #pragma pack(8)
22 #endif
23 
24 #include "HTools.h"
25 
26 
27 // forwards
28 enum HFileOutputResult;
29 class HPDFOptions;
30 class HBaseView;
31 class HCamera;
32 class HBaseModel;
33 struct vlist_s;
34 class HStreamFileToolkit;
36 class BREP_Topology;
37 
38 enum H_OUTPUT_TYPE
39 {
40  H_OUTPUT_TYPE_DEFAULT = 0,
41  H_PDF_OUTPUT_PORTFOLIO,
42  H_PDF_OUTPUT_3D,
43  H_PDF_OUTPUT_2D,
44  H_SINGLE_PASS_ZSORT,
45  H_SINGLE_PASS_NO_HIDDEN_SURFACES
46 };
47 
48 
52 #define HInputOpNone (1UL<<0)
53 
57 #define HInputOpFileInputByKey (1UL<<1)
58 
62 #define HInputOpFileInputToImageKey (1UL<<2)
63 
67 #define HOutputOpNone (1UL<<0)
68 
72 #define HOutputOpFileOutputByKey (1UL<<1)
73 
77 #define HOutputOpFileOutputFromImageKey (1UL<<2)
78 
79 
84 #define HIORegisterInputType(type,input_object) do {HIOManager::GetCurrentHIOManager()->RegisterInputHandler(type, input_object); }while(0);
85 
86 
87 
89 #define HIORegisterOutputType(type,output_object) do { HIOManager::GetCurrentHIOManager()->RegisterOutputHandler(type, output_object); }while(0);
90 
91 
92 
93 
98 class MVO_API HIONoticeCallback
99 {
100 public:
101 
102  virtual ~HIONoticeCallback() {}
107  virtual void Notice(const char * notice) = 0;
108  virtual void Notice(const __wchar_t * notice) {
109  UNREFERENCED(notice);
110  }
111 #ifdef H_USHORT_OVERLOAD
112  virtual void Notice(const unsigned short * notice) {
113  Notice((__wchar_t const *) notice);
114  }
115 #endif
116 };
117 
122 {
123 public:
124  virtual ~HIOPercentNoticeCallback();
129  virtual void Notice(float notice) =0;
130 };
131 
132 
133 
136 typedef void * (*HIO_CREATE_FREE_FUNCTION)(void *);
137 
140 typedef void (*HIO_FREE_CONNECTOR_FUNCTION)(void *);
141 
147 class MVO_API HIOConnector
148 {
149 public:
150 
151  /*Constructs an HIOConnector object.*/
152  HIOConnector();
153  virtual ~HIOConnector();
154 
162  virtual HC_KEY GetHoopsEntity(void * pKernelEntity);
163  virtual HC_KEY GetHoopsEntity(void * pKernelEntity, HC_KEY modelKey);
164 
172  virtual void * GetKernelEntity(HC_KEY key);
173  virtual void * GetKernelEntity(HC_KEY key, HC_KEY modelKey);
174 
181  virtual bool GetHoopsEntities(void * pKernelEntity, vlist_s *ret_HoopsKeysList);
182  virtual bool GetHoopsEntities(void * pKernelEntity, vlist_s *ret_HoopsKeysList, HC_KEY modelKey);
183 
190  virtual bool GetKernelEntities(HC_KEY key, vlist_s *ret_KernelEntitiesList);
191  virtual bool GetKernelEntities(HC_KEY key, vlist_s *ret_KernelEntitiesList, HC_KEY modelKey);
192 
198  virtual void AddConnection(HC_KEY key, void* pKernelEntity);
199  virtual void AddConnection(HC_KEY key, void* pKernelEntity, HC_KEY modelKey);
200 
201 
208  virtual void OptimizeTree(const char * segname, const char * option_string);
209 
210 protected:
211 
213  struct vhash_s *mhash_Hoops2Kernel;
214 
216  struct vhash_s *mhash_Kernel2Hoops;
217 
218 };
219 
227 };
228 
238 };
239 
245 class MVO_API HInputHandlerOptions
246 {
247 public:
248 
251  m_z_separation = 1;
252  m_depth_range = 0;
253  m_pHBaseView = 0;
254  m_pImageName = 0;
255  m_pImageFormat = 0;
256  m_pConnector = 0;
257  m_pExtendedData = 0;
258  m_bLocal = false;
259  m_tk = 0;
260  m_bLogging = false;
261 
262 
263  // Generic options used in DGN, SKP and DWG importer
264  m_bIgnoreOffEntities = false;
265 
266  //DWG/SKP option
267  m_bImportMetadata = false;
268 
269  // DWG import options (try and move them somewhere else)
270  m_bInputViaHSF = false;
271  m_Deviation = 10.0;
272  m_bImportWireframeForBrep = false;
273  m_numIsolines = 0;
274  m_listRegAppNames = 0;
275  m_listEntityType = 0;
276  m_bForceReimport = false;
277  m_listDWGLayouts = 0;
278  m_bAttachDWGHandles = false;
279  m_bImportAllLayouts = false;
280  m_bDWGInsertMeshesAsShells = false;
281  m_bDisableDWGDrawOrder = false;
282  m_eDwgViewVector = DwgViewportInherit;
283  m_sDwgContrastColorRgb = HPoint(0, 0, 0);
284  m_bLegacyOptimize = false;
285  m_bDwgDepthRangeDrawOrder = false;
286 
287  // DGN import Options
288  m_iDGNCellHeaderOption = SINGLE_ENTITY_CELLHEADER;
289  m_coneFactor = 10.0;
290  m_factorForSmartSolids = 45.0;
291  m_bDGNRebaselineModel = false;
292  m_bDGNImportAllModels = false;
293 
294  // PRC options
295  m_pPRCPMIConnector = 0;
296  m_pPRCTopologyManager = 0;
297  m_bPRCMergeFaces = false;
298  m_bPRCImportNonBrepFaces = true;
299  m_bPRCCreatePRCFileOnly = false;
300  m_bPRCInstanceShells = true;
301  m_bPRCCalculatePhysicalProperties = false;
302  m_pPRCMultiModelSelectionCallback = 0;
303  m_pPRCAsmModelFile = 0;
304  m_pPRCDeleteModelFile = false;
305  m_bPRCStoreUserAttributes = true;
306  m_pPRCDeleteModelCallback = 0;
307  m_bPRCImportHiddenObjects = false;
308 
309  // DWF import options
310  m_bDisableDWFDrawOrder = false;
311  m_bDWFRebaselineModel = true;
312  m_bImportThumbnail = false;
313 
314  //SKP optimization option
315  m_bOptimizeSegmentTree = false;
316  m_license = 0;
317 
318  };
319 
323  m_z_separation = o->m_z_separation;
324  m_depth_range = o->m_depth_range;
325  m_pHBaseView = o->m_pHBaseView;
326  m_pImageName = o->m_pImageName;
327  m_pImageFormat = o->m_pImageFormat;
328  m_pConnector = o->m_pConnector;
329  m_pExtendedData = o->m_pExtendedData;
330  m_bLocal = o->m_bLocal;
331 
332  m_license = o->m_license;
333 
334  //DWG/DGN/SKP option
335  m_bIgnoreOffEntities = o->m_bIgnoreOffEntities;
336 
337  //DWG/SKP option
338  m_bImportMetadata = o->m_bImportMetadata;
339 
340 
341  //DWG Options
342  m_bInputViaHSF = o->m_bInputViaHSF;
343  m_Deviation = o->m_Deviation;
344  m_bImportWireframeForBrep = o->m_bImportWireframeForBrep;
345  m_numIsolines = o->m_numIsolines;
346  m_listRegAppNames = o->m_listRegAppNames;
347  m_listEntityType=o->m_listEntityType;
348  m_bForceReimport = o->m_bForceReimport;
349  m_listDWGLayouts = o->m_listDWGLayouts;
350  m_bAttachDWGHandles = o->m_bAttachDWGHandles;
351  m_bImportAllLayouts = o->m_bImportAllLayouts;
352  m_bDWGInsertMeshesAsShells = o->m_bDWGInsertMeshesAsShells;
353  m_bDisableDWGDrawOrder = o->m_bDisableDWGDrawOrder;
354  m_eDwgViewVector = o->m_eDwgViewVector;
355  m_sDwgContrastColorRgb = o->m_sDwgContrastColorRgb;
356  m_bLegacyOptimize = o->m_bLegacyOptimize;
357  m_bDwgDepthRangeDrawOrder = o->m_bDwgDepthRangeDrawOrder;
358 
359  //DGN Options
360  m_iDGNCellHeaderOption = o->m_iDGNCellHeaderOption;
361  m_bDGNRebaselineModel = o->m_bDGNRebaselineModel;
362  m_coneFactor = o->m_coneFactor;
363  m_factorForSmartSolids = o->m_factorForSmartSolids;
364  m_bDGNImportAllModels = o->m_bDGNImportAllModels;
365 
366  // PRC options
367  m_pPRCPMIConnector = o->m_pPRCPMIConnector;
368  m_pPRCTopologyManager = o->m_pPRCTopologyManager;
369  m_bPRCMergeFaces = o->m_bPRCMergeFaces;
370  m_bPRCImportNonBrepFaces = o->m_bPRCImportNonBrepFaces;
371 
372  m_bPRCCreatePRCFileOnly = o->m_bPRCCreatePRCFileOnly;
373  m_bPRCInstanceShells = o->m_bPRCInstanceShells;
374  m_bPRCCalculatePhysicalProperties = o->m_bPRCCalculatePhysicalProperties;
375  m_pPRCMultiModelSelectionCallback = o->m_pPRCMultiModelSelectionCallback;
376  m_pPRCAsmModelFile = o->m_pPRCAsmModelFile;
377  m_pPRCDeleteModelFile = o->m_pPRCDeleteModelFile;
378  m_pPRCDeleteModelCallback = o->m_pPRCDeleteModelCallback;
379  m_bPRCImportHiddenObjects = o->m_bPRCImportHiddenObjects;
380 
381 
382  // DWF import options
383  m_bDisableDWFDrawOrder = o->m_bDisableDWFDrawOrder;
384  m_bDWFRebaselineModel = o->m_bDWFRebaselineModel;
385  m_bImportThumbnail = o->m_bImportThumbnail;
386 
387 
388  //SKP import option
389  m_bOptimizeSegmentTree = o->m_bOptimizeSegmentTree;
390 
391  };
392 
396  m_z_separation = o.m_z_separation;
397  m_depth_range = o.m_depth_range;
398  m_pHBaseView = o.m_pHBaseView;
399  m_pImageName = o.m_pImageName;
400  m_pImageFormat = o.m_pImageFormat;
401  m_pConnector = o.m_pConnector;
402  m_pExtendedData = o.m_pExtendedData;
403  m_bLocal = o.m_bLocal;
404 
405  //DWG/DGN/SKP option
406  m_bIgnoreOffEntities = o.m_bIgnoreOffEntities;
407 
408  //DWG/SKP option
409  m_bImportMetadata = o.m_bImportMetadata;
410 
411  //DWG options
412  m_bInputViaHSF = o.m_bInputViaHSF;
413  m_Deviation = o.m_Deviation;
414  m_bImportWireframeForBrep = o.m_bImportWireframeForBrep;
415  m_numIsolines = o.m_numIsolines;
416  m_listRegAppNames = o.m_listRegAppNames;
417  m_listEntityType = o.m_listEntityType;
418  m_bForceReimport = o.m_bForceReimport;
419  m_listDWGLayouts = o.m_listDWGLayouts;
420  m_bAttachDWGHandles = o.m_bAttachDWGHandles;
421  m_bImportAllLayouts = o.m_bImportAllLayouts;
422  m_bDWGInsertMeshesAsShells = o.m_bDWGInsertMeshesAsShells;
423  m_bDisableDWGDrawOrder = o.m_bDisableDWGDrawOrder;
424  m_eDwgViewVector = o.m_eDwgViewVector;
425  m_sDwgContrastColorRgb = o.m_sDwgContrastColorRgb;
426  m_bLegacyOptimize = o.m_bLegacyOptimize;
427  m_bDwgDepthRangeDrawOrder = o.m_bDwgDepthRangeDrawOrder;
428 
429  //DGN options
430  m_iDGNCellHeaderOption = o.m_iDGNCellHeaderOption;
431  m_bDGNRebaselineModel = o.m_bDGNRebaselineModel;
432  m_coneFactor = o.m_coneFactor;
433  m_factorForSmartSolids = o.m_factorForSmartSolids;
434  m_bDGNImportAllModels = o.m_bDGNImportAllModels;
435 
436  // PRC options
437  m_pPRCPMIConnector = o.m_pPRCPMIConnector;
438  m_pPRCTopologyManager = o.m_pPRCTopologyManager;
439  m_bPRCMergeFaces = o.m_bPRCMergeFaces;
440  m_bPRCImportNonBrepFaces = o.m_bPRCImportNonBrepFaces;
441  m_bPRCCreatePRCFileOnly = o.m_bPRCCreatePRCFileOnly;
442  m_bPRCInstanceShells = o.m_bPRCInstanceShells;
443  m_bPRCCalculatePhysicalProperties = o.m_bPRCCalculatePhysicalProperties;
444  m_pPRCMultiModelSelectionCallback = o.m_pPRCMultiModelSelectionCallback;
445  m_pPRCAsmModelFile = o.m_pPRCAsmModelFile;
446  m_pPRCDeleteModelFile = o.m_pPRCDeleteModelFile;
447  m_bPRCImportHiddenObjects = o.m_bPRCImportHiddenObjects;
448 
449  // DWF import options
450  m_bDisableDWFDrawOrder = o.m_bDisableDWFDrawOrder;
451  m_bDWFRebaselineModel = o.m_bDWFRebaselineModel;
452  m_bImportThumbnail = o.m_bImportThumbnail;
453 
454 
455  //SKP import option
456  m_bOptimizeSegmentTree = o.m_bOptimizeSegmentTree;
457 
458  };
459 
460  virtual ~HInputHandlerOptions();
461 
464 
466  const char * m_pImageName;
467 
469  const char * m_pImageFormat;
470 
472  bool m_bLocal;
473 
475  HStreamFileToolkit * m_tk;
476 
479 
482 
485 
488 
490  double m_Deviation;
491 
494 
496  const char *m_license;
497 
498 
499 
500 
504  struct vlist_s * m_listRegAppNames;
505 
507  struct vlist_s * m_listEntityType;
508 
511 
514 
517 
523 
525  struct vlist_s * m_listDWGLayouts;
526 
529 
533  double m_coneFactor;
534 
539 
542 
545 
546 
547 
551  enum {
554  OPT_CELLHEADER
555  };
556 
559 
562 
569  bool m_bPRCImportNonBrepFaces;
570 
573  bool m_bPRCInstanceShells;
574 
575  bool m_bPRCCalculatePhysicalProperties;
577  void (*m_pPRCMultiModelSelectionCallback) (char const * in_container, int in_num_configs, char const ** in_configs,
578  int & out_config_selection);
582  void (*m_pPRCDeleteModelCallback) ( void*& pPRCAsmModelFile);
585 
586 
590 
593 
596 
601 
602  // DWF import options
608 
611 
614 
617 
624 
632 
640 
648 
654 
660 };
661 
662 
663 
665 
671 class MVO_API HInputHandler
672 {
673 
674 public:
682  HInputHandler();
683  virtual ~HInputHandler();
684 
689  unsigned long GetInputOps() {return m_InputOps;};
690 
691 
694  virtual const char * GetInputName() = 0;
695 
696 
703  virtual void RegisterInputHandlerTypes() = 0;
704 
711  virtual HInputHandlerStyle GetInputStyle() = 0;
712 
720  virtual HFileInputResult FileInputByKey(const char * filename, HC_KEY key, HInputHandlerOptions * options);
721  virtual HFileInputResult FileInputByKey(const __wchar_t * filename, HC_KEY key, HInputHandlerOptions * options);
722 
723 
732  virtual HFileInputResult FileInputByKey(const unsigned short * filename, HC_KEY key, HInputHandlerOptions * options);
733 
744  virtual HFileInputResult FileInputToImageKey(const char * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
745  virtual HFileInputResult FileInputToImageKey(const __wchar_t * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
746 
747 
757  virtual HFileInputResult FileInputToImageKey(const unsigned short * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
758 
771  virtual const char * GetInputTypesString() = 0;
772 
776  const __wchar_t * GetInputProgress();
777 
781  float GetInputPercentProgress();
782 
786  const __wchar_t * GetInputInformation();
787 
794  HIONoticeCallback * SetInputProgressNoticeCallback(HIONoticeCallback *notice_callback);
795 
796 
803  HIOPercentNoticeCallback * SetInputPercentProgressNoticeCallback(HIOPercentNoticeCallback *percent_notice_callback);
804 
811  HIONoticeCallback * SetInputInformationNoticeCallback(HIONoticeCallback *notice_callback);
812 
814  void ReportInputProgress(const char * progress);
815  void ReportInputProgress(const __wchar_t * progress);
816 
818  void ReportInputPercentProgress(float percent_progress);
819 
821  void ReportInputInformation(const char * information);
822  void ReportInputInformation(const __wchar_t * information);
823 
824  void SetModuleDirectory(const char *module_directory);
825  void SetModuleDirectory(const __wchar_t *module_directory);
826 protected:
827 
831  void SetStartingInput(const char *filename);
832  void SetStartingInput(const __wchar_t *filename = 0);
833 
837  void SetFinishedInput();
838 
840  void SetInputOps(unsigned long ops) {m_InputOps=ops;};
841 
843  unsigned long m_InputOps;
844 
845  __wchar_t *m_module_directory;
846 
847 private:
848 
849  __wchar_t *m_progress;
850  float m_percent_progress1;
851  float m_percent_progress2;
852  __wchar_t *m_information;
853  struct vlist_s *m_information_list;
854  HIONoticeCallback *m_progress_callback;
855  HIONoticeCallback *m_information_callback;
856  HIOPercentNoticeCallback *m_percent_progress_callback;
857 };
858 
863 {
864  HOutputHandlerStyleModel,
869 };
870 
877 class MVO_API ExportNameMap
878 {
879 private:
880  void * _imp;
881 public:
882  ExportNameMap();
883  ~ExportNameMap();
884 
885  H_FORMAT_TEXT lookup(HC_KEY) const;
886  void tag(HC_KEY, H_FORMAT_TEXT const &);
887 };
888 
901 };
902 
908 class MVO_API HOutputHandlerOptions
909 {
910 public:
913 
914  virtual char const * GetType() const;
915 
918  virtual bool PopulateOptions();
919 
924  Init(o);
925  };
926 
931  Init(&o);
932  };
933 
934 
935  virtual ~HOutputHandlerOptions();
936 
940  void Init(HOutputHandlerOptions const *o);
941 
945  HBaseView * const View() const {return m_pHBaseView;};
947  void View(HBaseView * const v) {m_pHBaseView = v;};
948 
950  HBaseModel * m_pHBaseModel;
952  HBaseModel * const Model() const {return m_pHBaseModel;};
954  void Model(HBaseModel * const m) {m_pHBaseModel = m;};
955 
957  HCamera * m_pCamera;
959  HCamera * const Camera() const {return m_pCamera;};
961  void Camera(HCamera * const c) {m_pCamera = c;};
962 
964  HC_KEY m_Key;
966  HC_KEY const Key() const {return m_Key;};
968  void Key(HC_KEY const k) {m_Key = k;};
969 
971  char const * m_pHSRAOptions;
973  char const * const HSRAOptions() const {return m_pHSRAOptions;};
975  void HSRAOptions(char const * const tf) {m_pHSRAOptions = tf;};
976 
978  HPoint const * m_pWindowColor;
980  HPoint const * const WindowColor() const {return m_pWindowColor;};
982  void WindowColor(HPoint const * const tf) {m_pWindowColor = tf;};
983 
985  bool m_bUseWindowColor;
987  bool UseWindowColor() const {return m_bUseWindowColor;};
989  void UseWindowColor(bool const tf) {m_bUseWindowColor = tf;};
990 
992  float m_Window_Width;
994  float const WindowWidth() const {return m_Window_Width;};
996  void WindowWidth(float const f) {m_Window_Width = f;};
997 
999  float m_Window_Height;
1001  float const WindowHeight() const {return m_Window_Height;};
1003  void WindowHeight(float const f) {m_Window_Height = f;};
1004 
1006  float m_Paper_Width;
1008  float const PaperWidth() const {return m_Paper_Width;};
1010  void PaperWidth(float const f) {m_Paper_Width = f;};
1011 
1013  float m_Paper_Height;
1015  float const PaperHeight() const {return m_Paper_Height;};
1017  void PaperHeight(float const f) {m_Paper_Height = f;};
1018 
1020  bool m_ForceGrayscale;
1022  bool ForceGrayscale() const {return m_ForceGrayscale;};
1024  void ForceGrayscale(bool const tf) {m_ForceGrayscale = tf;};
1025 
1027  bool m_bFastPrint;
1029  bool FastPrint() const {return m_bFastPrint;};
1031  void FastPrint(bool const tf) {m_bFastPrint = tf;};
1032 
1034  bool m_bConserveMemory;
1036  bool ConserveMemory() const {return m_bConserveMemory;};
1038  void ConserveMemory(bool const tf) {m_bConserveMemory = tf;};
1039 
1040  bool m_bWriteAnimations;
1041  bool WriteAnimations() const {return m_bWriteAnimations;};
1042  void WriteAnimations(bool const tf) {m_bWriteAnimations = tf;};
1043 
1045  bool m_bWindowFrame;
1047  bool WindowFrame() const {return m_bWindowFrame;};
1049  void WindowFrame(bool const tf) {m_bWindowFrame = tf;};
1050 
1052  bool m_bUseSubscreen;
1054  bool UseSubscreen() const {return m_bUseSubscreen;};
1056  void UseSubscreen(bool const tf) {m_bUseSubscreen = tf;};
1057 
1059  int m_Image_Dpi;
1061  int const ImageDpi() const {return m_Image_Dpi;};
1063  void ImageDpi(int const dpi) {m_Image_Dpi = dpi;};
1064 
1066  int m_Paper_Dpi;
1068  int const PaperDpi() const {return m_Paper_Dpi;};
1070  void PaperDpi(int const dpi) {m_Paper_Dpi = dpi;};
1071 
1073  void * m_pExtendedData;
1074  void * const ExtendedData() const {return m_pExtendedData;};
1075  void ExtendedData(void * const vp) {m_pExtendedData = vp;};
1076  void ExtendedData(HPDFOptions * const vp) {m_pExtendedData = (void*)vp;};
1077 
1078  bool ActivateOnPageOpen() const {return m_bActivateOnPageOpen;};
1079  void ActivateOnPageOpen(bool onoff) {m_bActivateOnPageOpen = onoff;};
1080  float const AnnotLeft() const {return m_fAnnotLeft;};
1081  void AnnotLeft(float f) {m_fAnnotLeft = f;};
1082  float const AnnotRight() const {return m_fAnnotRight;};
1083  void AnnotRight(float f) {m_fAnnotRight = f;};
1084  float const AnnotBottom() const {return m_fAnnotBottom;};
1085  void AnnotBottom(float f) {m_fAnnotBottom = f;};
1086  float const AnnotTop() const {return m_fAnnotTop;};
1087  void AnnotTop(float f) {m_fAnnotTop = f;};
1088 
1089 
1091  const char *m_license;
1092 
1093  int m_antialiasLevel;
1094  int m_jpeg_quality;
1095  unsigned char* m_imageOutputBuffer;
1096  size_t m_imageOutputBufferSize;
1097 
1098 
1099 
1100 
1103  int const Version() const {return m_Version;};
1104  void Version(int const v) {m_Version = v;};
1105 
1107  H_OUTPUT_TYPE m_OutputType;
1109  H_OUTPUT_TYPE OutputType() const {return m_OutputType;};
1111  void OutputType(H_OUTPUT_TYPE ot) {m_OutputType = ot;};
1112 
1114  bool m_b3dOutput;
1116  bool Output3d() const {return m_b3dOutput;};
1118  void Output3d(bool const tf) {m_b3dOutput = tf;};
1119 
1121  bool m_bAscii;
1123  bool Ascii() const {return m_bAscii;};
1125  void Ascii(bool const tf) {m_bAscii = tf;};
1126 
1128  bool m_bStlNormals;
1130  bool StlNormals() const {return m_bStlNormals;};
1132  void StlNormals(bool const tf) {m_bStlNormals = tf;};
1133 
1135  double m_ratio_cm_to_internal_units;
1136 
1140  double PrintToScale() const {return m_ratio_cm_to_internal_units;};
1141 
1157  void PrintToScale(double const r) {m_ratio_cm_to_internal_units = r;};
1158 
1165  float m_PageMargins[4];
1166 
1169 
1171  char const* m_pDWFModelName;
1172 
1175 
1178 
1181 
1184 
1187 
1190 
1193 
1196 
1199 
1202 
1211  char m_bAVICodec[4];
1212 
1215 };
1216 
1217 
1219 
1225 class MVO_API HOutputHandler
1226 {
1227 
1228 public:
1236  HOutputHandler();
1237  virtual ~HOutputHandler();
1238 
1239 
1242  virtual const char * GetOutputName() = 0;
1243 
1248  unsigned long GetOutputOps() {return m_OutputOps;};
1249 
1260  virtual void RegisterOutputHandlerTypes() = 0;
1261 
1262 
1270  virtual HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options);
1271  virtual HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
1272 
1280  virtual HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options);
1281 
1282 
1291  virtual HFileOutputResult FileOutputFromImageKey(const char * filename, HC_KEY image_key, HOutputHandlerOptions * options);
1292  virtual HFileOutputResult FileOutputFromImageKey(const __wchar_t * filename, HC_KEY image_key, HOutputHandlerOptions * options);
1293 
1304  virtual const char * GetOutputTypesString() = 0;
1305 
1314  virtual HOutputHandlerStyle GetOutputStyle() = 0;
1315 
1322  virtual const char * GetOutputDefaultHSRA();
1323 
1327  const char * GetOutputProgress();
1328 
1332  float GetOutputPercentProgress();
1333 
1337  const __wchar_t * GetOutputInformation();
1338 
1345  HIONoticeCallback * SetOutputProgressNoticeCallback(HIONoticeCallback *notice_callback);
1346 
1347 
1354  HIOPercentNoticeCallback * SetOutputPercentProgressNoticeCallback(HIOPercentNoticeCallback *percent_notice_callback);
1355 
1362  HIONoticeCallback * SetOutputInformationNoticeCallback(HIONoticeCallback *notice_callback);
1363 
1365  void ReportOutputProgress(const char * progress);
1366 
1368  void ReportOutputPercentProgress(float percent_progress);
1369 
1371  void ReportOutputInformation(const char * information);
1372 
1373 
1374  void SetModuleDirectory(const char *module_directory);
1375  void SetModuleDirectory(const __wchar_t *module_directory);
1376 
1377 protected:
1378 
1382  void SetStartingOutput();
1383 
1387  void SetFinishedOutput();
1388 
1390  void SetOutputOps(unsigned long ops) {m_OutputOps=ops;};
1392  unsigned long m_OutputOps;
1393 
1394  char *m_module_directory;
1395 private:
1396 
1397  char *m_progress;
1398  float m_percent_progress1;
1399  float m_percent_progress2;
1400  __wchar_t *m_information;
1401  struct vlist_s *m_information_list;
1402  HIONoticeCallback *m_progress_callback;
1403  HIOPercentNoticeCallback *m_percent_progress_callback;
1404  HIONoticeCallback *m_information_callback;
1405 };
1406 
1412 class MVO_API HIOManager
1413 {
1414 
1415 public:
1416 
1417  HIOManager();
1418  virtual ~HIOManager();
1419 
1429  virtual HInputHandler * RegisterInputHandler(const char * file_type, HInputHandler * handler);
1430 
1439  virtual HOutputHandler * RegisterOutputHandler(const char * file_type, HOutputHandler * handler);
1440 
1451  virtual HIOConnector * RegisterConnector(const char * file_type, HIO_CREATE_FREE_FUNCTION Create, HIO_FREE_CONNECTOR_FUNCTION Free);
1452 
1457  virtual HInputHandler * GetInputHandler(const char * file_type);
1458  HInputHandler * GetInputHandler(const __wchar_t * file_type);
1459 #ifdef _MSC_VER
1460  HInputHandler * GetInputHandler(const unsigned short * file_type);
1461 #endif
1462 
1467  virtual HOutputHandler * GetOutputHandler(const char * file_type);
1468  virtual HOutputHandler * GetOutputHandler(const __wchar_t * file_type);
1469 
1474  virtual void RegisterHandlers();
1475 
1480  virtual const char * GetInputHandlerTypes();
1481 
1486  virtual const char * GetOutputHandlerTypes();
1487 
1488 
1495  virtual HIOConnector * CreateConnector(const char * file_type);
1496 
1501  virtual void FreeConnector(HIOConnector * old_connector);
1502 
1503 
1508  static HIOManager *GetCurrentHIOManager();
1509 
1515  static void GetFileOutputResultString(HFileOutputResult result, char *result_str);
1516 
1517 protected:
1518 
1520  struct vhash_s * input_handlers;
1521 
1523  struct vhash_s * output_handlers;
1524 
1526  struct vhash_s * connector_procs;
1527 
1529  struct vlist_s * owned_input_handlers;
1530 
1532  struct vlist_s * owned_output_handlers;
1533 
1535  struct vlist_s * loaded_input_handlers;
1536 
1538  struct vlist_s * loaded_output_handlers;
1539 
1541  struct vhash_s * created_connectors;
1542 
1543  char * m_input_types;
1544  int m_input_types_allocated;
1545 
1546  char * m_output_types;
1547  int m_output_types_allocated;
1548 };
1549 
1550 #ifdef H_PACK_8
1551 #pragma pack(pop)
1552 #endif
1553 
1554 #endif
1555 
Definition: HIOManager.h:1412
HBaseView * m_pHBaseView
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:943
double PrintToScale() const
Definition: HIOManager.h:1140
bool m_bDGNRebaselineModel
DGN file import option: if true then whole model is rebased with use of model extents to compensate f...
Definition: HIOManager.h:592
Definition: HIOManager.h:877
double m_numIsolines
DWG file import option: Set the number of isolines you want for surfaces (cylindrical/spherical/toroi...
Definition: HIOManager.h:513
void(* HIO_FREE_CONNECTOR_FUNCTION)(void *)
Definition: HIOManager.h:140
Definition: HIOManager.h:98
void WindowFrame(bool const tf)
Determines if a window frame is drawn or not.
Definition: HIOManager.h:1049
void HSRAOptions(char const *const tf)
HOOPS HSRAOption string .
Definition: HIOManager.h:975
bool m_pPRCDeleteModelFile
PRC import option: If true model file is deleted after loading is complete.
Definition: HIOManager.h:561
float const PaperHeight() const
Height for output sizing in inches.
Definition: HIOManager.h:1015
ExportNameMap m_names
Definition: HIOManager.h:1174
void PrintToScale(double const r)
Definition: HIOManager.h:1157
bool m_bPRCImportHiddenObjects
PRC import option: If true, hidden objects will be imported though not visible. If false...
Definition: HIOManager.h:584
Specifies an HInputHandler for model data.
Definition: HIOManager.h:225
struct vlist_s * owned_output_handlers
A list of default HOutputHandlers created by the manager.
Definition: HIOManager.h:1532
bool m_bLogging
If true, logging will be enabled in those plugins that support it.
Definition: HIOManager.h:478
The HBhvBehaviorManager class stores and manages all animation related data.
Definition: HBhvBehaviorManager.h:237
char const *const HSRAOptions() const
HOOPS HSRAOption string .
Definition: HIOManager.h:973
Low compression, high accurracy.
Definition: HIOManager.h:898
void *(* HIO_CREATE_FREE_FUNCTION)(void *)
Definition: HIOManager.h:136
void StlNormals(bool const tf)
Determines if we generate and output face normals when writing to STL file format.
Definition: HIOManager.h:1132
float m_fAnnotLeft
Definition: HIOManager.h:1183
bool m_bDWFRebaselineModel
DWF file import option: if true then whole model is rebased with use of model extents to compensate f...
Definition: HIOManager.h:613
Definition: HUtility.h:2324
const char * m_license
A pointer to a license key, intended to be used by 3rd party toolkits which require a license key to ...
Definition: HIOManager.h:496
Specifies an HOutputHandler for geometry data.
Definition: HIOManager.h:865
struct vhash_s * mhash_Hoops2Kernel
A hash map between HOOPS Keys and kernel entities.
Definition: HIOManager.h:213
const char * m_pImageName
The HOOPS image name to use for a newly loaded image.
Definition: HIOManager.h:466
bool m_bLegacyOptimize
Definition: HIOManager.h:639
Definition: HIOManager.h:147
HInputHandler an abstract base class for model and image input.
Definition: HIOManager.h:671
#define HC_KEY
bool m_bAVIShowCompressionDialog
Definition: HIOManager.h:1201
The HCamera class is the data type of a HOOPS Camera Attribute.
Definition: HUtility.h:537
bool m_bDGNImportAllModels
DGN file import option: if true then all the models are imported in the DGN file else only current mo...
Definition: HIOManager.h:595
BREP_Topology * m_pPRCTopologyManager
PRC import option: Pointer to connector class. If not null prc topology entities will be associated t...
Definition: HIOManager.h:566
Specifies an HOutputHandler for a hardcopy output type.
Definition: HIOManager.h:867
HIOConnector * m_pConnector
A pointer to HIOConnector object. The connectivity between HOOPS and kernel will be stored in this...
Definition: HIOManager.h:481
HBhvBehaviorManager * m_pBehaviorManager
A pointer to the behavior manager.
Definition: HIOManager.h:1168
HOutputHandlerStyle
Definition: HIOManager.h:862
Specifies an HInputHandler for image data.
Definition: HIOManager.h:226
bool ConserveMemory() const
This option has been deprecated and has no effect.
Definition: HIOManager.h:1036
Definition: HIOManager.h:121
bool ForceGrayscale() const
Specifies black and white output.
Definition: HIOManager.h:1022
HPrcBrepCompression
Definition: HIOManager.h:896
void PaperWidth(float const f)
Width for output sizing in inches.
Definition: HIOManager.h:1010
void ConserveMemory(bool const tf)
This option has been deprecated and has no effect.
Definition: HIOManager.h:1038
void(* m_pPRCDeleteModelCallback)(void *&pPRCAsmModelFile)
PRC import option: Function pointer to delete model.
Definition: HIOManager.h:582
Specifies an HOutputHandler for an image.
Definition: HIOManager.h:866
struct vhash_s * input_handlers
A hash of HInputHandlers.
Definition: HIOManager.h:1520
HOutputHandler an abstract base class for model and image output.
Definition: HIOManager.h:1225
float const PaperWidth() const
Width for output sizing in inches.
Definition: HIOManager.h:1008
Specifies using an iso view (looking at the origin from (1, 1, 1))
Definition: HIOManager.h:235
Specifies an HOutputHandler for a MVO style html file.
Definition: HIOManager.h:868
double m_depth_range
Definition: HIOManager.h:659
void OutputType(H_OUTPUT_TYPE ot)
The output type.
Definition: HIOManager.h:1111
indicates that cell header entity will be imported as single segment
Definition: HIOManager.h:552
const char * m_pImageFormat
The HOOPS image format to use for loading an image if not using filename .ext for format...
Definition: HIOManager.h:469
void PaperHeight(float const f)
Height for output sizing in inches.
Definition: HIOManager.h:1017
indicates that cell header will have as many segments as its childs
Definition: HIOManager.h:553
struct vhash_s * connector_procs
A hash of HIOConnector Create/Free functions.
Definition: HIOManager.h:1526
void * m_pExtendedData
A pointer to extra data needed by a HInputHandler subclass.
Definition: HIOManager.h:484
bool Ascii() const
Some file formats, support binary and ascii such as STL. Set this to true for ascii output...
Definition: HIOManager.h:1123
bool Output3d() const
Some file formats, such as PDF and DWF, support 2d and/or 3d output. Set this to TRUE for 3d output...
Definition: HIOManager.h:1116
bool m_bDisableDWFDrawOrder
Definition: HIOManager.h:607
bool StlNormals() const
Determines if we generate and output face normals when writing to STL file format.
Definition: HIOManager.h:1130
HOutputHandlerOptions(const HOutputHandlerOptions &o)
Definition: HIOManager.h:930
double m_factorForSmartSolids
Definition: HIOManager.h:538
HPoint m_sDwgContrastColorRgb
Definition: HIOManager.h:631
bool m_bPRCStoreUserAttributes
PRC import option: If true all prc user attributes will be converted as user option.
Definition: HIOManager.h:580
float m_fAnnotBottom
Definition: HIOManager.h:1189
void UseSubscreen(bool const tf)
Determines if HOOPS is calculating a subscreen to match the output to the size of the view window...
Definition: HIOManager.h:1056
void * m_pPRCAsmModelFile
Definition: HIOManager.h:1177
int const ImageDpi() const
Indicates the DPI used for images. This is calculated with info from HC_Show_Device_Info.
Definition: HIOManager.h:1061
bool m_bDisableDWGDrawOrder
Definition: HIOManager.h:522
High compression, low accurracy.
Definition: HIOManager.h:900
float m_fAnnotTop
Definition: HIOManager.h:1192
char const * m_pDWFModelName
Definition: HIOManager.h:1171
bool m_bPRCCreatePRCFileOnly
PRC import option: If true temporary prc file will be created but no parsing and creation of HOOPS en...
Definition: HIOManager.h:572
HInputHandlerOptions(HInputHandlerOptions const *o)
Definition: HIOManager.h:322
HDwgViewVector
Definition: HIOManager.h:233
struct vlist_s * loaded_input_handlers
A list of dynamically loaded HInputHandlers libraries.
Definition: HIOManager.h:1535
void Model(HBaseModel *const m)
A pointer to the HBaseModel object for this output.
Definition: HIOManager.h:954
HPoint const *const WindowColor() const
Set the color of the window. The RGB color stored in xyz of HPoint.
Definition: HIOManager.h:980
HInputHandlerOptions(const HInputHandlerOptions &o)
Definition: HIOManager.h:395
The HBaseModel class is used to store and manage model information.
Definition: HBaseModel.h:47
struct vlist_s * m_listRegAppNames
Definition: HIOManager.h:504
HInputHandlerStyle
Definition: HIOManager.h:224
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:121
H_OUTPUT_TYPE OutputType() const
The output type.
Definition: HIOManager.h:1109
bool m_bInputViaHSF
DWG file import option: Set to true if you want to import the DWG file using BStream Toolkit...
Definition: HIOManager.h:487
bool m_bExporting2DDwf
Definition: HIOManager.h:1214
Definition: HIOManager.h:908
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:332
Specifies using a top view (looking down the positive Z-axis at the XY-plane)
Definition: HIOManager.h:234
int const PaperDpi() const
Indicates the DPI used for paper. This is set from the options dialog.
Definition: HIOManager.h:1068
double m_z_separation
Definition: HIOManager.h:653
bool m_bDWGInsertMeshesAsShells
Definition: HIOManager.h:600
void WindowColor(HPoint const *const tf)
Set the color of the window. The RGB color stored in xyz of HPoint.
Definition: HIOManager.h:982
bool UseWindowColor() const
If set to true, the background color of the view is used.
Definition: HIOManager.h:987
bool m_bIgnoreOffEntities
Definition: HIOManager.h:528
struct vhash_s * output_handlers
A hash of HOutputHandlers.
Definition: HIOManager.h:1523
HInputHandlerOptions()
Definition: HIOManager.h:250
float m_fAnnotRight
Definition: HIOManager.h:1186
bool m_bActivateOnPageOpen
Definition: HIOManager.h:1180
int m_Version
The file format version desired for writing.
Definition: HIOManager.h:1102
Medium compression, medium accurracy.
Definition: HIOManager.h:899
void WindowWidth(float const f)
Width for output sizing in inches.
Definition: HIOManager.h:996
unsigned long GetOutputOps()
Definition: HIOManager.h:1248
void UseWindowColor(bool const tf)
If set to true, the background color of the view is used.
Definition: HIOManager.h:989
void * m_pPRCAsmModelFile
PRC import option: Returned to user. Contains Pointer to A3DAsmModelFile entity.
Definition: HIOManager.h:558
HPrcBrepCompression m_ePrcBrepCompression
Definition: HIOManager.h:1195
double m_Deviation
DWG file import option: The allowable maximum difference in world space between a true mathematical s...
Definition: HIOManager.h:490
double m_coneFactor
Definition: HIOManager.h:533
void Output3d(bool const tf)
Some file formats, such as PDF and DWF, support 2d and/or 3d output. Set this to TRUE for 3d output...
Definition: HIOManager.h:1118
bool m_bPrcCompressTessellation
Definition: HIOManager.h:1198
No compression.
Definition: HIOManager.h:897
bool m_bAttachDWGHandles
Definition: HIOManager.h:541
unsigned long GetInputOps()
Definition: HIOManager.h:689
Definition: HIOManager.h:245
bool m_bOptimizeSegmentTree
SKP file import option: if true then model is optimized using Optimize_Segment_Tree API...
Definition: HIOManager.h:616
struct vlist_s * m_listEntityType
Definition: HIOManager.h:507
HBaseView *const View() const
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:945
HCamera *const Camera() const
A pointer to the HCamera object for this output.
Definition: HIOManager.h:959
void SetInputOps(unsigned long ops)
This sets the HInputOp.
Definition: HIOManager.h:840
bool FastPrint() const
This option has been deprecated. Specifies printing method.
Definition: HIOManager.h:1029
struct vlist_s * loaded_output_handlers
A list of dynamically loaded HOutputHandlers libraries.
Definition: HIOManager.h:1538
void PaperDpi(int const dpi)
Indicates the DPI used for paper. This is set from the options dialog.
Definition: HIOManager.h:1070
HStreamFileToolkit * m_tk
The streamfile toolkit to be used.
Definition: HIOManager.h:475
struct vlist_s * owned_input_handlers
A list of default HInputHandlers created by the manager.
Definition: HIOManager.h:1529
HDwgViewVector m_eDwgViewVector
Definition: HIOManager.h:623
struct vlist_s * m_listDWGLayouts
Definition: HIOManager.h:525
bool m_bForceReimport
DWG file import option: If true, re-imports DWG files (master and all xrefs) even if their correspond...
Definition: HIOManager.h:516
bool m_bImportMetadata
DWG and SKP import option: Set to true if you want to import the metadata (xdata) along with the geom...
Definition: HIOManager.h:493
void SetOutputOps(unsigned long ops)
This sets the HOutputOp.
Definition: HIOManager.h:1390
struct vhash_s * mhash_Kernel2Hoops
A hash map between kernel entities and HOOPS Keys.
Definition: HIOManager.h:216
HC_KEY const Key() const
The HC_Key for this output.
Definition: HIOManager.h:966
HBaseModel *const Model() const
A pointer to the HBaseModel object for this output.
Definition: HIOManager.h:952
float const WindowWidth() const
Width for output sizing in inches.
Definition: HIOManager.h:994
void(* m_pPRCMultiModelSelectionCallback)(char const *in_container, int in_num_configs, char const **in_configs, int &out_config_selection)
PRC import option: Function pointer for interactive multi-model loading.
Definition: HIOManager.h:577
bool UseSubscreen() const
Determines if HOOPS is calculating a subscreen to match the output to the size of the view window...
Definition: HIOManager.h:1054
int m_iDGNCellHeaderOption
DGN file import option: has three option about how cell header should be imported.
Definition: HIOManager.h:544
Specifies using the active viewport in the DWG file if present (if no active viewport is present...
Definition: HIOManager.h:236
struct vhash_s * created_connectors
A list of created HIOConnectors.
Definition: HIOManager.h:1541
HIOConnector * m_pPRCPMIConnector
PRC import option: Pointer to connector class. If not null prc PMI entities will be associated to HOO...
Definition: HIOManager.h:564
bool m_bDwgDepthRangeDrawOrder
Definition: HIOManager.h:647
void WindowHeight(float const f)
Height for output sizing in inches.
Definition: HIOManager.h:1003
HOutputHandlerOptions(HOutputHandlerOptions const *o)
Definition: HIOManager.h:923
float const WindowHeight() const
Height for output sizing in inches.
Definition: HIOManager.h:1001
bool m_bPRCMergeFaces
PRC import option: If true individual faces will be merged into one shell.
Definition: HIOManager.h:568
bool m_bImportWireframeForBrep
DWG file import option: Set to true if you want to import the wireframe representation for BRep solid...
Definition: HIOManager.h:510
HBaseView * m_pHBaseView
A pointer to the HBaseView object for this input.
Definition: HIOManager.h:463
bool m_bImportAllLayouts
Definition: HIOManager.h:589
bool m_bImportThumbnail
DWF file import option: if true then Thumbnail are imported in the DWF file.
Definition: HIOManager.h:610
void View(HBaseView *const v)
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:947
Specifies using the view determined by the camera in the scene segment.
Definition: HIOManager.h:237
bool m_bLocal
The value is true if the image will have the local attribute.
Definition: HIOManager.h:472
bool WindowFrame() const
Determines if a window frame is drawn or not.
Definition: HIOManager.h:1047