Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HBaseModel.h
00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc.
00002 //
00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
00004 // and considered a trade secret as defined under civil and criminal statutes.
00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
00006 // unauthorized use or misappropriation of its trade secrets.  Use of this information
00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
00009 
00010 #ifndef _HBASEMODEL_H
00011 #define _HBASEMODEL_H
00012 
00013 #ifdef H_PACK_8
00014 #pragma pack(push)
00015 #pragma pack(8)
00016 #endif
00017 
00018 #include "HTools.h"
00019 
00020 
00021 class HDB;
00022 class HBaseView;
00023 class HModelInfo;
00024 class HStreamFileToolkit;
00025 class HShellVertexData;
00026 class HBhvBehaviorManager;
00027 class HEventManager;
00028 class HOutputHandlerOptions;
00029 class HInputHandlerOptions;
00030 class HBhvKeyframeGenerator;
00031 class HBhvSegmentTracker;
00032 #ifndef SWIG
00033 class TK_Dispatch_XML;
00034 #endif
00035 
00037 
00047 class MVO_API HBaseModel
00048 {
00049  
00050 public:
00051 
00053     HBaseModel(char const * model = 0);                                     
00054     
00056     virtual ~HBaseModel();
00057 
00059     virtual void Init();    
00060 
00062     virtual void Flush();
00063 
00065     bool GetFileLoadComplete() const {return m_bFileLoadComplete;};
00067     void SetFileLoadComplete(bool value, HBaseView * pHView=0);
00068 
00070     bool GetObjectCheck() const {return m_bObjectCheck;};
00072     void SetObjectCheck(bool value) {m_bObjectCheck=value;};
00073 
00075     void SetStaticModel(bool value);
00077     bool GetStaticModel() const;
00079     bool GetStaticModelOn() const;
00080 
00082     void SetLMVModel(bool value);
00084     bool GetLMVModel() const;
00085 
00087     bool GetFirstFitComplete() const {return m_bFirstFitComplete;};
00089     void SetFirstFitComplete(bool value) {m_bFirstFitComplete=value;};
00090 
00091 
00092 
00093 
00106     virtual HFileInputResult Read(const __wchar_t * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0);
00107 #ifdef H_USHORT_OVERLOAD
00108     virtual HFileInputResult Read(const unsigned short * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0){
00109         H_UTF16 utf16;
00110         utf16.encodedText((utf16_char*)FileName);
00111         return Read((__wchar_t*)H_WCS(utf16).encodedText(), pHView, clean_include, options);
00112     }
00113 #endif
00114     virtual HFileInputResult Read(const char * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0){
00115         return Read((__wchar_t*)H_WCS(FileName).encodedText(), pHView, clean_include, options);
00116     }
00117 
00129     virtual HFileOutputResult WriteWithOptions(const __wchar_t * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0);
00130 #ifdef H_USHORT_OVERLOAD
00131     virtual HFileOutputResult WriteWithOptions(const unsigned short * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0){
00132         return WriteWithOptions((__wchar_t*)H_WCS(FileName).encodedText(), pHView, options);
00133     }
00134 #endif
00135     virtual HFileOutputResult WriteWithOptions(const char * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0){
00136         return WriteWithOptions((__wchar_t*)H_WCS(FileName).encodedText(), pHView, options);
00137     }
00138 
00152     virtual HFileOutputResult Write(const __wchar_t * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
00153 #ifdef H_USHORT_OVERLOAD
00154     virtual HFileOutputResult Write(const unsigned short * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
00155         return Write((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
00156     }
00157 #endif
00158     virtual HFileOutputResult Write(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
00159         return Write((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
00160     }
00161 
00163     HModelInfo * GetHModelInfo() const;
00164 
00166     virtual HStreamFileToolkit *GetStreamFileTK() const { return m_pHFile; }
00167 
00169     virtual HC_KEY  GetModelKey() const { return m_ModelKey; }
00170 
00172     virtual HC_KEY  GetModelIncludeKey() const { return m_ModelIncludeKey; }
00173 
00175     virtual HC_KEY  GetBBoxKey() const { return m_BBoxKey; }
00176 
00183     virtual bool    IsBRepGeometry() const {return m_bBRepGeometry;};
00185     virtual void    SetBRepGeometry(bool brep){m_bBRepGeometry = brep;};
00186 
00188     virtual bool    IsFEAGeometry() const {return m_bFEAGeometry;};
00190     virtual void    SetFEAGeometry(bool fea){m_bFEAGeometry = fea;};
00191 
00193     virtual bool    IsVectorGeometry() const {return m_bVectorGeometry;}; 
00195     virtual void    SetVectorGeometry(bool vector){m_bVectorGeometry = vector;};
00196 
00198     virtual void CleanIncludes();
00199 
00201     virtual void DeleteIncludedSegments();
00202 
00204     virtual HBhvBehaviorManager * GetBhvBehaviorManager();
00205 
00207     void    SetBhvBehaviorManager( HBhvBehaviorManager* BehaviorManager ); 
00208 
00210     HEventManager *GetEventManager();
00211 
00216     void Update(bool antialias = false, bool forceUpdate = false);
00217 
00218     void MakeAnimationSnapshot(int tick);
00219     virtual HFileOutputResult WriteWithAnimation(const __wchar_t * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
00220 #ifdef H_USHORT_OVERLOAD
00221     virtual HFileOutputResult WriteWithAnimation(const unsigned short * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
00222         return WriteWithAnimation((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
00223     }
00224 #endif
00225     virtual HFileOutputResult WriteWithAnimation(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
00226         return WriteWithAnimation((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
00227     }
00228 
00229     virtual void CreateIncludeSegment();
00230 
00232     TK_Dispatch_XML * GetDispatchXML();
00233 
00234 protected:
00235 
00236     HC_KEY      m_ModelKey;         
00237     HC_KEY      m_ModelIncludeKey;  
00238     HC_KEY      m_BBoxKey;          
00242     HStreamFileToolkit * m_pHFile;
00243 
00245     mutable HModelInfo * m_pModelInfo;
00246 
00247     bool m_bBRepGeometry;   
00248     bool m_bFEAGeometry;    
00249     bool m_bVectorGeometry; 
00250     bool m_bNeedsStencilBuffer;  
00254     bool m_bFileLoadComplete; 
00255     
00257     bool m_bObjectCheck;
00258 
00259 
00262     bool m_bFirstFitComplete; 
00263 
00265     HBhvBehaviorManager * m_pBhvBehaviorManager;
00266 
00268     HEventManager * m_pEventManager;
00269 
00270 #ifndef SWIG
00271 
00272     TK_Dispatch_XML *m_pDispatchXML;
00273 #endif
00274 
00275     HBhvKeyframeGenerator *m_pKeyframeGenerator;
00276     HBhvSegmentTracker *m_pSegmentTracker;
00277 };
00278 
00279 
00280 #ifdef H_PACK_8
00281 #pragma pack(pop)
00282 #endif
00283 
00284 #endif