Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HBaseModel.h

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 // $Header: /files/homes/master/cvs/hoops_master/hoops_mvo/source/HBaseModel.h,v 1.108.2.1 2008-06-17 20:46:11 guido Exp $
00013 //
00014 
00015 #ifndef _H_BASEMODEL_H 
00016 #define _H_BASEMODEL_H
00017 
00018 #ifdef H_PACK_8
00019 #pragma pack(push)
00020 #pragma pack(8)
00021 #endif
00022 
00023 #include "HTools.h"
00024 
00025 
00026 
00027 class HDB;
00028 class HBaseView;
00029 class HModelInfo;
00030 class HStreamFileToolkit;
00031 class HShellVertexData;
00032 class HBhvBehaviorManager;
00033 class HEventManager;
00034 class HStencilProbe;
00035 class HOutputHandlerOptions;
00036 class HInputHandlerOptions;
00037 class HBhvKeyframeGenerator;
00038 class HBhvSegmentTracker;
00039 #ifndef SWIG
00040 class TK_Dispatch_XML;
00041 #endif
00042 
00044 
00054 class MVO_API HBaseModel
00055 {
00056  
00057 public:
00058 
00060     HBaseModel();                                       
00061     
00063     virtual ~HBaseModel();
00064 
00066     virtual void Init();    
00067 
00069     virtual void Flush();
00070 
00072     bool GetFileLoadComplete() {return m_bFileLoadComplete;};
00074     void SetFileLoadComplete(bool value, HBaseView * pHView=0);
00075 
00077     bool GetObjectCheck() {return m_bObjectCheck;};
00079     void SetObjectCheck(bool value) {m_bObjectCheck=value;};
00080 
00082     void SetStaticModel(bool value);
00084     bool GetStaticModel();
00085 
00087     bool GetFirstFitComplete() {return m_bFirstFitComplete;};
00089     void SetFirstFitComplete(bool value) {m_bFirstFitComplete=value;};
00090 
00091 
00092 
00093 
00106     virtual HFileInputResult Read(const char * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0);
00107 
00120     virtual HFileInputResult Read(const unsigned short * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0);
00121 
00132     virtual HFileOutputResult WriteWithOptions(const char * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0);
00133 
00145     virtual HFileOutputResult Write(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
00146 
00148     HModelInfo * GetHModelInfo();
00149 
00151     virtual HStreamFileToolkit *GetStreamFileTK() { return m_pHFile; }
00152 
00154     virtual HC_KEY  GetModelKey() { return m_ModelKey; }
00155 
00157     virtual HC_KEY  GetModelIncludeKey() { return m_ModelIncludeKey; }
00158 
00160     virtual HC_KEY  GetBBoxKey() { return m_BBoxKey; }
00161 
00168     virtual bool    IsBRepGeometry(){return m_bBRepGeometry;};
00170     virtual void    SetBRepGeometry(bool brep){m_bBRepGeometry = brep;};
00171 
00173     virtual bool    IsFEAGeometry(){return m_bFEAGeometry;};
00175     virtual void    SetFEAGeometry(bool fea){m_bFEAGeometry = fea;};
00176 
00178     virtual bool    IsVectorGeometry(){return m_bVectorGeometry;}; 
00180     virtual void    SetVectorGeometry(bool vector){m_bVectorGeometry = vector;};
00181 
00183     virtual void CleanIncludes();
00184 
00186     virtual void DeleteIncludedSegments();
00187 
00189     virtual HBhvBehaviorManager * GetBhvBehaviorManager();
00190 
00192     void    SetBhvBehaviorManager( HBhvBehaviorManager* BehaviorManager ); 
00193 
00195     HEventManager *GetEventManager();
00196 
00201     void Update(bool antialias = false, bool forceUpdate = false);
00202 
00204     bool NeedsStencilBuffer() { return m_bNeedsStencilBuffer; }
00205 
00207     void SetNeedsStencilBuffer() { m_bNeedsStencilBuffer = true; }
00208 
00209     void MakeAnimationSnapshot(int tick);
00210     virtual HFileOutputResult WriteWithAnimation(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
00211 
00212 #ifndef SWIG
00213 
00214     TK_Dispatch_XML * GetDispatchXML();
00215 #endif
00216 
00217 protected:
00218 
00219     virtual void CreateIncludeSegment();
00220 
00221 
00222     static unsigned long m_ModelCount;      
00224     HC_KEY      m_ModelKey;         
00225     HC_KEY      m_ModelIncludeKey;  
00226     HC_KEY      m_BBoxKey;          
00230     HStreamFileToolkit * m_pHFile;
00231 
00233     HModelInfo * m_pModelInfo;
00234 
00235     bool m_bBRepGeometry;   
00236     bool m_bFEAGeometry;    
00237     bool m_bVectorGeometry; 
00238     bool m_bNeedsStencilBuffer;  
00242     bool m_bFileLoadComplete; 
00243     
00245     bool m_bObjectCheck;
00246 
00247 
00250     bool m_bFirstFitComplete; 
00251 
00253     HBhvBehaviorManager * m_pBhvBehaviorManager;
00254 
00256     HEventManager * m_pEventManager;
00257 
00258 #ifndef SWIG
00259 
00260     TK_Dispatch_XML *m_pDispatchXML;
00261 #endif
00262 
00263     HBhvKeyframeGenerator *m_pKeyframeGenerator;
00264     HBhvSegmentTracker *m_pSegmentTracker;
00265 };
00266 
00267 
00268 #ifdef H_PACK_8
00269 #pragma pack(pop)
00270 #endif
00271 
00272 #endif
00273 
00274 
00275 
00276 
00277 
00278 
00279 
00280 
00281 
00282 
00283 
00284 
00285