00001 // 00002 // Copyright (c) 2000 by Tech Soft 3D, LLC. 00003 // The information contained herein is confidential and proprietary to 00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under 00005 // civil and criminal statutes. Tech Soft 3D shall pursue its civil 00006 // and criminal remedies in the event of unauthorized use or misappropriation 00007 // of its trade secrets. Use of this information by anyone other than 00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a 00009 // written non-disclosure agreement, expressly prescribing the scope and 00010 // manner of such use. 00011 // 00012 // $Id$ 00013 // 00014 00015 #ifndef _HIOUTILITYPRC_H 00016 #define _HIOUTILITYPRC_H 00017 00018 00019 #ifdef H_PACK_8 00020 #pragma pack(push) 00021 #pragma pack(8) 00022 #endif 00023 00024 #include "HTools.h" 00025 #include "HIOManager.h" 00026 #include "varray.h" 00027 00028 00033 class MVO_API HIOUtilityPrc: public HInputHandler 00034 { 00035 00036 public: 00037 00039 HIOUtilityPrc() { 00040 SetInputOps(HInputOpFileInputByKey); 00041 }; 00042 virtual ~HIOUtilityPrc() {;}; 00043 00046 const char * GetOutputName() { return "HIOUtilityPrc"; } 00047 const char * GetInputName() { return "HIOUtilityPrc"; } 00048 00050 void RegisterInputHandlerTypes() { 00051 HIORegisterInputType("prc",this); 00052 HIORegisterInputType("u3d",this); 00053 }; 00054 00055 00057 const char * GetInputTypesString() {return "prc;u3d";}; 00058 00060 HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;}; 00061 00069 HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options); 00070 00071 HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){ 00072 return FileInputByKey(H_WCS(FileName).encodedText(), key, options); 00073 }; 00074 00075 HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){ 00076 H_UTF16 utf16; 00077 utf16.encodedText((utf16_char const*) FileName); 00078 return FileInputByKey(H_WCS(utf16).encodedText(), key, options); 00079 }; 00080 00081 00082 00083 private: 00084 00085 static struct prc_info 00086 { 00087 FILE *f; 00088 bool is_ascii; 00089 HC_KEY start_segment; 00090 HC_KEY copy_segment; 00091 int triangle_count; 00092 } prc_info_s; 00093 00094 static struct include_list 00095 { 00096 HC_KEY include; 00097 include_list *next; 00098 } include_list_s; 00099 00100 static HFileInputResult ReadPrcFile(const __wchar_t *FileName); 00101 /* 00102 static HFileOutputResult ComputeStlTriangles(HC_KEY the_key, stl_info *info, HOutputHandlerOptions *options, bool no_recurse=false, float *matrix_for_segment_reference=0 );*/ 00103 }; 00104 00105 00106 #ifdef H_PACK_8 00107 #pragma pack(pop) 00108 #endif 00109 00110 #endif