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 
296  // DWF import options
297  m_bDisableDWFDrawOrder = false;
298  m_bDWFRebaselineModel = true;
299  m_bImportThumbnail = false;
300 
301  //SKP optimization option
302  m_bOptimizeSegmentTree = false;
303  m_license = 0;
304 
305  m_pOOCNodeDeltas = 0;
306  m_bOOCAutoUpdate = true;
307  m_bOOCAutoCleanup = true;
308  }
309 
313  m_z_separation = o->m_z_separation;
314  m_depth_range = o->m_depth_range;
315  m_pHBaseView = o->m_pHBaseView;
316  m_pImageName = o->m_pImageName;
317  m_pImageFormat = o->m_pImageFormat;
318  m_pConnector = o->m_pConnector;
319  m_pExtendedData = o->m_pExtendedData;
320  m_bLocal = o->m_bLocal;
321 
322  m_license = o->m_license;
323 
324  //DWG/DGN/SKP option
325  m_bIgnoreOffEntities = o->m_bIgnoreOffEntities;
326 
327  //DWG/SKP option
328  m_bImportMetadata = o->m_bImportMetadata;
329 
330 
331  //DWG Options
332  m_bLegacyOptimize = o->m_bLegacyOptimize;
333  m_bDwgSkipUnreferencedBlocks = o->m_bDwgSkipUnreferencedBlocks;
334 
335  //DGN Options
336  m_iDGNCellHeaderOption = o->m_iDGNCellHeaderOption;
337  m_bDGNRebaselineModel = o->m_bDGNRebaselineModel;
338  m_coneFactor = o->m_coneFactor;
339  m_factorForSmartSolids = o->m_factorForSmartSolids;
340  m_bDGNImportAllModels = o->m_bDGNImportAllModels;
341 
342  // PRC options
343  m_pPRCPMIConnector = o->m_pPRCPMIConnector;
344  m_pPRCTopologyManager = o->m_pPRCTopologyManager;
345  m_bPRCMergeFaces = o->m_bPRCMergeFaces;
346  m_bPRCImportNonBrepFaces = o->m_bPRCImportNonBrepFaces;
347 
348  m_bPRCCreatePRCFileOnly = o->m_bPRCCreatePRCFileOnly;
349  m_bPRCInstanceShells = o->m_bPRCInstanceShells;
350  m_bPRCCalculatePhysicalProperties = o->m_bPRCCalculatePhysicalProperties;
351  m_pPRCMultiModelSelectionCallback = o->m_pPRCMultiModelSelectionCallback;
352  m_pPRCAsmModelFile = o->m_pPRCAsmModelFile;
353  m_pPRCDeleteModelFile = o->m_pPRCDeleteModelFile;
354  m_pPRCDeleteModelCallback = o->m_pPRCDeleteModelCallback;
355  m_bPRCImportHiddenObjects = o->m_bPRCImportHiddenObjects;
356 
357 
358  // DWF import options
359  m_bDisableDWFDrawOrder = o->m_bDisableDWFDrawOrder;
360  m_bDWFRebaselineModel = o->m_bDWFRebaselineModel;
361  m_bImportThumbnail = o->m_bImportThumbnail;
362 
363 
364  //SKP import option
365  m_bOptimizeSegmentTree = o->m_bOptimizeSegmentTree;
366 
367  m_pOOCNodeDeltas = o->m_pOOCNodeDeltas;
368  m_bOOCAutoUpdate = o->m_bOOCAutoUpdate;
369  m_bOOCAutoCleanup = o->m_bOOCAutoCleanup;
370  }
371 
375  m_z_separation = o.m_z_separation;
376  m_depth_range = o.m_depth_range;
377  m_pHBaseView = o.m_pHBaseView;
378  m_pImageName = o.m_pImageName;
379  m_pImageFormat = o.m_pImageFormat;
380  m_pConnector = o.m_pConnector;
381  m_pExtendedData = o.m_pExtendedData;
382  m_bLocal = o.m_bLocal;
383 
384  //DWG/DGN/SKP option
385  m_bIgnoreOffEntities = o.m_bIgnoreOffEntities;
386 
387  //DWG/SKP option
388  m_bImportMetadata = o.m_bImportMetadata;
389 
390  //DWG options
391  m_bLegacyOptimize = o.m_bLegacyOptimize;
392  m_bDwgSkipUnreferencedBlocks = o.m_bDwgSkipUnreferencedBlocks;
393 
394  //DGN options
395  m_iDGNCellHeaderOption = o.m_iDGNCellHeaderOption;
396  m_bDGNRebaselineModel = o.m_bDGNRebaselineModel;
397  m_coneFactor = o.m_coneFactor;
398  m_factorForSmartSolids = o.m_factorForSmartSolids;
399  m_bDGNImportAllModels = o.m_bDGNImportAllModels;
400 
401  // PRC options
402  m_pPRCPMIConnector = o.m_pPRCPMIConnector;
403  m_pPRCTopologyManager = o.m_pPRCTopologyManager;
404  m_bPRCMergeFaces = o.m_bPRCMergeFaces;
405  m_bPRCImportNonBrepFaces = o.m_bPRCImportNonBrepFaces;
406  m_bPRCCreatePRCFileOnly = o.m_bPRCCreatePRCFileOnly;
407  m_bPRCInstanceShells = o.m_bPRCInstanceShells;
408  m_bPRCCalculatePhysicalProperties = o.m_bPRCCalculatePhysicalProperties;
409  m_pPRCMultiModelSelectionCallback = o.m_pPRCMultiModelSelectionCallback;
410  m_pPRCAsmModelFile = o.m_pPRCAsmModelFile;
411  m_pPRCDeleteModelFile = o.m_pPRCDeleteModelFile;
412  m_bPRCImportHiddenObjects = o.m_bPRCImportHiddenObjects;
413 
414  // DWF import options
415  m_bDisableDWFDrawOrder = o.m_bDisableDWFDrawOrder;
416  m_bDWFRebaselineModel = o.m_bDWFRebaselineModel;
417  m_bImportThumbnail = o.m_bImportThumbnail;
418 
419 
420  //SKP import option
421  m_bOptimizeSegmentTree = o.m_bOptimizeSegmentTree;
422 
423  m_pOOCNodeDeltas = o.m_pOOCNodeDeltas;
424  m_bOOCAutoUpdate = o.m_bOOCAutoUpdate;
425  m_bOOCAutoCleanup = o.m_bOOCAutoCleanup;
426  }
427 
428  virtual ~HInputHandlerOptions();
429 
432 
434  const char * m_pImageName;
435 
437  const char * m_pImageFormat;
438 
440  bool m_bLocal;
441 
443  HStreamFileToolkit * m_tk;
444 
447 
450 
453 
456 
458  const char *m_license;
459 
462 
466  double m_coneFactor;
467 
472 
475 
476 
477 
481  enum {
484  OPT_CELLHEADER
485  };
486 
489 
492 
499  bool m_bPRCImportNonBrepFaces;
500 
503  bool m_bPRCInstanceShells;
504 
505  bool m_bPRCCalculatePhysicalProperties;
507  void (*m_pPRCMultiModelSelectionCallback) (char const * in_container, int in_num_configs, char const * in_configs[],
508  int & out_config_selection);
512  void (*m_pPRCDeleteModelCallback) ( void*& pPRCAsmModelFile);
515 
518 
521 
522  // DWF import options
528 
531 
534 
537 
545 
555 
556  /*
557  For 2D files (DWF only as of this time), the drawing can be layered either by using depth range or by offsetting
558  the z values. To separate the layers by z value, make sure z > 0. To use depth range, make sure depth range > 0.
559  */
560  double m_z_separation;
561 
567 
570 
573 
576 };
577 
578 
579 
581 
587 class MVO_API HInputHandler
588 {
589 
590 public:
598  HInputHandler();
599  virtual ~HInputHandler();
600 
605  unsigned long GetInputOps() {return m_InputOps;};
606 
607 
610  virtual const char * GetInputName() = 0;
611 
612 
619  virtual void RegisterInputHandlerTypes() = 0;
620 
627  virtual HInputHandlerStyle GetInputStyle() = 0;
628 
636  virtual HFileInputResult FileInputByKey(const char * filename, HC_KEY key, HInputHandlerOptions * options);
637  virtual HFileInputResult FileInputByKey(const __wchar_t * filename, HC_KEY key, HInputHandlerOptions * options);
638 
639 
648  virtual HFileInputResult FileInputByKey(const unsigned short * filename, HC_KEY key, HInputHandlerOptions * options);
649 
660  virtual HFileInputResult FileInputToImageKey(const char * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
661  virtual HFileInputResult FileInputToImageKey(const __wchar_t * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
662 
663 
673  virtual HFileInputResult FileInputToImageKey(const unsigned short * filename, HC_KEY * image_key, HC_KEY segment_key, HInputHandlerOptions * options);
674 
687  virtual const char * GetInputTypesString() = 0;
688 
692  const __wchar_t * GetInputProgress();
693 
697  float GetInputPercentProgress();
698 
702  const __wchar_t * GetInputInformation();
703 
710  HIONoticeCallback * SetInputProgressNoticeCallback(HIONoticeCallback *notice_callback);
711 
712 
719  HIOPercentNoticeCallback * SetInputPercentProgressNoticeCallback(HIOPercentNoticeCallback *percent_notice_callback);
720 
727  HIONoticeCallback * SetInputInformationNoticeCallback(HIONoticeCallback *notice_callback);
728 
730  void ReportInputProgress(const char * progress);
731  void ReportInputProgress(const __wchar_t * progress);
732 
734  void ReportInputPercentProgress(float percent_progress);
735 
737  void ReportInputInformation(const char * information);
738  void ReportInputInformation(const __wchar_t * information);
739 
740  void SetModuleDirectory(const char *module_directory);
741  void SetModuleDirectory(const __wchar_t *module_directory);
742 protected:
743 
747  void SetStartingInput(const char *filename);
748  void SetStartingInput(const __wchar_t *filename = 0);
749 
753  void SetFinishedInput();
754 
756  void SetInputOps(unsigned long ops) {m_InputOps=ops;};
757 
759  unsigned long m_InputOps;
760 
761  __wchar_t *m_module_directory;
762 
763 private:
764 
765  __wchar_t *m_progress;
766  float m_percent_progress1;
767  float m_percent_progress2;
768  __wchar_t *m_information;
769  struct vlist_s *m_information_list;
770  HIONoticeCallback *m_progress_callback;
771  HIONoticeCallback *m_information_callback;
772  HIOPercentNoticeCallback *m_percent_progress_callback;
773 };
774 
779 {
780  HOutputHandlerStyleModel,
785 };
786 
793 class MVO_API ExportNameMap
794 {
795 private:
796  void * _imp;
797 public:
798  ExportNameMap();
799  ~ExportNameMap();
800 
801  H_FORMAT_TEXT lookup(HC_KEY) const;
802  void tag(HC_KEY, H_FORMAT_TEXT const &);
803 };
804 
817 };
818 
824 class MVO_API HOutputHandlerOptions
825 {
826 public:
829 
830  virtual char const * GetType() const;
831 
834  virtual bool PopulateOptions();
835 
840  Init(o);
841  };
842 
847  Init(&o);
848  };
849 
850 
851  virtual ~HOutputHandlerOptions();
852 
856  void Init(HOutputHandlerOptions const *o);
857 
861  HBaseView * const View() const {return m_pHBaseView;};
863  void View(HBaseView * const v) {m_pHBaseView = v;};
864 
866  HBaseModel * m_pHBaseModel;
868  HBaseModel * const Model() const {return m_pHBaseModel;};
870  void Model(HBaseModel * const m) {m_pHBaseModel = m;};
871 
873  HCamera * m_pCamera;
875  HCamera * const Camera() const {return m_pCamera;};
877  void Camera(HCamera * const c) {m_pCamera = c;};
878 
880  HC_KEY m_Key;
882  HC_KEY const Key() const {return m_Key;};
884  void Key(HC_KEY const k) {m_Key = k;};
885 
887  char const * m_pHSRAOptions;
889  char const * const HSRAOptions() const {return m_pHSRAOptions;};
891  void HSRAOptions(char const * const tf) {m_pHSRAOptions = tf;};
892 
894  HPoint const * m_pWindowColor;
896  HPoint const * const WindowColor() const {return m_pWindowColor;};
898  void WindowColor(HPoint const * const tf) {m_pWindowColor = tf;};
899 
901  bool m_bUseWindowColor;
903  bool UseWindowColor() const {return m_bUseWindowColor;};
905  void UseWindowColor(bool const tf) {m_bUseWindowColor = tf;};
906 
908  float m_Window_Width;
910  float const WindowWidth() const {return m_Window_Width;};
912  void WindowWidth(float const f) {m_Window_Width = f;};
913 
915  float m_Window_Height;
917  float const WindowHeight() const {return m_Window_Height;};
919  void WindowHeight(float const f) {m_Window_Height = f;};
920 
922  float m_Paper_Width;
924  float const PaperWidth() const {return m_Paper_Width;};
926  void PaperWidth(float const f) {m_Paper_Width = f;};
927 
929  float m_Paper_Height;
931  float const PaperHeight() const {return m_Paper_Height;};
933  void PaperHeight(float const f) {m_Paper_Height = f;};
934 
936  bool m_ForceGrayscale;
938  bool ForceGrayscale() const {return m_ForceGrayscale;};
940  void ForceGrayscale(bool const tf) {m_ForceGrayscale = tf;};
941 
943  size_t m_lineFuseThreshold;
944 
948  size_t LineFuseThreshold() const {return m_lineFuseThreshold;};
949 
953  void LineFuseThreshold(size_t const tf) {m_lineFuseThreshold = tf;};
954 
956  bool m_bFastPrint;
958  bool FastPrint() const {return m_bFastPrint;};
960  void FastPrint(bool const tf) {m_bFastPrint = tf;};
961 
963  bool m_bConserveMemory;
965  bool ConserveMemory() const {return m_bConserveMemory;};
967  void ConserveMemory(bool const tf) {m_bConserveMemory = tf;};
968 
969  bool m_bWriteAnimations;
970  bool WriteAnimations() const {return m_bWriteAnimations;};
971  void WriteAnimations(bool const tf) {m_bWriteAnimations = tf;};
972 
974  bool m_bWindowFrame;
976  bool WindowFrame() const {return m_bWindowFrame;};
978  void WindowFrame(bool const tf) {m_bWindowFrame = tf;};
979 
981  bool m_bUseSubscreen;
983  bool UseSubscreen() const {return m_bUseSubscreen;};
985  void UseSubscreen(bool const tf) {m_bUseSubscreen = tf;};
986 
988  int m_Image_Dpi;
990  int const ImageDpi() const {return m_Image_Dpi;};
992  void ImageDpi(int const dpi) {m_Image_Dpi = dpi;};
993 
995  int m_Paper_Dpi;
997  int const PaperDpi() const {return m_Paper_Dpi;};
999  void PaperDpi(int const dpi) {m_Paper_Dpi = dpi;};
1000 
1002  void * m_pExtendedData;
1003  void * const ExtendedData() const {return m_pExtendedData;};
1004  void ExtendedData(void * const vp) {m_pExtendedData = vp;};
1005  void ExtendedData(HPDFOptions * const vp) {m_pExtendedData = (void*)vp;};
1006 
1007  bool ActivateOnPageOpen() const {return m_bActivateOnPageOpen;};
1008  void ActivateOnPageOpen(bool onoff) {m_bActivateOnPageOpen = onoff;};
1009  float const AnnotLeft() const {return m_fAnnotLeft;};
1010  void AnnotLeft(float f) {m_fAnnotLeft = f;};
1011  float const AnnotRight() const {return m_fAnnotRight;};
1012  void AnnotRight(float f) {m_fAnnotRight = f;};
1013  float const AnnotBottom() const {return m_fAnnotBottom;};
1014  void AnnotBottom(float f) {m_fAnnotBottom = f;};
1015  float const AnnotTop() const {return m_fAnnotTop;};
1016  void AnnotTop(float f) {m_fAnnotTop = f;};
1017 
1018 
1020  const char *m_license;
1021 
1022  int m_antialiasLevel;
1023  int m_jpeg_quality;
1024  unsigned char* m_imageOutputBuffer;
1025  size_t m_imageOutputBufferSize;
1026 
1027 
1028 
1029 
1032  int const Version() const {return m_Version;};
1033  void Version(int const v) {m_Version = v;};
1034 
1036  H_OUTPUT_TYPE m_OutputType;
1038  H_OUTPUT_TYPE OutputType() const {return m_OutputType;};
1040  void OutputType(H_OUTPUT_TYPE ot) {m_OutputType = ot;};
1041 
1043  bool m_b3dOutput;
1045  bool Output3d() const {return m_b3dOutput;};
1047  void Output3d(bool const tf) {m_b3dOutput = tf;};
1048 
1050  bool m_bAscii;
1052  bool Ascii() const {return m_bAscii;};
1054  void Ascii(bool const tf) {m_bAscii = tf;};
1055 
1057  bool m_bStlNormals;
1059  bool StlNormals() const {return m_bStlNormals;};
1061  void StlNormals(bool const tf) {m_bStlNormals = tf;};
1062 
1064  double m_ratio_cm_to_internal_units;
1065 
1069  double PrintToScale() const {return m_ratio_cm_to_internal_units;};
1070 
1086  void PrintToScale(double const r) {m_ratio_cm_to_internal_units = r;};
1087 
1094  float m_PageMargins[4];
1095 
1098 
1100  char const* m_pDWFModelName;
1101 
1106 
1109 
1112 
1115 
1118 
1121 
1124 
1127 
1130 
1133 
1136 
1139 
1141  MVO_POINTER_SIZED_INT m_iPrcNameUserDataIndex;
1142 
1143 
1146 
1149 
1158  char m_bAVICodec[4];
1159 
1162 };
1163 
1164 
1166 
1172 class MVO_API HOutputHandler
1173 {
1174 
1175 public:
1183  HOutputHandler();
1184  virtual ~HOutputHandler();
1185 
1186 
1189  virtual const char * GetOutputName() = 0;
1190 
1195  unsigned long GetOutputOps() {return m_OutputOps;};
1196 
1207  virtual void RegisterOutputHandlerTypes() = 0;
1208 
1209 
1217  virtual HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options);
1218  virtual HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
1219 
1227  virtual HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options);
1228 
1229 
1238  virtual HFileOutputResult FileOutputFromImageKey(const char * filename, HC_KEY image_key, HOutputHandlerOptions * options);
1239  virtual HFileOutputResult FileOutputFromImageKey(const __wchar_t * filename, HC_KEY image_key, HOutputHandlerOptions * options);
1240 
1251  virtual const char * GetOutputTypesString() = 0;
1252 
1261  virtual HOutputHandlerStyle GetOutputStyle() = 0;
1262 
1269  virtual const char * GetOutputDefaultHSRA();
1270 
1274  const char * GetOutputProgress();
1275 
1279  float GetOutputPercentProgress();
1280 
1284  const __wchar_t * GetOutputInformation();
1285 
1292  HIONoticeCallback * SetOutputProgressNoticeCallback(HIONoticeCallback *notice_callback);
1293 
1294 
1301  HIOPercentNoticeCallback * SetOutputPercentProgressNoticeCallback(HIOPercentNoticeCallback *percent_notice_callback);
1302 
1309  HIONoticeCallback * SetOutputInformationNoticeCallback(HIONoticeCallback *notice_callback);
1310 
1312  void ReportOutputProgress(const char * progress);
1313 
1315  void ReportOutputPercentProgress(float percent_progress);
1316 
1318  void ReportOutputInformation(const char * information);
1319 
1320 
1321  void SetModuleDirectory(const char *module_directory);
1322  void SetModuleDirectory(const __wchar_t *module_directory);
1323 
1324 protected:
1325 
1329  void SetStartingOutput();
1330 
1334  void SetFinishedOutput();
1335 
1337  void SetOutputOps(unsigned long ops) {m_OutputOps=ops;};
1339  unsigned long m_OutputOps;
1340 
1341  char *m_module_directory;
1342 private:
1343 
1344  char *m_progress;
1345  float m_percent_progress1;
1346  float m_percent_progress2;
1347  __wchar_t *m_information;
1348  struct vlist_s *m_information_list;
1349  HIONoticeCallback *m_progress_callback;
1350  HIOPercentNoticeCallback *m_percent_progress_callback;
1351  HIONoticeCallback *m_information_callback;
1352 };
1353 
1359 class MVO_API HIOManager
1360 {
1361 
1362 public:
1363 
1364  HIOManager();
1365  virtual ~HIOManager();
1366 
1376  virtual HInputHandler * RegisterInputHandler(const char * file_type, HInputHandler * handler);
1377 
1386  virtual HOutputHandler * RegisterOutputHandler(const char * file_type, HOutputHandler * handler);
1387 
1398  virtual HIOConnector * RegisterConnector(const char * file_type, HIO_CREATE_FREE_FUNCTION Create, HIO_FREE_CONNECTOR_FUNCTION Free);
1399 
1404  virtual HInputHandler * GetInputHandler(const char * file_type);
1405  HInputHandler * GetInputHandler(const __wchar_t * file_type);
1406 #ifdef _MSC_VER
1407  HInputHandler * GetInputHandler(const unsigned short * file_type);
1408 #endif
1409 
1414  virtual HOutputHandler * GetOutputHandler(const char * file_type);
1415  virtual HOutputHandler * GetOutputHandler(const __wchar_t * file_type);
1416 
1421  virtual void RegisterHandlers();
1422 
1427  virtual const char * GetInputHandlerTypes();
1428 
1433  virtual const char * GetOutputHandlerTypes();
1434 
1435 
1442  virtual HIOConnector * CreateConnector(const char * file_type);
1443 
1448  virtual void FreeConnector(HIOConnector * old_connector);
1449 
1450 
1455  static HIOManager *GetCurrentHIOManager();
1456 
1462  static void GetFileOutputResultString(HFileOutputResult result, char *result_str);
1463 
1464 private:
1465  void RecordOutputHandler (HOutputHandler * handler);
1466  void RecordInputHandler (HInputHandler * handler);
1467 
1468 protected:
1469 
1471  struct vhash_s * input_handlers;
1472 
1474  struct vhash_s * output_handlers;
1475 
1477  struct vhash_s * connector_procs;
1478 
1480  struct vlist_s * owned_input_handlers;
1481 
1483  struct vlist_s * owned_output_handlers;
1484 
1486  struct vlist_s * loaded_input_handlers;
1487 
1489  struct vlist_s * loaded_output_handlers;
1490 
1492  struct vhash_s * created_connectors;
1493 
1494  char * m_input_types;
1495  int m_input_types_allocated;
1496 
1497  char * m_output_types;
1498  int m_output_types_allocated;
1499 };
1500 
1501 #ifdef H_PACK_8
1502 #pragma pack(pop)
1503 #endif
1504 
1505 #endif
1506 
Definition: HIOManager.h:1359
HBaseView * m_pHBaseView
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:859
double PrintToScale() const
Definition: HIOManager.h:1069
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:507
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:517
Definition: HIOManager.h:793
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:978
void HSRAOptions(char const *const tf)
HOOPS HSRAOption string .
Definition: HIOManager.h:891
bool m_pPRCDeleteModelFile
PRC import option: If true model file is deleted after loading is complete.
Definition: HIOManager.h:491
float const PaperHeight() const
Height for output sizing in inches.
Definition: HIOManager.h:931
ExportNameMap m_names
Definition: HIOManager.h:1108
void PrintToScale(double const r)
Definition: HIOManager.h:1086
bool m_bPRCImportHiddenObjects
PRC import option: If true, hidden objects will be imported though not visible. If false...
Definition: HIOManager.h:514
Specifies an HInputHandler for model data.
Definition: HIOManager.h:226
char const * m_pPDFResourceDirectory
Definition: HIOManager.h:1105
struct vlist_s * owned_output_handlers
A list of default HOutputHandlers created by the manager.
Definition: HIOManager.h:1483
bool m_bLogging
If true, logging will be enabled in those plugins that support it.
Definition: HIOManager.h:446
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:889
Low compression, high accurracy.
Definition: HIOManager.h:814
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:1061
float m_fAnnotLeft
Definition: HIOManager.h:1117
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:533
Definition: HUtility.h:2332
bool m_bPrcUseNameUserData
Definition: HIOManager.h:1138
MVO_POINTER_SIZED_INT m_iPrcNameUserDataIndex
Definition: HIOManager.h:1141
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:458
Specifies an HOutputHandler for geometry data.
Definition: HIOManager.h:781
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:434
bool m_bLegacyOptimize
Definition: HIOManager.h:544
Definition: HIOManager.h:148
HInputHandler an abstract base class for model and image input.
Definition: HIOManager.h:587
bool m_bAVIShowCompressionDialog
Definition: HIOManager.h:1148
The HCamera class is the data type of a HOOPS Camera Attribute.
Definition: HUtility.h:537
bool m_bPrcRemoveBRep
Definition: HIOManager.h:1132
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:520
BREP_Topology * m_pPRCTopologyManager
PRC import option: Pointer to connector class. If not null prc topology entities will be associated t...
Definition: HIOManager.h:496
void * m_pOOCNodeDeltas
OOC import option: Pointer to node deltas. If not null, importer will use it to selectively reject po...
Definition: HIOManager.h:569
Specifies an HOutputHandler for a hardcopy output type.
Definition: HIOManager.h:783
HIOConnector * m_pConnector
A pointer to HIOConnector object. The connectivity between HOOPS and kernel will be stored in this...
Definition: HIOManager.h:449
HBhvBehaviorManager * m_pBehaviorManager
A pointer to the behavior manager.
Definition: HIOManager.h:1097
HOutputHandlerStyle
Definition: HIOManager.h:778
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:965
Definition: HIOManager.h:122
bool ForceGrayscale() const
Specifies black and white output.
Definition: HIOManager.h:938
HPrcBrepCompression
Definition: HIOManager.h:812
void PaperWidth(float const f)
Width for output sizing in inches.
Definition: HIOManager.h:926
bool m_bOOCAutoCleanup
OOC import option: Determines whether or not the view for the OOC model should automatically cleanup ...
Definition: HIOManager.h:575
void ConserveMemory(bool const tf)
This option has been deprecated and has no effect.
Definition: HIOManager.h:967
void(* m_pPRCDeleteModelCallback)(void *&pPRCAsmModelFile)
PRC import option: Function pointer to delete model.
Definition: HIOManager.h:512
Specifies an HOutputHandler for an image.
Definition: HIOManager.h:782
#define HC_KEY
struct vhash_s * input_handlers
A hash of HInputHandlers.
Definition: HIOManager.h:1471
HOutputHandler an abstract base class for model and image output.
Definition: HIOManager.h:1172
float const PaperWidth() const
Width for output sizing in inches.
Definition: HIOManager.h:924
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:784
double m_depth_range
Definition: HIOManager.h:566
void OutputType(H_OUTPUT_TYPE ot)
The output type.
Definition: HIOManager.h:1040
indicates that cell header entity will be imported as single segment
Definition: HIOManager.h:482
const char * m_pImageFormat
The HOOPS image format to use for loading an image if not using filename .ext for format...
Definition: HIOManager.h:437
void PaperHeight(float const f)
Height for output sizing in inches.
Definition: HIOManager.h:933
indicates that cell header will have as many segments as its childs
Definition: HIOManager.h:483
struct vhash_s * connector_procs
A hash of HIOConnector Create/Free functions.
Definition: HIOManager.h:1477
void * m_pExtendedData
A pointer to extra data needed by a HInputHandler subclass.
Definition: HIOManager.h:452
bool Ascii() const
Some file formats, support binary and ascii such as STL. Set this to true for ascii output...
Definition: HIOManager.h:1052
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:1045
bool m_bDisableDWFDrawOrder
Definition: HIOManager.h:527
bool StlNormals() const
Determines if we generate and output face normals when writing to STL file format.
Definition: HIOManager.h:1059
HOutputHandlerOptions(const HOutputHandlerOptions &o)
Definition: HIOManager.h:846
double m_factorForSmartSolids
Definition: HIOManager.h:471
bool m_bPRCStoreUserAttributes
PRC import option: If true all prc user attributes will be converted as user option.
Definition: HIOManager.h:510
float m_fAnnotBottom
Definition: HIOManager.h:1123
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:985
void * m_pPRCAsmModelFile
Definition: HIOManager.h:1111
int const ImageDpi() const
Indicates the DPI used for images. This is calculated with info from HC_Show_Device_Info.
Definition: HIOManager.h:990
High compression, low accurracy.
Definition: HIOManager.h:816
float m_fAnnotTop
Definition: HIOManager.h:1126
char const * m_pDWFModelName
Definition: HIOManager.h:1100
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:502
HInputHandlerOptions(HInputHandlerOptions const *o)
Definition: HIOManager.h:312
HDwgViewVector
Definition: HIOManager.h:234
struct vlist_s * loaded_input_handlers
A list of dynamically loaded HInputHandlers libraries.
Definition: HIOManager.h:1486
void Model(HBaseModel *const m)
A pointer to the HBaseModel object for this output.
Definition: HIOManager.h:870
HPoint const *const WindowColor() const
Set the color of the window. The RGB color stored in xyz of HPoint.
Definition: HIOManager.h:896
HInputHandlerOptions(const HInputHandlerOptions &o)
Definition: HIOManager.h:374
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:1038
bool m_bExporting2DDwf
Definition: HIOManager.h:1161
Definition: HIOManager.h:824
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:997
void WindowColor(HPoint const *const tf)
Set the color of the window. The RGB color stored in xyz of HPoint.
Definition: HIOManager.h:898
bool m_bPrcRemoveAttributes
Definition: HIOManager.h:1135
bool UseWindowColor() const
If set to true, the background color of the view is used.
Definition: HIOManager.h:903
bool m_bIgnoreOffEntities
Definition: HIOManager.h:461
struct vhash_s * output_handlers
A hash of HOutputHandlers.
Definition: HIOManager.h:1474
HInputHandlerOptions()
Definition: HIOManager.h:251
float m_fAnnotRight
Definition: HIOManager.h:1120
bool m_bActivateOnPageOpen
Definition: HIOManager.h:1114
int m_Version
The file format version desired for writing.
Definition: HIOManager.h:1031
Medium compression, medium accurracy.
Definition: HIOManager.h:815
bool m_bOOCAutoUpdate
OOC import option: Determines whether or not the view for the OOC model should automatically update w...
Definition: HIOManager.h:572
bool m_bDwgSkipUnreferencedBlocks
Definition: HIOManager.h:554
void WindowWidth(float const f)
Width for output sizing in inches.
Definition: HIOManager.h:912
unsigned long GetOutputOps()
Definition: HIOManager.h:1195
void UseWindowColor(bool const tf)
If set to true, the background color of the view is used.
Definition: HIOManager.h:905
void * m_pPRCAsmModelFile
PRC import option: Returned to user. Contains Pointer to A3DAsmModelFile entity.
Definition: HIOManager.h:488
HPrcBrepCompression m_ePrcBrepCompression
Definition: HIOManager.h:1129
double m_coneFactor
Definition: HIOManager.h:466
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:1047
bool m_bPrcCompressTessellation
Definition: HIOManager.h:1145
No compression.
Definition: HIOManager.h:813
unsigned long GetInputOps()
Definition: HIOManager.h:605
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:536
HBaseView *const View() const
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:861
HCamera *const Camera() const
A pointer to the HCamera object for this output.
Definition: HIOManager.h:875
void SetInputOps(unsigned long ops)
This sets the HInputOp.
Definition: HIOManager.h:756
bool FastPrint() const
This option has been deprecated. Specifies printing method.
Definition: HIOManager.h:958
struct vlist_s * loaded_output_handlers
A list of dynamically loaded HOutputHandlers libraries.
Definition: HIOManager.h:1489
void PaperDpi(int const dpi)
Indicates the DPI used for paper. This is set from the options dialog.
Definition: HIOManager.h:999
HStreamFileToolkit * m_tk
The streamfile toolkit to be used.
Definition: HIOManager.h:443
struct vlist_s * owned_input_handlers
A list of default HInputHandlers created by the manager.
Definition: HIOManager.h:1480
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:455
void SetOutputOps(unsigned long ops)
This sets the HOutputOp.
Definition: HIOManager.h:1337
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:882
HBaseModel *const Model() const
A pointer to the HBaseModel object for this output.
Definition: HIOManager.h:868
float const WindowWidth() const
Width for output sizing in inches.
Definition: HIOManager.h:910
bool UseSubscreen() const
Determines if HOOPS is calculating a subscreen to match the output to the size of the view window...
Definition: HIOManager.h:983
int m_iDGNCellHeaderOption
DGN file import option: has three option about how cell header should be imported.
Definition: HIOManager.h:474
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:1492
HIOConnector * m_pPRCPMIConnector
PRC import option: Pointer to connector class. If not null prc PMI entities will be associated to HOO...
Definition: HIOManager.h:494
void WindowHeight(float const f)
Height for output sizing in inches.
Definition: HIOManager.h:919
HOutputHandlerOptions(HOutputHandlerOptions const *o)
Definition: HIOManager.h:839
float const WindowHeight() const
Height for output sizing in inches.
Definition: HIOManager.h:917
bool m_bPRCMergeFaces
PRC import option: If true individual faces will be merged into one shell.
Definition: HIOManager.h:498
HBaseView * m_pHBaseView
A pointer to the HBaseView object for this input.
Definition: HIOManager.h:431
bool m_bImportThumbnail
DWF file import option: if true then Thumbnail are imported in the DWF file.
Definition: HIOManager.h:530
void View(HBaseView *const v)
A pointer to the HBaseView object for this output.
Definition: HIOManager.h:863
Specifies using the view determined by the camera in the scene segment.
Definition: HIOManager.h:238
size_t LineFuseThreshold() const
Definition: HIOManager.h:948
bool m_bLocal
The value is true if the image will have the local attribute.
Definition: HIOManager.h:440
bool WindowFrame() const
Determines if a window frame is drawn or not.
Definition: HIOManager.h:976