Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

HIOManager.h
Go to the documentation of this file.
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 
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 <stdint.h>
25 #include "HTools.h"
26 
27 
28 // forwards
29 enum HFileOutputResult;
30 class HPDFOptions;
31 class HBaseView;
32 class HCamera;
33 class HBaseModel;
34 struct vlist_s;
35 class HStreamFileToolkit;
37 class BREP_Topology;
38 
39 enum H_OUTPUT_TYPE
40 {
41  H_OUTPUT_TYPE_DEFAULT = 0,
42  H_PDF_OUTPUT_PORTFOLIO,
43  H_PDF_OUTPUT_3D,
44  H_PDF_OUTPUT_2D,
45  H_SINGLE_PASS_ZSORT,
46  H_SINGLE_PASS_NO_HIDDEN_SURFACES
47 };
48 
49 
53 #define HInputOpNone (1UL<<0)
54 
58 #define HInputOpFileInputByKey (1UL<<1)
59 
63 #define HInputOpFileInputToImageKey (1UL<<2)
64 
68 #define HOutputOpNone (1UL<<0)
69 
73 #define HOutputOpFileOutputByKey (1UL<<1)
74 
78 #define HOutputOpFileOutputFromImageKey (1UL<<2)
79 
80 
85 #define HIORegisterInputType(type,input_object) HIOManager::GetCurrentHIOManager()->RegisterInputHandler(type, input_object);
86 
87 
88 
90 #define HIORegisterOutputType(type,output_object) HIOManager::GetCurrentHIOManager()->RegisterOutputHandler(type, output_object);
91 
92 
93 
94 
99 class MVO_API HIONoticeCallback
100 {
101 public:
102 
103  virtual ~HIONoticeCallback() {}
108  virtual void Notice(const char * notice) = 0;
109  virtual void Notice(const __wchar_t * notice) {
110  UNREFERENCED(notice);
111  }
112 #ifdef H_USHORT_OVERLOAD
113  virtual void Notice(const unsigned short * notice) {
114  Notice((__wchar_t const *) notice);
115  }
116 #endif
117 };
118 
123 {
124 public:
125  virtual ~HIOPercentNoticeCallback();
130  virtual void Notice(float notice) =0;
131 };
132 
133 
134 
137 typedef void * (*HIO_CREATE_FREE_FUNCTION)(void *);
138 
141 typedef void (*HIO_FREE_CONNECTOR_FUNCTION)(void *);
142 
148 class MVO_API HIOConnector
149 {
150 public:
151 
152  /*Constructs an HIOConnector object.*/
153  HIOConnector();
154  virtual ~HIOConnector();
155 
163  virtual HC_KEY GetHoopsEntity(void * pKernelEntity);
164  virtual HC_KEY GetHoopsEntity(void * pKernelEntity, HC_KEY modelKey);
165 
173  virtual void * GetKernelEntity(HC_KEY key);
174  virtual void * GetKernelEntity(HC_KEY key, HC_KEY modelKey);
175 
182  virtual bool GetHoopsEntities(void * pKernelEntity, vlist_s *ret_HoopsKeysList);
183  virtual bool GetHoopsEntities(void * pKernelEntity, vlist_s *ret_HoopsKeysList, HC_KEY modelKey);
184 
191  virtual bool GetKernelEntities(HC_KEY key, vlist_s *ret_KernelEntitiesList);
192  virtual bool GetKernelEntities(HC_KEY key, vlist_s *ret_KernelEntitiesList, HC_KEY modelKey);
193 
199  virtual void AddConnection(HC_KEY key, void* pKernelEntity);
200  virtual void AddConnection(HC_KEY key, void* pKernelEntity, HC_KEY modelKey);
201 
202 
209  virtual void OptimizeTree(const char * segname, const char * option_string);
210 
211 protected:
212 
214  struct vhash_s *mhash_Hoops2Kernel;
215 
217  struct vhash_s *mhash_Kernel2Hoops;
218 
219 };
220 
228 };
229 
239 };
240 
246 class MVO_API HInputHandlerOptions
247 {
248 public:
249 
252  m_z_separation = 1;
253  m_depth_range = 0;
254  m_pHBaseView = 0;
255  m_pImageName = 0;
256  m_pImageFormat = 0;
257  m_pConnector = 0;
258  m_pExtendedData = 0;
259  m_bLocal = false;
260  m_tk = 0;
261  m_bLogging = false;
262 
263 
264  // Generic options used in DGN, SKP and DWG importer
265  m_bIgnoreOffEntities = false;
266 
267  //DWG/SKP option
268  m_bImportMetadata = false;
269 
270  // DWG import options (try and move them somewhere else)
271  m_bLegacyOptimize = false;
272  m_bDwgSkipUnreferencedBlocks = false;
273 
274  // DGN import Options
275  m_iDGNCellHeaderOption = SINGLE_ENTITY_CELLHEADER;
276  m_coneFactor = 10.0;
277  m_factorForSmartSolids = 45.0;
278  m_bDGNRebaselineModel = false;
279  m_bDGNImportAllModels = false;
280 
281  // PRC options
282  m_pPRCPMIConnector = 0;
283  m_pPRCTopologyManager = 0;
284  m_bPRCMergeFaces = false;
285  m_bPRCImportNonBrepFaces = true;
286  m_bPRCCreatePRCFileOnly = false;
287  m_bPRCInstanceShells = true;
288  m_bPRCCalculatePhysicalProperties = false;
289  m_pPRCMultiModelSelectionCallback = 0;
290  m_pPRCAsmModelFile = 0;
291  m_pPRCDeleteModelFile = false;
292  m_bPRCStoreUserAttributes = true;
293  m_pPRCDeleteModelCallback = 0;
294  m_bPRCImportHiddenObjects = false;
295  m_bPRCLoadAsDrawings = false;
296  m_PRCModelUnits = 0.0f;
297 
298  // DWF import options
299  m_bDisableDWFDrawOrder = false;
300  m_bDWFRebaselineModel = true;
301  m_bImportThumbnail = false;
302 
303  //SKP optimization option
304  m_bOptimizeSegmentTree = false;
305  m_license = 0;
306 
307  m_pOOCNodeDeltas = 0;
308  m_bOOCAutoUpdate = true;
309  m_bOOCAutoCleanup = true;
310 
311  m_attributePrecisionMode = FORCE_FLOAT;
312 // m_geometryPrecisionMode = FLOAT_IF_SAFE;
313 
314  m_generatedDouble = false;
315  m_bIsTestingSettings = false;
316  }
317 
321  m_z_separation = o->m_z_separation;
322  m_depth_range = o->m_depth_range;
323  m_pHBaseView = o->m_pHBaseView;
324  m_pImageName = o->m_pImageName;
325  m_pImageFormat = o->m_pImageFormat;
326  m_pConnector = o->m_pConnector;
327  m_pExtendedData = o->m_pExtendedData;
328  m_bLocal = o->m_bLocal;
329 
330  m_license = o->m_license;
331 
332  //DWG/DGN/SKP option
333  m_bIgnoreOffEntities = o->m_bIgnoreOffEntities;
334 
335  //DWG/SKP option
336  m_bImportMetadata = o->m_bImportMetadata;
337 
338 
339  //DWG Options
340  m_bLegacyOptimize = o->m_bLegacyOptimize;
341  m_bDwgSkipUnreferencedBlocks = o->m_bDwgSkipUnreferencedBlocks;
342 
343  //DGN Options
344  m_iDGNCellHeaderOption = o->m_iDGNCellHeaderOption;
345  m_bDGNRebaselineModel = o->m_bDGNRebaselineModel;
346  m_coneFactor = o->m_coneFactor;
347  m_factorForSmartSolids = o->m_factorForSmartSolids;
348  m_bDGNImportAllModels = o->m_bDGNImportAllModels;
349 
350  // PRC options
351  m_pPRCPMIConnector = o->m_pPRCPMIConnector;
352  m_pPRCTopologyManager = o->m_pPRCTopologyManager;
353  m_bPRCMergeFaces = o->m_bPRCMergeFaces;
354  m_bPRCImportNonBrepFaces = o->m_bPRCImportNonBrepFaces;
355 
356  m_bPRCCreatePRCFileOnly = o->m_bPRCCreatePRCFileOnly;
357  m_bPRCInstanceShells = o->m_bPRCInstanceShells;
358  m_bPRCCalculatePhysicalProperties = o->m_bPRCCalculatePhysicalProperties;
359  m_pPRCMultiModelSelectionCallback = o->m_pPRCMultiModelSelectionCallback;
360  m_pPRCAsmModelFile = o->m_pPRCAsmModelFile;
361  m_pPRCDeleteModelFile = o->m_pPRCDeleteModelFile;
362  m_pPRCDeleteModelCallback = o->m_pPRCDeleteModelCallback;
363  m_bPRCImportHiddenObjects = o->m_bPRCImportHiddenObjects;
364  m_bPRCLoadAsDrawings = o->m_bPRCLoadAsDrawings;
365  m_PRCModelUnits = o->m_PRCModelUnits;
366 
367 
368  // DWF import options
369  m_bDisableDWFDrawOrder = o->m_bDisableDWFDrawOrder;
370  m_bDWFRebaselineModel = o->m_bDWFRebaselineModel;
371  m_bImportThumbnail = o->m_bImportThumbnail;
372 
373 
374  //SKP import option
375  m_bOptimizeSegmentTree = o->m_bOptimizeSegmentTree;
376 
377  m_pOOCNodeDeltas = o->m_pOOCNodeDeltas;
378  m_bOOCAutoUpdate = o->m_bOOCAutoUpdate;
379  m_bOOCAutoCleanup = o->m_bOOCAutoCleanup;
380 
381  m_attributePrecisionMode = o->m_attributePrecisionMode;
382 // m_geometryPrecisionMode = o->m_geometryPrecisionMode;
383  m_generatedDouble = o->m_generatedDouble;
384 
385  m_bIsTestingSettings = o->m_bIsTestingSettings;
386  }
387 
391  m_z_separation = o.m_z_separation;
392  m_depth_range = o.m_depth_range;
393  m_pHBaseView = o.m_pHBaseView;
394  m_pImageName = o.m_pImageName;
395  m_pImageFormat = o.m_pImageFormat;
396  m_pConnector = o.m_pConnector;
397  m_pExtendedData = o.m_pExtendedData;
398  m_bLocal = o.m_bLocal;
399 
400  //DWG/DGN/SKP option
401  m_bIgnoreOffEntities = o.m_bIgnoreOffEntities;
402 
403  //DWG/SKP option
404  m_bImportMetadata = o.m_bImportMetadata;
405 
406  //DWG options
407  m_bLegacyOptimize = o.m_bLegacyOptimize;
408  m_bDwgSkipUnreferencedBlocks = o.m_bDwgSkipUnreferencedBlocks;
409 
410  //DGN options
411  m_iDGNCellHeaderOption = o.m_iDGNCellHeaderOption;
412  m_bDGNRebaselineModel = o.m_bDGNRebaselineModel;
413  m_coneFactor = o.m_coneFactor;
414  m_factorForSmartSolids = o.m_factorForSmartSolids;
415  m_bDGNImportAllModels = o.m_bDGNImportAllModels;
416 
417  // PRC options
418  m_pPRCPMIConnector = o.m_pPRCPMIConnector;
419  m_pPRCTopologyManager = o.m_pPRCTopologyManager;
420  m_bPRCMergeFaces = o.m_bPRCMergeFaces;
421  m_bPRCImportNonBrepFaces = o.m_bPRCImportNonBrepFaces;
422  m_bPRCCreatePRCFileOnly = o.m_bPRCCreatePRCFileOnly;
423  m_bPRCInstanceShells = o.m_bPRCInstanceShells;
424  m_bPRCCalculatePhysicalProperties = o.m_bPRCCalculatePhysicalProperties;
425  m_pPRCMultiModelSelectionCallback = o.m_pPRCMultiModelSelectionCallback;
426  m_pPRCAsmModelFile = o.m_pPRCAsmModelFile;
427  m_pPRCDeleteModelFile = o.m_pPRCDeleteModelFile;
428  m_bPRCImportHiddenObjects = o.m_bPRCImportHiddenObjects;
429  m_bPRCLoadAsDrawings = o.m_bPRCLoadAsDrawings;
430  m_PRCModelUnits = o.m_PRCModelUnits;
431 
432  // DWF import options
433  m_bDisableDWFDrawOrder = o.m_bDisableDWFDrawOrder;
434  m_bDWFRebaselineModel = o.m_bDWFRebaselineModel;
435  m_bImportThumbnail = o.m_bImportThumbnail;
436 
437 
438  //SKP import option
439  m_bOptimizeSegmentTree = o.m_bOptimizeSegmentTree;
440 
441  m_pOOCNodeDeltas = o.m_pOOCNodeDeltas;
442  m_bOOCAutoUpdate = o.m_bOOCAutoUpdate;
443  m_bOOCAutoCleanup = o.m_bOOCAutoCleanup;
444 
445  m_attributePrecisionMode = o.m_attributePrecisionMode;
446 // m_geometryPrecisionMode = o.m_geometryPrecisionMode;
447  m_generatedDouble = o.m_generatedDouble;
448 
449  m_bIsTestingSettings = o.m_bIsTestingSettings;
450  }
451 
452  virtual ~HInputHandlerOptions();
453 
456 
458  const char * m_pImageName;
459 
461  const char * m_pImageFormat;
462 
464  bool m_bLocal;
465 
467  HStreamFileToolkit * m_tk;
468 
471 
474 
477 
480 
482  const char *m_license;
483 
486 
490  double m_coneFactor;
491 
496 
499 
500 
501 
505  enum {
508  OPT_CELLHEADER
509  };
510 
513 
516 
523  bool m_bPRCImportNonBrepFaces;
524 
527  bool m_bPRCInstanceShells;
528 
529  bool m_bPRCCalculatePhysicalProperties;
531  void (*m_pPRCMultiModelSelectionCallback) (char const * in_container, int in_num_configs, char const * in_configs[],
532  int & out_config_selection);
536  void (*m_pPRCDeleteModelCallback) ( void*& pPRCAsmModelFile);
539 
542 
545 
548 
551 
552  // DWF import options
558 
561 
564 
567 
575 
585 
586  /*
587  For 2D files (DWF only as of this time), the drawing can be layered either by using depth range or by offsetting
588  the z values. To separate the layers by z value, make sure z > 0. To use depth range, make sure depth range > 0.
589  */
590  double m_z_separation;
591 
597 
600 
603 
606 
607 
608 
612  enum {
617  FORCE_DOUBLE
618  };
619 
622 
624 // int m_geometryPrecisionMode; // (NOTE: currently not used)
625 
628 
631 };
632 
633 
634 
636 
642 class MVO_API HInputHandler
643 {
644 
645 public:
653  HInputHandler();
654  virtual ~HInputHandler();
655 
660  unsigned long GetInputOps() {return m_InputOps;};
661 
662 
665  virtual const char * GetInputName() = 0;
666 
667 
674  virtual void RegisterInputHandlerTypes() = 0;
675 
682  virtual HInputHandlerStyle GetInputStyle() = 0;
683 
691  virtual HFileInputResult FileInputByKey(const char * filename, HC_KEY key, HInputHandlerOptions * options);
692  virtual HFileInputResult FileInputByKey(const __wchar_t * filename, HC_KEY key, HInputHandlerOptions * options);
693 
694 
703  virtual HFileInputResult FileInputByKey(const unsigned short * filename, HC_KEY key, HInputHandlerOptions * options);
704 
715  virtual HFileInputResult FileInputToImageKey(const char * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
716  virtual HFileInputResult FileInputToImageKey(const __wchar_t * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
717 
718 
728  virtual HFileInputResult FileInputToImageKey(const unsigned short * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
729 
742  virtual const char * GetInputTypesString() = 0;
743 
747  const __wchar_t * GetInputProgress();
748 
752  float GetInputPercentProgress();
753 
757  const __wchar_t * GetInputInformation();
758 
765  HIONoticeCallback * SetInputProgressNoticeCallback(HIONoticeCallback *notice_callback);
766 
767 
774  HIOPercentNoticeCallback * SetInputPercentProgressNoticeCallback(HIOPercentNoticeCallback *percent_notice_callback);
775 
782  HIONoticeCallback * SetInputInformationNoticeCallback(HIONoticeCallback *notice_callback);
783 
785  void ReportInputProgress(const char * progress);
786  void ReportInputProgress(const __wchar_t * progress);
787 
789  void ReportInputPercentProgress(float percent_progress);
790 
792  void ReportInputInformation(const char * information);
793  void ReportInputInformation(const __wchar_t * information);
794 
795  void SetModuleDirectory(const char *module_directory);
796  void SetModuleDirectory(const __wchar_t *module_directory);
797 protected:
798 
802  void SetStartingInput(const char *filename);
803  void SetStartingInput(const __wchar_t *filename = 0);
804 
808  void SetFinishedInput();
809 
811  void SetInputOps(unsigned long ops) {m_InputOps=ops;};
812 
814  unsigned long m_InputOps;
815 
816  __wchar_t *m_module_directory;
817 
818 private:
819 
820  __wchar_t *m_progress;
821  float m_percent_progress1;
822  float m_percent_progress2;
823  __wchar_t *m_information;
824  struct vlist_s *m_information_list;
825  HIONoticeCallback *m_progress_callback;
826  HIONoticeCallback *m_information_callback;
827  HIOPercentNoticeCallback *m_percent_progress_callback;
828 };
829 
834 {
835  HOutputHandlerStyleModel,
840 };
841 
848 class MVO_API ExportNameMap
849 {
850 private:
851  void * _imp;
852 public:
853  ExportNameMap();
854  ~ExportNameMap();
855 
856  H_FORMAT_TEXT lookup(HC_KEY) const;
857  void tag(HC_KEY, H_FORMAT_TEXT const &);
858 };
859 
872 };
873 
879 class MVO_API HOutputHandlerOptions
880 {
881 public:
884 
885  virtual char const * GetType() const;
886 
889  virtual bool PopulateOptions();
890 
895  Init(o);
896  };
897 
902  Init(&o);
903  };
904 
905 
906  virtual ~HOutputHandlerOptions();
907 
911  void Init(HOutputHandlerOptions const *o);
912 
916  HBaseView * const View() const {return m_pHBaseView;};
918  void View(HBaseView * const v) {m_pHBaseView = v;};
919 
921  HBaseModel * m_pHBaseModel;
923  HBaseModel * const Model() const {return m_pHBaseModel;};
925  void Model(HBaseModel * const m) {m_pHBaseModel = m;};
926 
928  HCamera * m_pCamera;
930  HCamera * const Camera() const {return m_pCamera;};
932  void Camera(HCamera * const c) {m_pCamera = c;};
933 
935  HC_KEY m_Key;
937  HC_KEY const Key() const {return m_Key;};
939  void Key(HC_KEY const k) {m_Key = k;};
940 
942  char const * m_pHSRAOptions;
944  char const * const HSRAOptions() const {return m_pHSRAOptions;};
946  void HSRAOptions(char const * const tf) {m_pHSRAOptions = tf;};
947 
949  HPoint const * m_pWindowColor;
951  HPoint const * const WindowColor() const {return m_pWindowColor;};
953  void WindowColor(HPoint const * const tf) {m_pWindowColor = tf;};
954 
956  bool m_bUseWindowColor;
958  bool UseWindowColor() const {return m_bUseWindowColor;};
960  void UseWindowColor(bool const tf) {m_bUseWindowColor = tf;};
961 
963  float m_Window_Width;
965  float const WindowWidth() const {return m_Window_Width;};
967  void WindowWidth(float const f) {m_Window_Width = f;};
968 
970  float m_Window_Height;
972  float const WindowHeight() const {return m_Window_Height;};
974  void WindowHeight(float const f) {m_Window_Height = f;};
975 
977  float m_Paper_Width;
979  float const PaperWidth() const {return m_Paper_Width;};
981  void PaperWidth(float const f) {m_Paper_Width = f;};
982 
984  float m_Paper_Height;
986  float const PaperHeight() const {return m_Paper_Height;};
988  void PaperHeight(float const f) {m_Paper_Height = f;};
989 
991  bool m_ForceGrayscale;
993  bool ForceGrayscale() const {return m_ForceGrayscale;};
995  void ForceGrayscale(bool const tf) {m_ForceGrayscale = tf;};
996 
998  size_t m_lineFuseThreshold;
999 
1003  size_t LineFuseThreshold() const {return m_lineFuseThreshold;};
1004 
1008  void LineFuseThreshold(size_t const tf) {m_lineFuseThreshold = tf;};
1009 
1011  bool m_bFastPrint;
1013  bool FastPrint() const {return m_bFastPrint;};
1015  void FastPrint(bool const tf) {m_bFastPrint = tf;};
1016 
1018  bool m_bConserveMemory;
1020  bool ConserveMemory() const {return m_bConserveMemory;};
1022  void ConserveMemory(bool const tf) {m_bConserveMemory = tf;};
1023 
1024  bool m_bWriteAnimations;
1025  bool WriteAnimations() const {return m_bWriteAnimations;};
1026  void WriteAnimations(bool const tf) {m_bWriteAnimations = tf;};
1027 
1029  bool m_bWindowFrame;
1031  bool WindowFrame() const {return m_bWindowFrame;};
1033  void WindowFrame(bool const tf) {m_bWindowFrame = tf;};
1034 
1036  bool m_bUseSubscreen;
1038  bool UseSubscreen() const {return m_bUseSubscreen;};
1040  void UseSubscreen(bool const tf) {m_bUseSubscreen = tf;};
1041 
1043  int m_Image_Dpi;
1045  int const ImageDpi() const {return m_Image_Dpi;};
1047  void ImageDpi(int const dpi) {m_Image_Dpi = dpi;};
1048 
1050  int m_Paper_Dpi;
1052  int const PaperDpi() const {return m_Paper_Dpi;};
1054  void PaperDpi(int const dpi) {m_Paper_Dpi = dpi;};
1055 
1057  void * m_pExtendedData;
1058  void * const ExtendedData() const {return m_pExtendedData;};
1059  void ExtendedData(void * const vp) {m_pExtendedData = vp;};
1060  void ExtendedData(HPDFOptions * const vp) {m_pExtendedData = (void*)vp;};
1061 
1062  bool ActivateOnPageOpen() const {return m_bActivateOnPageOpen;};
1063  void ActivateOnPageOpen(bool onoff) {m_bActivateOnPageOpen = onoff;};
1064  float const AnnotLeft() const {return m_fAnnotLeft;};
1065  void AnnotLeft(float f) {m_fAnnotLeft = f;};
1066  float const AnnotRight() const {return m_fAnnotRight;};
1067  void AnnotRight(float f) {m_fAnnotRight = f;};
1068  float const AnnotBottom() const {return m_fAnnotBottom;};
1069  void AnnotBottom(float f) {m_fAnnotBottom = f;};
1070  float const AnnotTop() const {return m_fAnnotTop;};
1071  void AnnotTop(float f) {m_fAnnotTop = f;};
1072 
1073 
1075  const char *m_license;
1076 
1077  int m_antialiasLevel;
1078  int m_jpeg_quality;
1079  unsigned char* m_imageOutputBuffer;
1080  size_t m_imageOutputBufferSize;
1081 
1082 
1083 
1084 
1087  int const Version() const {return m_Version;};
1088  void Version(int const v) {m_Version = v;};
1089 
1091  H_OUTPUT_TYPE m_OutputType;
1093  H_OUTPUT_TYPE OutputType() const {return m_OutputType;};
1095  void OutputType(H_OUTPUT_TYPE ot) {m_OutputType = ot;};
1096 
1098  bool m_b3dOutput;
1100  bool Output3d() const {return m_b3dOutput;};
1102  void Output3d(bool const tf) {m_b3dOutput = tf;};
1103 
1105  bool m_bAscii;
1107  bool Ascii() const {return m_bAscii;};
1109  void Ascii(bool const tf) {m_bAscii = tf;};
1110 
1112  bool m_bStlNormals;
1114  bool StlNormals() const {return m_bStlNormals;};
1116  void StlNormals(bool const tf) {m_bStlNormals = tf;};
1117 
1119  double m_ratio_cm_to_internal_units;
1120 
1124  double PrintToScale() const {return m_ratio_cm_to_internal_units;};
1125 
1141  void PrintToScale(double const r) {m_ratio_cm_to_internal_units = r;};
1142 
1149  float m_PageMargins[4];
1150 
1153 
1155  char const* m_pDWFModelName;
1156 
1161 
1164 
1167 
1170 
1173 
1176 
1179 
1182 
1185 
1188 
1191 
1194 
1196  MVO_POINTER_SIZED_INT m_iPrcNameUserDataIndex;
1197 
1198 
1201 
1204 
1213  char m_bAVICodec[4];
1214 
1217 
1220  char const * m_pHTMLTemplateFile;
1221 
1224 };
1225 
1226 
1228 
1234 class MVO_API HOutputHandler
1235 {
1236 
1237 public:
1245  HOutputHandler();
1246  virtual ~HOutputHandler();
1247 
1248 
1251  virtual const char * GetOutputName() = 0;
1252 
1257  unsigned long GetOutputOps() {return m_OutputOps;};
1258 
1269  virtual void RegisterOutputHandlerTypes() = 0;
1270 
1271 
1279  virtual HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options);
1280  virtual HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
1281 
1289  virtual HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options);
1290 
1291 
1300  virtual HFileOutputResult FileOutputFromImageKey(const char * filename, HC_KEY image_key, HOutputHandlerOptions * options);
1301  virtual HFileOutputResult FileOutputFromImageKey(const __wchar_t * filename, HC_KEY image_key, HOutputHandlerOptions * options);
1302 
1313  virtual const char * GetOutputTypesString() = 0;
1314 
1323  virtual HOutputHandlerStyle GetOutputStyle() = 0;
1324 
1331  virtual const char * GetOutputDefaultHSRA();
1332 
1336  const char * GetOutputProgress();
1337 
1341  float GetOutputPercentProgress();
1342 
1346  const __wchar_t * GetOutputInformation();
1347 
1354  HIONoticeCallback * SetOutputProgressNoticeCallback(HIONoticeCallback *notice_callback);
1355 
1356 
1363  HIOPercentNoticeCallback * SetOutputPercentProgressNoticeCallback(HIOPercentNoticeCallback *percent_notice_callback);
1364 
1371  HIONoticeCallback * SetOutputInformationNoticeCallback(HIONoticeCallback *notice_callback);
1372 
1374  void ReportOutputProgress(const char * progress);
1375 
1377  void ReportOutputPercentProgress(float percent_progress);
1378 
1380  void ReportOutputInformation(const char * information);
1381 
1382 
1383  void SetModuleDirectory(const char *module_directory);
1384  void SetModuleDirectory(const __wchar_t *module_directory);
1385 
1386 protected:
1387 
1391  void SetStartingOutput();
1392 
1396  void SetFinishedOutput();
1397 
1399  void SetOutputOps(unsigned long ops) {m_OutputOps=ops;};
1401  unsigned long m_OutputOps;
1402 
1403  char *m_module_directory;
1404 private:
1405 
1406  char *m_progress;
1407  float m_percent_progress1;
1408  float m_percent_progress2;
1409  __wchar_t *m_information;
1410  struct vlist_s *m_information_list;
1411  HIONoticeCallback *m_progress_callback;
1412  HIOPercentNoticeCallback *m_percent_progress_callback;
1413  HIONoticeCallback *m_information_callback;
1414 };
1415 
1421 class MVO_API HIOManager
1422 {
1423 
1424 public:
1425 
1426  HIOManager();
1427  virtual ~HIOManager();
1428 
1438  virtual HInputHandler * RegisterInputHandler(const char * file_type, HInputHandler * handler);
1439 
1448  virtual HOutputHandler * RegisterOutputHandler(const char * file_type, HOutputHandler * handler);
1449 
1460  virtual HIOConnector * RegisterConnector(const char * file_type, HIO_CREATE_FREE_FUNCTION Create, HIO_FREE_CONNECTOR_FUNCTION Free);
1461 
1505  virtual HInputHandler * GetInputHandler(const char * file_type);
1506  HInputHandler * GetInputHandler(const __wchar_t * file_type);
1507 #ifdef _MSC_VER
1508  HInputHandler * GetInputHandler(const unsigned short * file_type);
1509 #endif
1510 
1515  virtual HOutputHandler * GetOutputHandler(const char * file_type);
1516  virtual HOutputHandler * GetOutputHandler(const __wchar_t * file_type);
1517 
1522  virtual void RegisterHandlers();
1523 
1528  virtual const char * GetInputHandlerTypes();
1529 
1534  virtual const char * GetOutputHandlerTypes();
1535 
1536 
1543  virtual HIOConnector * CreateConnector(const char * file_type);
1544 
1549  virtual void FreeConnector(HIOConnector * old_connector);
1550 
1551 
1556  static HIOManager *GetCurrentHIOManager();
1557 
1563  static void GetFileOutputResultString(HFileOutputResult result, char *result_str);
1564 
1568  void CleanCallbacks();
1569 
1570 private:
1571  void RecordOutputHandler (HOutputHandler * handler);
1572  void RecordInputHandler (HInputHandler * handler);
1573 
1574 protected:
1575 
1577  struct vhash_s * input_handlers;
1578 
1580  struct vhash_s * output_handlers;
1581 
1583  struct vhash_s * connector_procs;
1584 
1586  struct vlist_s * owned_input_handlers;
1587 
1589  struct vlist_s * owned_output_handlers;
1590 
1592  struct vlist_s * loaded_input_handlers;
1593 
1595  struct vlist_s * loaded_output_handlers;
1596 
1598  struct vhash_s * created_connectors;
1599 
1600  char * m_input_types;
1601  int m_input_types_allocated;
1602 
1603  char * m_output_types;
1604  int m_output_types_allocated;
1605 };
1606 
1607 #ifdef H_PACK_8
1608 #pragma pack(pop)
1609 #endif
1610 
1611 #endif
1612 
Definition: HIOManager.h:1421
HBaseView * m_pHBaseView
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:914
double PrintToScale() const
Definition: HIOManager.h:1124
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:531
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:547
Definition: HIOManager.h:848
void(* HIO_FREE_CONNECTOR_FUNCTION)(void *)
Definition: HIOManager.h:141
handling choice is left to the importer
Definition: HIOManager.h:613
Definition: HIOManager.h:99
void WindowFrame(bool const tf)
Determines if a window frame is drawn or not.
Definition: HIOManager.h:1033
void HSRAOptions(char const *const tf)
HOOPS HSRAOption string .
Definition: HIOManager.h:946
bool m_pPRCDeleteModelFile
PRC import option: If true model file is deleted after loading is complete.
Definition: HIOManager.h:515
float const PaperHeight() const
Height for output sizing in inches.
Definition: HIOManager.h:986
ExportNameMap m_names
Definition: HIOManager.h:1163
void PrintToScale(double const r)
Definition: HIOManager.h:1141
bool m_bPRCImportHiddenObjects
PRC import option: If true, hidden objects will be imported though not visible. If false...
Definition: HIOManager.h:538
data is forced to single-precision
Definition: HIOManager.h:616
Specifies an HInputHandler for model data.
Definition: HIOManager.h:226
char const * m_pPDFResourceDirectory
Definition: HIOManager.h:1160
struct vlist_s * owned_output_handlers
A list of default HOutputHandlers created by the manager.
Definition: HIOManager.h:1589
bool m_bLogging
If true, logging will be enabled in those plugins that support it.
Definition: HIOManager.h:470
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:944
Low compression, high accuracy.
Definition: HIOManager.h:869
void *(* HIO_CREATE_FREE_FUNCTION)(void *)
Definition: HIOManager.h:137
void StlNormals(bool const tf)
Determines if we generate and output face normals when writing to STL file format.
Definition: HIOManager.h:1116
float m_fAnnotLeft
Definition: HIOManager.h:1172
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:563
Definition: HUtility.h:2357
bool m_bPrcUseNameUserData
Definition: HIOManager.h:1193
MVO_POINTER_SIZED_INT m_iPrcNameUserDataIndex
Definition: HIOManager.h:1196
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:482
Specifies an HOutputHandler for geometry data.
Definition: HIOManager.h:836
struct vhash_s * mhash_Hoops2Kernel
A hash map between HOOPS Keys and kernel entities.
Definition: HIOManager.h:214
const char * m_pImageName
The HOOPS image name to use for a newly loaded image.
Definition: HIOManager.h:458
bool m_bLegacyOptimize
Definition: HIOManager.h:574
Definition: HIOManager.h:148
HInputHandler an abstract base class for model and image input.
Definition: HIOManager.h:642
bool m_bAVIShowCompressionDialog
Definition: HIOManager.h:1203
The HCamera class is the data type of a HOOPS Camera Attribute.
Definition: HUtility.h:540
bool m_bPrcRemoveBRep
Definition: HIOManager.h:1187
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:550
BREP_Topology * m_pPRCTopologyManager
PRC import option: Pointer to connector class. If not null prc topology entities will be associated t...
Definition: HIOManager.h:520
void * m_pOOCNodeDeltas
OOC import option: Pointer to node deltas. If not null, importer will use it to selectively reject po...
Definition: HIOManager.h:599
Specifies an HOutputHandler for a hardcopy output type.
Definition: HIOManager.h:838
HIOConnector * m_pConnector
A pointer to HIOConnector object. The connectivity between HOOPS and kernel will be stored in this...
Definition: HIOManager.h:473
HBhvBehaviorManager * m_pBehaviorManager
A pointer to the behavior manager.
Definition: HIOManager.h:1152
float m_PRCModelUnits
PRC import option: Used to specify the model units of an already loaded model, so that other models c...
Definition: HIOManager.h:544
HOutputHandlerStyle
Definition: HIOManager.h:833
Specifies an HInputHandler for image data.
Definition: HIOManager.h:227
bool ConserveMemory() const
This option has been deprecated and has no effect.
Definition: HIOManager.h:1020
Definition: HIOManager.h:122
bool ForceGrayscale() const
Specifies black and white output.
Definition: HIOManager.h:993
HPrcBrepCompression
Definition: HIOManager.h:867
void PaperWidth(float const f)
Width for output sizing in inches.
Definition: HIOManager.h:981
bool m_bOOCAutoCleanup
OOC import option: Determines whether or not the view for the OOC model should automatically cleanup ...
Definition: HIOManager.h:605
void ConserveMemory(bool const tf)
This option has been deprecated and has no effect.
Definition: HIOManager.h:1022
data is converted to float if it appears safe, otherwise it is retained as double ...
Definition: HIOManager.h:615
void(* m_pPRCDeleteModelCallback)(void *&pPRCAsmModelFile)
PRC import option: Function pointer to delete model.
Definition: HIOManager.h:536
Specifies an HOutputHandler for an image.
Definition: HIOManager.h:837
#define HC_KEY
struct vhash_s * input_handlers
A hash of HInputHandlers.
Definition: HIOManager.h:1577
HOutputHandler an abstract base class for model and image output.
Definition: HIOManager.h:1234
float const PaperWidth() const
Width for output sizing in inches.
Definition: HIOManager.h:979
Specifies using an iso view (looking at the origin from (1, 1, 1))
Definition: HIOManager.h:236
Specifies an HOutputHandler for a MVO style html file.
Definition: HIOManager.h:839
double m_depth_range
Definition: HIOManager.h:596
void OutputType(H_OUTPUT_TYPE ot)
The output type.
Definition: HIOManager.h:1095
bool m_bPRCLoadAsDrawings
PRC import option: When loading a DWG or DXF file through HIOUtilityExchange, set this option to true...
Definition: HIOManager.h:541
indicates that cell header entity will be imported as single segment
Definition: HIOManager.h:506
const char * m_pImageFormat
The HOOPS image format to use for loading an image if not using filename .ext for format...
Definition: HIOManager.h:461
int m_attributePrecisionMode
The manner in which precision in attributes (such as matrices) is handled.
Definition: HIOManager.h:621
void PaperHeight(float const f)
Height for output sizing in inches.
Definition: HIOManager.h:988
indicates that cell header will have as many segments as its children
Definition: HIOManager.h:507
struct vhash_s * connector_procs
A hash of HIOConnector Create/Free functions.
Definition: HIOManager.h:1583
void * m_pExtendedData
A pointer to extra data needed by a HInputHandler subclass.
Definition: HIOManager.h:476
bool Ascii() const
Some file formats, support binary and ascii such as STL. Set this to true for ascii output...
Definition: HIOManager.h:1107
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:1100
bool m_bDisableDWFDrawOrder
Definition: HIOManager.h:557
bool StlNormals() const
Determines if we generate and output face normals when writing to STL file format.
Definition: HIOManager.h:1114
HOutputHandlerOptions(const HOutputHandlerOptions &o)
Definition: HIOManager.h:901
double m_factorForSmartSolids
Definition: HIOManager.h:495
bool m_bPRCStoreUserAttributes
PRC import option: If true all prc user attributes will be converted as user option.
Definition: HIOManager.h:534
float m_fAnnotBottom
Definition: HIOManager.h:1178
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:1040
void * m_pPRCAsmModelFile
Definition: HIOManager.h:1166
char const * m_pHTMLTemplateFile
Definition: HIOManager.h:1220
int const ImageDpi() const
Indicates the DPI used for images. This is calculated with info from HC_Show_Device_Info.
Definition: HIOManager.h:1045
High compression, low accuracy.
Definition: HIOManager.h:871
float m_fAnnotTop
Definition: HIOManager.h:1181
char const * m_pDWFModelName
Definition: HIOManager.h:1155
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:526
HInputHandlerOptions(HInputHandlerOptions const *o)
Definition: HIOManager.h:320
HDwgViewVector
Definition: HIOManager.h:234
struct vlist_s * loaded_input_handlers
A list of dynamically loaded HInputHandlers libraries.
Definition: HIOManager.h:1592
void Model(HBaseModel *const m)
A pointer to the HBaseModel object for this output.
Definition: HIOManager.h:925
HPoint const *const WindowColor() const
Set the color of the window. The RGB color stored in xyz of HPoint.
Definition: HIOManager.h:951
HInputHandlerOptions(const HInputHandlerOptions &o)
Definition: HIOManager.h:390
The HBaseModel class is used to store and manage model information.
Definition: HBaseModel.h:47
HInputHandlerStyle
Definition: HIOManager.h:225
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:1093
bool m_bExporting2DDwf
Definition: HIOManager.h:1216
Definition: HIOManager.h:879
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:235
int const PaperDpi() const
Indicates the DPI used for paper. This is set from the options dialog.
Definition: HIOManager.h:1052
void WindowColor(HPoint const *const tf)
Set the color of the window. The RGB color stored in xyz of HPoint.
Definition: HIOManager.h:953
bool m_bPrcRemoveAttributes
Definition: HIOManager.h:1190
bool UseWindowColor() const
If set to true, the background color of the view is used.
Definition: HIOManager.h:958
bool m_bIgnoreOffEntities
Definition: HIOManager.h:485
struct vhash_s * output_handlers
A hash of HOutputHandlers.
Definition: HIOManager.h:1580
HInputHandlerOptions()
Definition: HIOManager.h:251
float m_fAnnotRight
Definition: HIOManager.h:1175
bool m_bActivateOnPageOpen
Definition: HIOManager.h:1169
int m_Version
The file format version desired for writing.
Definition: HIOManager.h:1086
Medium compression, medium accuracy.
Definition: HIOManager.h:870
bool m_bOOCAutoUpdate
OOC import option: Determines whether or not the view for the OOC model should automatically update w...
Definition: HIOManager.h:602
bool m_bDwgSkipUnreferencedBlocks
Definition: HIOManager.h:584
void WindowWidth(float const f)
Width for output sizing in inches.
Definition: HIOManager.h:967
unsigned long GetOutputOps()
Definition: HIOManager.h:1257
void UseWindowColor(bool const tf)
If set to true, the background color of the view is used.
Definition: HIOManager.h:960
void * m_pPRCAsmModelFile
PRC import option: Returned to user. Contains Pointer to A3DAsmModelFile entity.
Definition: HIOManager.h:512
HPrcBrepCompression m_ePrcBrepCompression
Definition: HIOManager.h:1184
double m_coneFactor
Definition: HIOManager.h:490
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:1102
bool m_bPrcCompressTessellation
Definition: HIOManager.h:1200
No compression.
Definition: HIOManager.h:868
data is kept in the format from the file
Definition: HIOManager.h:614
unsigned long GetInputOps()
Definition: HIOManager.h:660
Definition: HIOManager.h:246
bool m_bOptimizeSegmentTree
SKP file import option: if true then model is optimized using Optimize_Segment_Tree API...
Definition: HIOManager.h:566
HBaseView *const View() const
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:916
bool m_generatedDouble
The manner in which precision in geometry is handled.
Definition: HIOManager.h:627
HCamera *const Camera() const
A pointer to the HCamera object for this output.
Definition: HIOManager.h:930
void SetInputOps(unsigned long ops)
This sets the HInputOp.
Definition: HIOManager.h:811
bool FastPrint() const
This option has been deprecated. Specifies printing method.
Definition: HIOManager.h:1013
struct vlist_s * loaded_output_handlers
A list of dynamically loaded HOutputHandlers libraries.
Definition: HIOManager.h:1595
void PaperDpi(int const dpi)
Indicates the DPI used for paper. This is set from the options dialog.
Definition: HIOManager.h:1054
HStreamFileToolkit * m_tk
The streamfile toolkit to be used.
Definition: HIOManager.h:467
struct vlist_s * owned_input_handlers
A list of default HInputHandlers created by the manager.
Definition: HIOManager.h:1586
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:479
void SetOutputOps(unsigned long ops)
This sets the HOutputOp.
Definition: HIOManager.h:1399
struct vhash_s * mhash_Kernel2Hoops
A hash map between kernel entities and HOOPS Keys.
Definition: HIOManager.h:217
HC_KEY const Key() const
The HC_Key for this output.
Definition: HIOManager.h:937
HBaseModel *const Model() const
A pointer to the HBaseModel object for this output.
Definition: HIOManager.h:923
float const WindowWidth() const
Width for output sizing in inches.
Definition: HIOManager.h:965
bool UseSubscreen() const
Determines if HOOPS is calculating a subscreen to match the output to the size of the view window...
Definition: HIOManager.h:1038
int m_iDGNCellHeaderOption
DGN file import option: has three option about how cell header should be imported.
Definition: HIOManager.h:498
bool m_bIsTestingSettings
Testing settings. true if you want to activate testings settings.
Definition: HIOManager.h:630
Specifies using the active viewport in the DWG file if present (if no active viewport is present...
Definition: HIOManager.h:237
struct vhash_s * created_connectors
A list of created HIOConnectors.
Definition: HIOManager.h:1598
HIOConnector * m_pPRCPMIConnector
PRC import option: Pointer to connector class. If not null prc PMI entities will be associated to HOO...
Definition: HIOManager.h:518
void WindowHeight(float const f)
Height for output sizing in inches.
Definition: HIOManager.h:974
HOutputHandlerOptions(HOutputHandlerOptions const *o)
Definition: HIOManager.h:894
float const WindowHeight() const
Height for output sizing in inches.
Definition: HIOManager.h:972
bool m_bPRCMergeFaces
PRC import option: If true individual faces will be merged into one shell.
Definition: HIOManager.h:522
HBaseView * m_pHBaseView
A pointer to the HBaseView object for this input.
Definition: HIOManager.h:455
bool m_bHTMLIncludeMeasurementInformation
Definition: HIOManager.h:1223
bool m_bImportThumbnail
DWF file import option: if true then Thumbnail are imported in the DWF file.
Definition: HIOManager.h:560
void View(HBaseView *const v)
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:918
Specifies using the view determined by the camera in the scene segment.
Definition: HIOManager.h:238
size_t LineFuseThreshold() const
Definition: HIOManager.h:1003
bool m_bLocal
The value is true if the image will have the local attribute.
Definition: HIOManager.h:464
bool WindowFrame() const
Determines if a window frame is drawn or not.
Definition: HIOManager.h:1031