Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

HIOManager.h
Go to the documentation of this file.
1 // Copyright (c) Tech Soft 3D
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_PRCModelUnits = 0.0f;
296 
297  // DWF import options
298  m_bDisableDWFDrawOrder = false;
299  m_bDWFRebaselineModel = true;
300  m_bImportThumbnail = false;
301 
302  //SKP optimization option
303  m_bOptimizeSegmentTree = false;
304  m_license = 0;
305 
306  m_pOOCNodeDeltas = 0;
307  m_bOOCAutoUpdate = true;
308  m_bOOCAutoCleanup = true;
309  }
310 
314  m_z_separation = o->m_z_separation;
315  m_depth_range = o->m_depth_range;
316  m_pHBaseView = o->m_pHBaseView;
317  m_pImageName = o->m_pImageName;
318  m_pImageFormat = o->m_pImageFormat;
319  m_pConnector = o->m_pConnector;
320  m_pExtendedData = o->m_pExtendedData;
321  m_bLocal = o->m_bLocal;
322 
323  m_license = o->m_license;
324 
325  //DWG/DGN/SKP option
326  m_bIgnoreOffEntities = o->m_bIgnoreOffEntities;
327 
328  //DWG/SKP option
329  m_bImportMetadata = o->m_bImportMetadata;
330 
331 
332  //DWG Options
333  m_bLegacyOptimize = o->m_bLegacyOptimize;
334  m_bDwgSkipUnreferencedBlocks = o->m_bDwgSkipUnreferencedBlocks;
335 
336  //DGN Options
337  m_iDGNCellHeaderOption = o->m_iDGNCellHeaderOption;
338  m_bDGNRebaselineModel = o->m_bDGNRebaselineModel;
339  m_coneFactor = o->m_coneFactor;
340  m_factorForSmartSolids = o->m_factorForSmartSolids;
341  m_bDGNImportAllModels = o->m_bDGNImportAllModels;
342 
343  // PRC options
344  m_pPRCPMIConnector = o->m_pPRCPMIConnector;
345  m_pPRCTopologyManager = o->m_pPRCTopologyManager;
346  m_bPRCMergeFaces = o->m_bPRCMergeFaces;
347  m_bPRCImportNonBrepFaces = o->m_bPRCImportNonBrepFaces;
348 
349  m_bPRCCreatePRCFileOnly = o->m_bPRCCreatePRCFileOnly;
350  m_bPRCInstanceShells = o->m_bPRCInstanceShells;
351  m_bPRCCalculatePhysicalProperties = o->m_bPRCCalculatePhysicalProperties;
352  m_pPRCMultiModelSelectionCallback = o->m_pPRCMultiModelSelectionCallback;
353  m_pPRCAsmModelFile = o->m_pPRCAsmModelFile;
354  m_pPRCDeleteModelFile = o->m_pPRCDeleteModelFile;
355  m_pPRCDeleteModelCallback = o->m_pPRCDeleteModelCallback;
356  m_bPRCImportHiddenObjects = o->m_bPRCImportHiddenObjects;
357  m_PRCModelUnits = o->m_PRCModelUnits;
358 
359 
360  // DWF import options
361  m_bDisableDWFDrawOrder = o->m_bDisableDWFDrawOrder;
362  m_bDWFRebaselineModel = o->m_bDWFRebaselineModel;
363  m_bImportThumbnail = o->m_bImportThumbnail;
364 
365 
366  //SKP import option
367  m_bOptimizeSegmentTree = o->m_bOptimizeSegmentTree;
368 
369  m_pOOCNodeDeltas = o->m_pOOCNodeDeltas;
370  m_bOOCAutoUpdate = o->m_bOOCAutoUpdate;
371  m_bOOCAutoCleanup = o->m_bOOCAutoCleanup;
372  }
373 
377  m_z_separation = o.m_z_separation;
378  m_depth_range = o.m_depth_range;
379  m_pHBaseView = o.m_pHBaseView;
380  m_pImageName = o.m_pImageName;
381  m_pImageFormat = o.m_pImageFormat;
382  m_pConnector = o.m_pConnector;
383  m_pExtendedData = o.m_pExtendedData;
384  m_bLocal = o.m_bLocal;
385 
386  //DWG/DGN/SKP option
387  m_bIgnoreOffEntities = o.m_bIgnoreOffEntities;
388 
389  //DWG/SKP option
390  m_bImportMetadata = o.m_bImportMetadata;
391 
392  //DWG options
393  m_bLegacyOptimize = o.m_bLegacyOptimize;
394  m_bDwgSkipUnreferencedBlocks = o.m_bDwgSkipUnreferencedBlocks;
395 
396  //DGN options
397  m_iDGNCellHeaderOption = o.m_iDGNCellHeaderOption;
398  m_bDGNRebaselineModel = o.m_bDGNRebaselineModel;
399  m_coneFactor = o.m_coneFactor;
400  m_factorForSmartSolids = o.m_factorForSmartSolids;
401  m_bDGNImportAllModels = o.m_bDGNImportAllModels;
402 
403  // PRC options
404  m_pPRCPMIConnector = o.m_pPRCPMIConnector;
405  m_pPRCTopologyManager = o.m_pPRCTopologyManager;
406  m_bPRCMergeFaces = o.m_bPRCMergeFaces;
407  m_bPRCImportNonBrepFaces = o.m_bPRCImportNonBrepFaces;
408  m_bPRCCreatePRCFileOnly = o.m_bPRCCreatePRCFileOnly;
409  m_bPRCInstanceShells = o.m_bPRCInstanceShells;
410  m_bPRCCalculatePhysicalProperties = o.m_bPRCCalculatePhysicalProperties;
411  m_pPRCMultiModelSelectionCallback = o.m_pPRCMultiModelSelectionCallback;
412  m_pPRCAsmModelFile = o.m_pPRCAsmModelFile;
413  m_pPRCDeleteModelFile = o.m_pPRCDeleteModelFile;
414  m_bPRCImportHiddenObjects = o.m_bPRCImportHiddenObjects;
415  m_PRCModelUnits = o.m_PRCModelUnits;
416 
417  // DWF import options
418  m_bDisableDWFDrawOrder = o.m_bDisableDWFDrawOrder;
419  m_bDWFRebaselineModel = o.m_bDWFRebaselineModel;
420  m_bImportThumbnail = o.m_bImportThumbnail;
421 
422 
423  //SKP import option
424  m_bOptimizeSegmentTree = o.m_bOptimizeSegmentTree;
425 
426  m_pOOCNodeDeltas = o.m_pOOCNodeDeltas;
427  m_bOOCAutoUpdate = o.m_bOOCAutoUpdate;
428  m_bOOCAutoCleanup = o.m_bOOCAutoCleanup;
429  }
430 
431  virtual ~HInputHandlerOptions();
432 
435 
437  const char * m_pImageName;
438 
440  const char * m_pImageFormat;
441 
443  bool m_bLocal;
444 
446  HStreamFileToolkit * m_tk;
447 
450 
453 
456 
459 
461  const char *m_license;
462 
465 
469  double m_coneFactor;
470 
475 
478 
479 
480 
484  enum {
487  OPT_CELLHEADER
488  };
489 
492 
495 
502  bool m_bPRCImportNonBrepFaces;
503 
506  bool m_bPRCInstanceShells;
507 
508  bool m_bPRCCalculatePhysicalProperties;
510  void (*m_pPRCMultiModelSelectionCallback) (char const * in_container, int in_num_configs, char const * in_configs[],
511  int & out_config_selection);
515  void (*m_pPRCDeleteModelCallback) ( void*& pPRCAsmModelFile);
518 
521 
524 
527 
528  // DWF import options
534 
537 
540 
543 
551 
561 
562  /*
563  For 2D files (DWF only as of this time), the drawing can be layered either by using depth range or by offsetting
564  the z values. To separate the layers by z value, make sure z > 0. To use depth range, make sure depth range > 0.
565  */
566  double m_z_separation;
567 
573 
576 
579 
582 };
583 
584 
585 
587 
593 class MVO_API HInputHandler
594 {
595 
596 public:
604  HInputHandler();
605  virtual ~HInputHandler();
606 
611  unsigned long GetInputOps() {return m_InputOps;};
612 
613 
616  virtual const char * GetInputName() = 0;
617 
618 
625  virtual void RegisterInputHandlerTypes() = 0;
626 
633  virtual HInputHandlerStyle GetInputStyle() = 0;
634 
642  virtual HFileInputResult FileInputByKey(const char * filename, HC_KEY key, HInputHandlerOptions * options);
643  virtual HFileInputResult FileInputByKey(const __wchar_t * filename, HC_KEY key, HInputHandlerOptions * options);
644 
645 
654  virtual HFileInputResult FileInputByKey(const unsigned short * filename, HC_KEY key, HInputHandlerOptions * options);
655 
666  virtual HFileInputResult FileInputToImageKey(const char * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
667  virtual HFileInputResult FileInputToImageKey(const __wchar_t * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
668 
669 
679  virtual HFileInputResult FileInputToImageKey(const unsigned short * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
680 
693  virtual const char * GetInputTypesString() = 0;
694 
698  const __wchar_t * GetInputProgress();
699 
703  float GetInputPercentProgress();
704 
708  const __wchar_t * GetInputInformation();
709 
716  HIONoticeCallback * SetInputProgressNoticeCallback(HIONoticeCallback *notice_callback);
717 
718 
725  HIOPercentNoticeCallback * SetInputPercentProgressNoticeCallback(HIOPercentNoticeCallback *percent_notice_callback);
726 
733  HIONoticeCallback * SetInputInformationNoticeCallback(HIONoticeCallback *notice_callback);
734 
736  void ReportInputProgress(const char * progress);
737  void ReportInputProgress(const __wchar_t * progress);
738 
740  void ReportInputPercentProgress(float percent_progress);
741 
743  void ReportInputInformation(const char * information);
744  void ReportInputInformation(const __wchar_t * information);
745 
746  void SetModuleDirectory(const char *module_directory);
747  void SetModuleDirectory(const __wchar_t *module_directory);
748 protected:
749 
753  void SetStartingInput(const char *filename);
754  void SetStartingInput(const __wchar_t *filename = 0);
755 
759  void SetFinishedInput();
760 
762  void SetInputOps(unsigned long ops) {m_InputOps=ops;};
763 
765  unsigned long m_InputOps;
766 
767  __wchar_t *m_module_directory;
768 
769 private:
770 
771  __wchar_t *m_progress;
772  float m_percent_progress1;
773  float m_percent_progress2;
774  __wchar_t *m_information;
775  struct vlist_s *m_information_list;
776  HIONoticeCallback *m_progress_callback;
777  HIONoticeCallback *m_information_callback;
778  HIOPercentNoticeCallback *m_percent_progress_callback;
779 };
780 
785 {
786  HOutputHandlerStyleModel,
791 };
792 
799 class MVO_API ExportNameMap
800 {
801 private:
802  void * _imp;
803 public:
804  ExportNameMap();
805  ~ExportNameMap();
806 
807  H_FORMAT_TEXT lookup(HC_KEY) const;
808  void tag(HC_KEY, H_FORMAT_TEXT const &);
809 };
810 
823 };
824 
830 class MVO_API HOutputHandlerOptions
831 {
832 public:
835 
836  virtual char const * GetType() const;
837 
840  virtual bool PopulateOptions();
841 
846  Init(o);
847  };
848 
853  Init(&o);
854  };
855 
856 
857  virtual ~HOutputHandlerOptions();
858 
862  void Init(HOutputHandlerOptions const *o);
863 
867  HBaseView * const View() const {return m_pHBaseView;};
869  void View(HBaseView * const v) {m_pHBaseView = v;};
870 
872  HBaseModel * m_pHBaseModel;
874  HBaseModel * const Model() const {return m_pHBaseModel;};
876  void Model(HBaseModel * const m) {m_pHBaseModel = m;};
877 
879  HCamera * m_pCamera;
881  HCamera * const Camera() const {return m_pCamera;};
883  void Camera(HCamera * const c) {m_pCamera = c;};
884 
886  HC_KEY m_Key;
888  HC_KEY const Key() const {return m_Key;};
890  void Key(HC_KEY const k) {m_Key = k;};
891 
893  char const * m_pHSRAOptions;
895  char const * const HSRAOptions() const {return m_pHSRAOptions;};
897  void HSRAOptions(char const * const tf) {m_pHSRAOptions = tf;};
898 
900  HPoint const * m_pWindowColor;
902  HPoint const * const WindowColor() const {return m_pWindowColor;};
904  void WindowColor(HPoint const * const tf) {m_pWindowColor = tf;};
905 
907  bool m_bUseWindowColor;
909  bool UseWindowColor() const {return m_bUseWindowColor;};
911  void UseWindowColor(bool const tf) {m_bUseWindowColor = tf;};
912 
914  float m_Window_Width;
916  float const WindowWidth() const {return m_Window_Width;};
918  void WindowWidth(float const f) {m_Window_Width = f;};
919 
921  float m_Window_Height;
923  float const WindowHeight() const {return m_Window_Height;};
925  void WindowHeight(float const f) {m_Window_Height = f;};
926 
928  float m_Paper_Width;
930  float const PaperWidth() const {return m_Paper_Width;};
932  void PaperWidth(float const f) {m_Paper_Width = f;};
933 
935  float m_Paper_Height;
937  float const PaperHeight() const {return m_Paper_Height;};
939  void PaperHeight(float const f) {m_Paper_Height = f;};
940 
942  bool m_ForceGrayscale;
944  bool ForceGrayscale() const {return m_ForceGrayscale;};
946  void ForceGrayscale(bool const tf) {m_ForceGrayscale = tf;};
947 
949  size_t m_lineFuseThreshold;
950 
954  size_t LineFuseThreshold() const {return m_lineFuseThreshold;};
955 
959  void LineFuseThreshold(size_t const tf) {m_lineFuseThreshold = tf;};
960 
962  bool m_bFastPrint;
964  bool FastPrint() const {return m_bFastPrint;};
966  void FastPrint(bool const tf) {m_bFastPrint = tf;};
967 
969  bool m_bConserveMemory;
971  bool ConserveMemory() const {return m_bConserveMemory;};
973  void ConserveMemory(bool const tf) {m_bConserveMemory = tf;};
974 
975  bool m_bWriteAnimations;
976  bool WriteAnimations() const {return m_bWriteAnimations;};
977  void WriteAnimations(bool const tf) {m_bWriteAnimations = tf;};
978 
980  bool m_bWindowFrame;
982  bool WindowFrame() const {return m_bWindowFrame;};
984  void WindowFrame(bool const tf) {m_bWindowFrame = tf;};
985 
987  bool m_bUseSubscreen;
989  bool UseSubscreen() const {return m_bUseSubscreen;};
991  void UseSubscreen(bool const tf) {m_bUseSubscreen = tf;};
992 
994  int m_Image_Dpi;
996  int const ImageDpi() const {return m_Image_Dpi;};
998  void ImageDpi(int const dpi) {m_Image_Dpi = dpi;};
999 
1001  int m_Paper_Dpi;
1003  int const PaperDpi() const {return m_Paper_Dpi;};
1005  void PaperDpi(int const dpi) {m_Paper_Dpi = dpi;};
1006 
1008  void * m_pExtendedData;
1009  void * const ExtendedData() const {return m_pExtendedData;};
1010  void ExtendedData(void * const vp) {m_pExtendedData = vp;};
1011  void ExtendedData(HPDFOptions * const vp) {m_pExtendedData = (void*)vp;};
1012 
1013  bool ActivateOnPageOpen() const {return m_bActivateOnPageOpen;};
1014  void ActivateOnPageOpen(bool onoff) {m_bActivateOnPageOpen = onoff;};
1015  float const AnnotLeft() const {return m_fAnnotLeft;};
1016  void AnnotLeft(float f) {m_fAnnotLeft = f;};
1017  float const AnnotRight() const {return m_fAnnotRight;};
1018  void AnnotRight(float f) {m_fAnnotRight = f;};
1019  float const AnnotBottom() const {return m_fAnnotBottom;};
1020  void AnnotBottom(float f) {m_fAnnotBottom = f;};
1021  float const AnnotTop() const {return m_fAnnotTop;};
1022  void AnnotTop(float f) {m_fAnnotTop = f;};
1023 
1024 
1026  const char *m_license;
1027 
1028  int m_antialiasLevel;
1029  int m_jpeg_quality;
1030  unsigned char* m_imageOutputBuffer;
1031  size_t m_imageOutputBufferSize;
1032 
1033 
1034 
1035 
1038  int const Version() const {return m_Version;};
1039  void Version(int const v) {m_Version = v;};
1040 
1042  H_OUTPUT_TYPE m_OutputType;
1044  H_OUTPUT_TYPE OutputType() const {return m_OutputType;};
1046  void OutputType(H_OUTPUT_TYPE ot) {m_OutputType = ot;};
1047 
1049  bool m_b3dOutput;
1051  bool Output3d() const {return m_b3dOutput;};
1053  void Output3d(bool const tf) {m_b3dOutput = tf;};
1054 
1056  bool m_bAscii;
1058  bool Ascii() const {return m_bAscii;};
1060  void Ascii(bool const tf) {m_bAscii = tf;};
1061 
1063  bool m_bStlNormals;
1065  bool StlNormals() const {return m_bStlNormals;};
1067  void StlNormals(bool const tf) {m_bStlNormals = tf;};
1068 
1070  double m_ratio_cm_to_internal_units;
1071 
1075  double PrintToScale() const {return m_ratio_cm_to_internal_units;};
1076 
1092  void PrintToScale(double const r) {m_ratio_cm_to_internal_units = r;};
1093 
1100  float m_PageMargins[4];
1101 
1104 
1106  char const* m_pDWFModelName;
1107 
1112 
1115 
1118 
1121 
1124 
1127 
1130 
1133 
1136 
1139 
1142 
1145 
1147  MVO_POINTER_SIZED_INT m_iPrcNameUserDataIndex;
1148 
1149 
1152 
1155 
1164  char m_bAVICodec[4];
1165 
1168 };
1169 
1170 
1172 
1178 class MVO_API HOutputHandler
1179 {
1180 
1181 public:
1189  HOutputHandler();
1190  virtual ~HOutputHandler();
1191 
1192 
1195  virtual const char * GetOutputName() = 0;
1196 
1201  unsigned long GetOutputOps() {return m_OutputOps;};
1202 
1213  virtual void RegisterOutputHandlerTypes() = 0;
1214 
1215 
1223  virtual HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options);
1224  virtual HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
1225 
1233  virtual HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options);
1234 
1235 
1244  virtual HFileOutputResult FileOutputFromImageKey(const char * filename, HC_KEY image_key, HOutputHandlerOptions * options);
1245  virtual HFileOutputResult FileOutputFromImageKey(const __wchar_t * filename, HC_KEY image_key, HOutputHandlerOptions * options);
1246 
1257  virtual const char * GetOutputTypesString() = 0;
1258 
1267  virtual HOutputHandlerStyle GetOutputStyle() = 0;
1268 
1275  virtual const char * GetOutputDefaultHSRA();
1276 
1280  const char * GetOutputProgress();
1281 
1285  float GetOutputPercentProgress();
1286 
1290  const __wchar_t * GetOutputInformation();
1291 
1298  HIONoticeCallback * SetOutputProgressNoticeCallback(HIONoticeCallback *notice_callback);
1299 
1300 
1307  HIOPercentNoticeCallback * SetOutputPercentProgressNoticeCallback(HIOPercentNoticeCallback *percent_notice_callback);
1308 
1315  HIONoticeCallback * SetOutputInformationNoticeCallback(HIONoticeCallback *notice_callback);
1316 
1318  void ReportOutputProgress(const char * progress);
1319 
1321  void ReportOutputPercentProgress(float percent_progress);
1322 
1324  void ReportOutputInformation(const char * information);
1325 
1326 
1327  void SetModuleDirectory(const char *module_directory);
1328  void SetModuleDirectory(const __wchar_t *module_directory);
1329 
1330 protected:
1331 
1335  void SetStartingOutput();
1336 
1340  void SetFinishedOutput();
1341 
1343  void SetOutputOps(unsigned long ops) {m_OutputOps=ops;};
1345  unsigned long m_OutputOps;
1346 
1347  char *m_module_directory;
1348 private:
1349 
1350  char *m_progress;
1351  float m_percent_progress1;
1352  float m_percent_progress2;
1353  __wchar_t *m_information;
1354  struct vlist_s *m_information_list;
1355  HIONoticeCallback *m_progress_callback;
1356  HIOPercentNoticeCallback *m_percent_progress_callback;
1357  HIONoticeCallback *m_information_callback;
1358 };
1359 
1365 class MVO_API HIOManager
1366 {
1367 
1368 public:
1369 
1370  HIOManager();
1371  virtual ~HIOManager();
1372 
1382  virtual HInputHandler * RegisterInputHandler(const char * file_type, HInputHandler * handler);
1383 
1392  virtual HOutputHandler * RegisterOutputHandler(const char * file_type, HOutputHandler * handler);
1393 
1404  virtual HIOConnector * RegisterConnector(const char * file_type, HIO_CREATE_FREE_FUNCTION Create, HIO_FREE_CONNECTOR_FUNCTION Free);
1405 
1410  virtual HInputHandler * GetInputHandler(const char * file_type);
1411  HInputHandler * GetInputHandler(const __wchar_t * file_type);
1412 #ifdef _MSC_VER
1413  HInputHandler * GetInputHandler(const unsigned short * file_type);
1414 #endif
1415 
1420  virtual HOutputHandler * GetOutputHandler(const char * file_type);
1421  virtual HOutputHandler * GetOutputHandler(const __wchar_t * file_type);
1422 
1427  virtual void RegisterHandlers();
1428 
1433  virtual const char * GetInputHandlerTypes();
1434 
1439  virtual const char * GetOutputHandlerTypes();
1440 
1441 
1448  virtual HIOConnector * CreateConnector(const char * file_type);
1449 
1454  virtual void FreeConnector(HIOConnector * old_connector);
1455 
1456 
1461  static HIOManager *GetCurrentHIOManager();
1462 
1468  static void GetFileOutputResultString(HFileOutputResult result, char *result_str);
1469 
1470 private:
1471  void RecordOutputHandler (HOutputHandler * handler);
1472  void RecordInputHandler (HInputHandler * handler);
1473 
1474 protected:
1475 
1477  struct vhash_s * input_handlers;
1478 
1480  struct vhash_s * output_handlers;
1481 
1483  struct vhash_s * connector_procs;
1484 
1486  struct vlist_s * owned_input_handlers;
1487 
1489  struct vlist_s * owned_output_handlers;
1490 
1492  struct vlist_s * loaded_input_handlers;
1493 
1495  struct vlist_s * loaded_output_handlers;
1496 
1498  struct vhash_s * created_connectors;
1499 
1500  char * m_input_types;
1501  int m_input_types_allocated;
1502 
1503  char * m_output_types;
1504  int m_output_types_allocated;
1505 };
1506 
1507 #ifdef H_PACK_8
1508 #pragma pack(pop)
1509 #endif
1510 
1511 #endif
1512 
Definition: HIOManager.h:1365
HBaseView * m_pHBaseView
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:865
double PrintToScale() const
Definition: HIOManager.h:1075
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:510
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:523
Definition: HIOManager.h:799
void(* HIO_FREE_CONNECTOR_FUNCTION)(void *)
Definition: HIOManager.h:141
Definition: HIOManager.h:99
void WindowFrame(bool const tf)
Determines if a window frame is drawn or not.
Definition: HIOManager.h:984
void HSRAOptions(char const *const tf)
HOOPS HSRAOption string .
Definition: HIOManager.h:897
bool m_pPRCDeleteModelFile
PRC import option: If true model file is deleted after loading is complete.
Definition: HIOManager.h:494
float const PaperHeight() const
Height for output sizing in inches.
Definition: HIOManager.h:937
ExportNameMap m_names
Definition: HIOManager.h:1114
void PrintToScale(double const r)
Definition: HIOManager.h:1092
bool m_bPRCImportHiddenObjects
PRC import option: If true, hidden objects will be imported though not visible. If false...
Definition: HIOManager.h:517
Specifies an HInputHandler for model data.
Definition: HIOManager.h:226
char const * m_pPDFResourceDirectory
Definition: HIOManager.h:1111
struct vlist_s * owned_output_handlers
A list of default HOutputHandlers created by the manager.
Definition: HIOManager.h:1489
bool m_bLogging
If true, logging will be enabled in those plugins that support it.
Definition: HIOManager.h:449
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:895
Low compression, high accurracy.
Definition: HIOManager.h:820
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:1067
float m_fAnnotLeft
Definition: HIOManager.h:1123
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:539
Definition: HUtility.h:2327
bool m_bPrcUseNameUserData
Definition: HIOManager.h:1144
MVO_POINTER_SIZED_INT m_iPrcNameUserDataIndex
Definition: HIOManager.h:1147
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:461
Specifies an HOutputHandler for geometry data.
Definition: HIOManager.h:787
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:437
bool m_bLegacyOptimize
Definition: HIOManager.h:550
Definition: HIOManager.h:148
HInputHandler an abstract base class for model and image input.
Definition: HIOManager.h:593
bool m_bAVIShowCompressionDialog
Definition: HIOManager.h:1154
The HCamera class is the data type of a HOOPS Camera Attribute.
Definition: HUtility.h:537
bool m_bPrcRemoveBRep
Definition: HIOManager.h:1138
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:526
BREP_Topology * m_pPRCTopologyManager
PRC import option: Pointer to connector class. If not null prc topology entities will be associated t...
Definition: HIOManager.h:499
void * m_pOOCNodeDeltas
OOC import option: Pointer to node deltas. If not null, importer will use it to selectively reject po...
Definition: HIOManager.h:575
Specifies an HOutputHandler for a hardcopy output type.
Definition: HIOManager.h:789
HIOConnector * m_pConnector
A pointer to HIOConnector object. The connectivity between HOOPS and kernel will be stored in this...
Definition: HIOManager.h:452
HBhvBehaviorManager * m_pBehaviorManager
A pointer to the behavior manager.
Definition: HIOManager.h:1103
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:520
HOutputHandlerStyle
Definition: HIOManager.h:784
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:971
Definition: HIOManager.h:122
bool ForceGrayscale() const
Specifies black and white output.
Definition: HIOManager.h:944
HPrcBrepCompression
Definition: HIOManager.h:818
void PaperWidth(float const f)
Width for output sizing in inches.
Definition: HIOManager.h:932
bool m_bOOCAutoCleanup
OOC import option: Determines whether or not the view for the OOC model should automatically cleanup ...
Definition: HIOManager.h:581
void ConserveMemory(bool const tf)
This option has been deprecated and has no effect.
Definition: HIOManager.h:973
void(* m_pPRCDeleteModelCallback)(void *&pPRCAsmModelFile)
PRC import option: Function pointer to delete model.
Definition: HIOManager.h:515
Specifies an HOutputHandler for an image.
Definition: HIOManager.h:788
#define HC_KEY
struct vhash_s * input_handlers
A hash of HInputHandlers.
Definition: HIOManager.h:1477
HOutputHandler an abstract base class for model and image output.
Definition: HIOManager.h:1178
float const PaperWidth() const
Width for output sizing in inches.
Definition: HIOManager.h:930
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:790
double m_depth_range
Definition: HIOManager.h:572
void OutputType(H_OUTPUT_TYPE ot)
The output type.
Definition: HIOManager.h:1046
indicates that cell header entity will be imported as single segment
Definition: HIOManager.h:485
const char * m_pImageFormat
The HOOPS image format to use for loading an image if not using filename .ext for format...
Definition: HIOManager.h:440
void PaperHeight(float const f)
Height for output sizing in inches.
Definition: HIOManager.h:939
indicates that cell header will have as many segments as its childs
Definition: HIOManager.h:486
struct vhash_s * connector_procs
A hash of HIOConnector Create/Free functions.
Definition: HIOManager.h:1483
void * m_pExtendedData
A pointer to extra data needed by a HInputHandler subclass.
Definition: HIOManager.h:455
bool Ascii() const
Some file formats, support binary and ascii such as STL. Set this to true for ascii output...
Definition: HIOManager.h:1058
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:1051
bool m_bDisableDWFDrawOrder
Definition: HIOManager.h:533
bool StlNormals() const
Determines if we generate and output face normals when writing to STL file format.
Definition: HIOManager.h:1065
HOutputHandlerOptions(const HOutputHandlerOptions &o)
Definition: HIOManager.h:852
double m_factorForSmartSolids
Definition: HIOManager.h:474
bool m_bPRCStoreUserAttributes
PRC import option: If true all prc user attributes will be converted as user option.
Definition: HIOManager.h:513
float m_fAnnotBottom
Definition: HIOManager.h:1129
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:991
void * m_pPRCAsmModelFile
Definition: HIOManager.h:1117
int const ImageDpi() const
Indicates the DPI used for images. This is calculated with info from HC_Show_Device_Info.
Definition: HIOManager.h:996
High compression, low accurracy.
Definition: HIOManager.h:822
float m_fAnnotTop
Definition: HIOManager.h:1132
char const * m_pDWFModelName
Definition: HIOManager.h:1106
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:505
HInputHandlerOptions(HInputHandlerOptions const *o)
Definition: HIOManager.h:313
HDwgViewVector
Definition: HIOManager.h:234
struct vlist_s * loaded_input_handlers
A list of dynamically loaded HInputHandlers libraries.
Definition: HIOManager.h:1492
void Model(HBaseModel *const m)
A pointer to the HBaseModel object for this output.
Definition: HIOManager.h:876
HPoint const *const WindowColor() const
Set the color of the window. The RGB color stored in xyz of HPoint.
Definition: HIOManager.h:902
HInputHandlerOptions(const HInputHandlerOptions &o)
Definition: HIOManager.h:376
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:1044
bool m_bExporting2DDwf
Definition: HIOManager.h:1167
Definition: HIOManager.h:830
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:1003
void WindowColor(HPoint const *const tf)
Set the color of the window. The RGB color stored in xyz of HPoint.
Definition: HIOManager.h:904
bool m_bPrcRemoveAttributes
Definition: HIOManager.h:1141
bool UseWindowColor() const
If set to true, the background color of the view is used.
Definition: HIOManager.h:909
bool m_bIgnoreOffEntities
Definition: HIOManager.h:464
struct vhash_s * output_handlers
A hash of HOutputHandlers.
Definition: HIOManager.h:1480
HInputHandlerOptions()
Definition: HIOManager.h:251
float m_fAnnotRight
Definition: HIOManager.h:1126
bool m_bActivateOnPageOpen
Definition: HIOManager.h:1120
int m_Version
The file format version desired for writing.
Definition: HIOManager.h:1037
Medium compression, medium accurracy.
Definition: HIOManager.h:821
bool m_bOOCAutoUpdate
OOC import option: Determines whether or not the view for the OOC model should automatically update w...
Definition: HIOManager.h:578
bool m_bDwgSkipUnreferencedBlocks
Definition: HIOManager.h:560
void WindowWidth(float const f)
Width for output sizing in inches.
Definition: HIOManager.h:918
unsigned long GetOutputOps()
Definition: HIOManager.h:1201
void UseWindowColor(bool const tf)
If set to true, the background color of the view is used.
Definition: HIOManager.h:911
void * m_pPRCAsmModelFile
PRC import option: Returned to user. Contains Pointer to A3DAsmModelFile entity.
Definition: HIOManager.h:491
HPrcBrepCompression m_ePrcBrepCompression
Definition: HIOManager.h:1135
double m_coneFactor
Definition: HIOManager.h:469
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:1053
bool m_bPrcCompressTessellation
Definition: HIOManager.h:1151
No compression.
Definition: HIOManager.h:819
unsigned long GetInputOps()
Definition: HIOManager.h:611
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:542
HBaseView *const View() const
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:867
HCamera *const Camera() const
A pointer to the HCamera object for this output.
Definition: HIOManager.h:881
void SetInputOps(unsigned long ops)
This sets the HInputOp.
Definition: HIOManager.h:762
bool FastPrint() const
This option has been deprecated. Specifies printing method.
Definition: HIOManager.h:964
struct vlist_s * loaded_output_handlers
A list of dynamically loaded HOutputHandlers libraries.
Definition: HIOManager.h:1495
void PaperDpi(int const dpi)
Indicates the DPI used for paper. This is set from the options dialog.
Definition: HIOManager.h:1005
HStreamFileToolkit * m_tk
The streamfile toolkit to be used.
Definition: HIOManager.h:446
struct vlist_s * owned_input_handlers
A list of default HInputHandlers created by the manager.
Definition: HIOManager.h:1486
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:458
void SetOutputOps(unsigned long ops)
This sets the HOutputOp.
Definition: HIOManager.h:1343
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:888
HBaseModel *const Model() const
A pointer to the HBaseModel object for this output.
Definition: HIOManager.h:874
float const WindowWidth() const
Width for output sizing in inches.
Definition: HIOManager.h:916
bool UseSubscreen() const
Determines if HOOPS is calculating a subscreen to match the output to the size of the view window...
Definition: HIOManager.h:989
int m_iDGNCellHeaderOption
DGN file import option: has three option about how cell header should be imported.
Definition: HIOManager.h:477
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:1498
HIOConnector * m_pPRCPMIConnector
PRC import option: Pointer to connector class. If not null prc PMI entities will be associated to HOO...
Definition: HIOManager.h:497
void WindowHeight(float const f)
Height for output sizing in inches.
Definition: HIOManager.h:925
HOutputHandlerOptions(HOutputHandlerOptions const *o)
Definition: HIOManager.h:845
float const WindowHeight() const
Height for output sizing in inches.
Definition: HIOManager.h:923
bool m_bPRCMergeFaces
PRC import option: If true individual faces will be merged into one shell.
Definition: HIOManager.h:501
HBaseView * m_pHBaseView
A pointer to the HBaseView object for this input.
Definition: HIOManager.h:434
bool m_bImportThumbnail
DWF file import option: if true then Thumbnail are imported in the DWF file.
Definition: HIOManager.h:536
void View(HBaseView *const v)
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:869
Specifies using the view determined by the camera in the scene segment.
Definition: HIOManager.h:238
size_t LineFuseThreshold() const
Definition: HIOManager.h:954
bool m_bLocal
The value is true if the image will have the local attribute.
Definition: HIOManager.h:443
bool WindowFrame() const
Determines if a window frame is drawn or not.
Definition: HIOManager.h:982