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 
00128     virtual HFileOutputResult WriteWithOptions(const __wchar_t * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0);
00129 #ifdef H_USHORT_OVERLOAD
00130     virtual HFileOutputResult WriteWithOptions(const unsigned short * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0){
00131         return WriteWithOptions((__wchar_t*)H_WCS(FileName).encodedText(), pHView, options);
00132     }
00133 #endif
00134     virtual HFileOutputResult WriteWithOptions(const char * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0){
00135         return WriteWithOptions((__wchar_t*)H_WCS(FileName).encodedText(), pHView, options);
00136     }
00137 
00150     virtual HFileOutputResult Write(const __wchar_t * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
00151 #ifdef H_USHORT_OVERLOAD
00152     virtual HFileOutputResult Write(const unsigned short * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
00153         return Write((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
00154     }
00155 #endif
00156     virtual HFileOutputResult Write(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
00157         return Write((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
00158     }
00159 
00161     HModelInfo * GetHModelInfo() const;
00162 
00164     virtual HStreamFileToolkit *GetStreamFileTK() const { return m_pHFile; }
00165 
00167     virtual HC_KEY  GetModelKey() const { return m_ModelKey; }
00168 
00170     virtual HC_KEY  GetModelIncludeKey() const { return m_ModelIncludeKey; }
00171 
00173     virtual HC_KEY  GetBBoxKey() const { return m_BBoxKey; }
00174 
00181     virtual bool    IsBRepGeometry() const {return m_bBRepGeometry;};
00183     virtual void    SetBRepGeometry(bool brep){m_bBRepGeometry = brep;};
00184 
00186     virtual bool    IsFEAGeometry() const {return m_bFEAGeometry;};
00188     virtual void    SetFEAGeometry(bool fea){m_bFEAGeometry = fea;};
00189 
00191     virtual bool    IsVectorGeometry() const {return m_bVectorGeometry;}; 
00193     virtual void    SetVectorGeometry(bool vector){m_bVectorGeometry = vector;};
00194 
00196     virtual void CleanIncludes();
00197 
00199     virtual void DeleteIncludedSegments();
00200 
00202     virtual HBhvBehaviorManager * GetBhvBehaviorManager();
00203 
00205     void    SetBhvBehaviorManager( HBhvBehaviorManager* BehaviorManager ); 
00206 
00208     HEventManager *GetEventManager();
00209 
00214     void Update(bool antialias = false, bool forceUpdate = false);
00215 
00216     void MakeAnimationSnapshot(int tick);
00217     virtual HFileOutputResult WriteWithAnimation(const __wchar_t * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
00218 #ifdef H_USHORT_OVERLOAD
00219     virtual HFileOutputResult WriteWithAnimation(const unsigned short * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
00220         return WriteWithAnimation((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
00221     }
00222 #endif
00223     virtual HFileOutputResult WriteWithAnimation(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
00224         return WriteWithAnimation((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
00225     }
00226 
00227     virtual void CreateIncludeSegment();
00228 
00230     TK_Dispatch_XML * GetDispatchXML();
00231 
00232 protected:
00233 
00234     HC_KEY      m_ModelKey;         
00235     HC_KEY      m_ModelIncludeKey;  
00236     HC_KEY      m_BBoxKey;          
00240     HStreamFileToolkit * m_pHFile;
00241 
00243     mutable HModelInfo * m_pModelInfo;
00244 
00245     bool m_bBRepGeometry;   
00246     bool m_bFEAGeometry;    
00247     bool m_bVectorGeometry; 
00248     bool m_bNeedsStencilBuffer;  
00252     bool m_bFileLoadComplete; 
00253     
00255     bool m_bObjectCheck;
00256 
00257 
00260     bool m_bFirstFitComplete; 
00261 
00263     HBhvBehaviorManager * m_pBhvBehaviorManager;
00264 
00266     HEventManager * m_pEventManager;
00267 
00268 #ifndef SWIG
00269 
00270     TK_Dispatch_XML *m_pDispatchXML;
00271 #endif
00272 
00273     HBhvKeyframeGenerator *m_pKeyframeGenerator;
00274     HBhvSegmentTracker *m_pSegmentTracker;
00275 };
00276 
00277 
00278 #ifdef H_PACK_8
00279 #pragma pack(pop)
00280 #endif
00281 
00282 #endif