HBaseModel.h
1 // Copyright (c) Tech Soft 3D, Inc.
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 
10 #ifndef _HBASEMODEL_H
11 #define _HBASEMODEL_H
12 
13 #ifdef H_PACK_8
14 #pragma pack(push)
15 #pragma pack(8)
16 #endif
17 
18 #include "HTools.h"
19 
20 
21 class HDB;
22 class HBaseView;
23 class HModelInfo;
24 class HStreamFileToolkit;
25 class HShellVertexData;
27 class HEventManager;
31 class HBhvSegmentTracker;
32 #ifndef SWIG
33 class TK_Dispatch_XML;
34 #endif
35 
37 
47 class MVO_API HBaseModel
48 {
49 
50 public:
51 
53  HBaseModel(char const * model = 0);
54 
56  virtual ~HBaseModel();
57 
59  virtual void Init();
60 
62  virtual void Flush();
63 
65  bool GetFileLoadComplete() const {return m_bFileLoadComplete;};
67  void SetFileLoadComplete(bool value, HBaseView * pHView=0);
68 
70  bool GetObjectCheck() const {return m_bObjectCheck;};
72  void SetObjectCheck(bool value) {m_bObjectCheck=value;};
73 
75  void SetStaticModel(bool value);
77  bool GetStaticModel() const;
79  bool GetStaticModelOn() const;
80 
82  void SetLMVModel(bool value);
84  bool GetLMVModel() const;
85 
87  bool GetFirstFitComplete() const {return m_bFirstFitComplete;};
89  void SetFirstFitComplete(bool value) {m_bFirstFitComplete=value;};
90 
92  bool GetContainsDouble() const { return m_containsDouble; }
94  void SetContainsDouble(bool value) { m_containsDouble = value; }
95 
96 
97 
110  virtual HFileInputResult Read(const __wchar_t * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0);
111 #ifdef H_USHORT_OVERLOAD
112  virtual HFileInputResult Read(const unsigned short * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0){
113  H_UTF16 utf16;
114  utf16.encodedText((utf16_char*)FileName);
115  return Read((__wchar_t*)H_WCS(utf16).encodedText(), pHView, clean_include, options);
116  }
117 #endif
118  virtual HFileInputResult Read(const char * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0){
119  return Read((__wchar_t*)H_WCS(FileName).encodedText(), pHView, clean_include, options);
120  }
121 
132  virtual HFileOutputResult WriteWithOptions(const __wchar_t * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0);
133 #ifdef H_USHORT_OVERLOAD
134  virtual HFileOutputResult WriteWithOptions(const unsigned short * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0){
135  return WriteWithOptions((__wchar_t*)H_WCS(FileName).encodedText(), pHView, options);
136  }
137 #endif
138  virtual HFileOutputResult WriteWithOptions(const char * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0){
139  return WriteWithOptions((__wchar_t*)H_WCS(FileName).encodedText(), pHView, options);
140  }
141 
154  virtual HFileOutputResult Write(const __wchar_t * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
155 #ifdef H_USHORT_OVERLOAD
156  virtual HFileOutputResult Write(const unsigned short * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
157  return Write((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
158  }
159 #endif
160  virtual HFileOutputResult Write(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
161  return Write((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
162  }
163 
165  HModelInfo * GetHModelInfo() const;
166 
168  virtual HStreamFileToolkit *GetStreamFileTK() const { return m_pHFile; }
169 
171  virtual HC_KEY GetModelKey() const { return m_ModelKey; }
172 
174  virtual HC_KEY GetModelIncludeKey() const { return m_ModelIncludeKey; }
175 
177  virtual HC_KEY GetBBoxKey() const { return m_BBoxKey; }
178 
185  virtual bool IsBRepGeometry() const {return m_bBRepGeometry;};
187  virtual void SetBRepGeometry(bool brep){m_bBRepGeometry = brep;};
188 
190  virtual bool IsFEAGeometry() const {return m_bFEAGeometry;};
192  virtual void SetFEAGeometry(bool fea){m_bFEAGeometry = fea;};
193 
195  virtual bool IsVectorGeometry() const {return m_bVectorGeometry;};
197  virtual void SetVectorGeometry(bool vector){m_bVectorGeometry = vector;};
198 
200  virtual void CleanIncludes();
201 
203  virtual void DeleteIncludedSegments();
204 
206  virtual HBhvBehaviorManager * GetBhvBehaviorManager();
207 
209  void SetBhvBehaviorManager( HBhvBehaviorManager* BehaviorManager );
210 
212  HEventManager *GetEventManager();
213 
218  void Update(bool antialias = false, bool forceUpdate = false);
219 
220  void MakeAnimationSnapshot(int tick);
221  virtual HFileOutputResult WriteWithAnimation(const __wchar_t * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
222 #ifdef H_USHORT_OVERLOAD
223  virtual HFileOutputResult WriteWithAnimation(const unsigned short * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
224  return WriteWithAnimation((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
225  }
226 #endif
227  virtual HFileOutputResult WriteWithAnimation(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
228  return WriteWithAnimation((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
229  }
230 
231  virtual void CreateIncludeSegment();
232 
234  TK_Dispatch_XML * GetDispatchXML();
235 
236 protected:
237 
238  HC_KEY m_ModelKey;
240  HC_KEY m_BBoxKey;
244  HStreamFileToolkit * m_pHFile;
245 
248 
257 
260 
261 
265 
268 
271 
274 
275 #ifndef SWIG
276 
278 #endif
279 
280  HBhvKeyframeGenerator *m_pKeyframeGenerator;
281  HBhvSegmentTracker *m_pSegmentTracker;
282 };
283 
284 
285 #ifdef H_PACK_8
286 #pragma pack(pop)
287 #endif
288 
289 #endif
void SetFirstFitComplete(bool value)
Definition: HBaseModel.h:89
HC_KEY m_ModelIncludeKey
Definition: HBaseModel.h:239
void SetObjectCheck(bool value)
Definition: HBaseModel.h:72
Definition: HBhvUtility.h:1058
virtual HC_KEY GetModelKey() const
Definition: HBaseModel.h:171
Definition: HBhvUtility.h:1070
bool GetFileLoadComplete() const
Definition: HBaseModel.h:65
The HBhvBehaviorManager class stores and manages all animation related data.
Definition: HBhvBehaviorManager.h:237
bool m_containsDouble
Definition: HBaseModel.h:267
bool GetFirstFitComplete() const
Definition: HBaseModel.h:87
virtual bool IsBRepGeometry() const
Definition: HBaseModel.h:185
The TK_Dispatch_XML class stores a list of XML Handlers.
Definition: HDispatchXML.h:29
bool m_bBRepGeometry
Definition: HBaseModel.h:249
HEventManager * m_pEventManager
Definition: HBaseModel.h:273
virtual HC_KEY GetBBoxKey() const
Definition: HBaseModel.h:177
The HModelInfo class computes and stores model information.
Definition: HModelInfo.h:26
The HEventManager class dispatches arbitrary events.
Definition: HEventManager.h:44
TK_Dispatch_XML * m_pDispatchXML
Definition: HBaseModel.h:277
bool m_bNeedsStencilBuffer
Definition: HBaseModel.h:252
virtual void SetVectorGeometry(bool vector)
Definition: HBaseModel.h:197
virtual HC_KEY GetModelIncludeKey() const
Definition: HBaseModel.h:174
virtual bool IsFEAGeometry() const
Definition: HBaseModel.h:190
bool GetContainsDouble() const
Definition: HBaseModel.h:92
The HDB class serves as a wrapper/utility class to manage an instance of the HOOPS/3dGS scene-graph...
Definition: HDB.h:32
The HShellVertexData class encapsulates colormap index information associated with the vertices of a ...
Definition: HUtility.h:616
virtual bool IsVectorGeometry() const
Definition: HBaseModel.h:195
void SetContainsDouble(bool value)
Definition: HBaseModel.h:94
The HBaseModel class is used to store and manage model information.
Definition: HBaseModel.h:47
Definition: HIOManager.h:892
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:332
virtual void SetBRepGeometry(bool brep)
Definition: HBaseModel.h:187
HStreamFileToolkit * m_pHFile
Definition: HBaseModel.h:244
virtual void SetFEAGeometry(bool fea)
Definition: HBaseModel.h:192
Definition: HIOManager.h:246
HBhvBehaviorManager * m_pBhvBehaviorManager
Definition: HBaseModel.h:270
HModelInfo * m_pModelInfo
Definition: HBaseModel.h:247
bool m_bVectorGeometry
Definition: HBaseModel.h:251
virtual HStreamFileToolkit * GetStreamFileTK() const
Definition: HBaseModel.h:168
HC_KEY m_BBoxKey
Definition: HBaseModel.h:240
bool m_bFirstFitComplete
Definition: HBaseModel.h:264
bool GetObjectCheck() const
Definition: HBaseModel.h:70
bool m_bFileLoadComplete
Definition: HBaseModel.h:256
HC_KEY m_ModelKey
Definition: HBaseModel.h:238
bool m_bObjectCheck
Definition: HBaseModel.h:259
bool m_bFEAGeometry
Definition: HBaseModel.h:250