Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

HBaseModel.h
1 // Copyright (c) Tech Soft 3D
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 
91 
92 
93 
106  virtual HFileInputResult Read(const __wchar_t * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0);
107 #ifdef H_USHORT_OVERLOAD
108  virtual HFileInputResult Read(const unsigned short * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0){
109  H_UTF16 utf16;
110  utf16.encodedText((utf16_char*)FileName);
111  return Read((__wchar_t*)H_WCS(utf16).encodedText(), pHView, clean_include, options);
112  }
113 #endif
114  virtual HFileInputResult Read(const char * FileName, HBaseView * pHView=0, bool clean_include=true, HInputHandlerOptions * options = 0){
115  return Read((__wchar_t*)H_WCS(FileName).encodedText(), pHView, clean_include, options);
116  }
117 
128  virtual HFileOutputResult WriteWithOptions(const __wchar_t * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0);
129 #ifdef H_USHORT_OVERLOAD
130  virtual HFileOutputResult WriteWithOptions(const unsigned short * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0){
131  return WriteWithOptions((__wchar_t*)H_WCS(FileName).encodedText(), pHView, options);
132  }
133 #endif
134  virtual HFileOutputResult WriteWithOptions(const char * FileName, HBaseView * pHView=0, HOutputHandlerOptions * options = 0){
135  return WriteWithOptions((__wchar_t*)H_WCS(FileName).encodedText(), pHView, options);
136  }
137 
150  virtual HFileOutputResult Write(const __wchar_t * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
151 #ifdef H_USHORT_OVERLOAD
152  virtual HFileOutputResult Write(const unsigned short * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
153  return Write((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
154  }
155 #endif
156  virtual HFileOutputResult Write(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
157  return Write((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
158  }
159 
161  HModelInfo * GetHModelInfo() const;
162 
164  virtual HStreamFileToolkit *GetStreamFileTK() const { return m_pHFile; }
165 
167  virtual HC_KEY GetModelKey() const { return m_ModelKey; }
168 
170  virtual HC_KEY GetModelIncludeKey() const { return m_ModelIncludeKey; }
171 
173  virtual HC_KEY GetBBoxKey() const { return m_BBoxKey; }
174 
181  virtual bool IsBRepGeometry() const {return m_bBRepGeometry;};
183  virtual void SetBRepGeometry(bool brep){m_bBRepGeometry = brep;};
184 
186  virtual bool IsFEAGeometry() const {return m_bFEAGeometry;};
188  virtual void SetFEAGeometry(bool fea){m_bFEAGeometry = fea;};
189 
191  virtual bool IsVectorGeometry() const {return m_bVectorGeometry;};
193  virtual void SetVectorGeometry(bool vector){m_bVectorGeometry = vector;};
194 
196  virtual void CleanIncludes();
197 
199  virtual void DeleteIncludedSegments();
200 
202  virtual HBhvBehaviorManager * GetBhvBehaviorManager();
203 
205  void SetBhvBehaviorManager( HBhvBehaviorManager* BehaviorManager );
206 
208  HEventManager *GetEventManager();
209 
214  void Update(bool antialias = false, bool forceUpdate = false);
215 
216  void MakeAnimationSnapshot(int tick);
217  virtual HFileOutputResult WriteWithAnimation(const __wchar_t * FileName, HBaseView * pHView=0, float width = 0, float height = 0);
218 #ifdef H_USHORT_OVERLOAD
219  virtual HFileOutputResult WriteWithAnimation(const unsigned short * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
220  return WriteWithAnimation((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
221  }
222 #endif
223  virtual HFileOutputResult WriteWithAnimation(const char * FileName, HBaseView * pHView=0, float width = 0, float height = 0){
224  return WriteWithAnimation((__wchar_t*)H_WCS(FileName).encodedText(), pHView, width, height);
225  }
226 
227  virtual void CreateIncludeSegment();
228 
230  TK_Dispatch_XML * GetDispatchXML();
231 
232 protected:
233 
240  HStreamFileToolkit * m_pHFile;
241 
244 
253 
256 
257 
261 
264 
267 
268 #ifndef SWIG
269 
271 #endif
272 
273  HBhvKeyframeGenerator *m_pKeyframeGenerator;
274  HBhvSegmentTracker *m_pSegmentTracker;
275 };
276 
277 
278 #ifdef H_PACK_8
279 #pragma pack(pop)
280 #endif
281 
282 #endif
void SetFirstFitComplete(bool value)
Definition: HBaseModel.h:89
virtual HC_KEY GetBBoxKey() const
Definition: HBaseModel.h:173
HC_KEY m_ModelIncludeKey
Definition: HBaseModel.h:235
void SetObjectCheck(bool value)
Definition: HBaseModel.h:72
Definition: HBhvUtility.h:1058
Definition: HBhvUtility.h:1070
The HBhvBehaviorManager class stores and manages all animation related data.
Definition: HBhvBehaviorManager.h:237
bool GetFileLoadComplete() const
Definition: HBaseModel.h:65
The TK_Dispatch_XML class stores a list of XML Handlers.
Definition: HDispatchXML.h:29
bool GetFirstFitComplete() const
Definition: HBaseModel.h:87
#define HC_KEY
bool m_bBRepGeometry
Definition: HBaseModel.h:245
HEventManager * m_pEventManager
Definition: HBaseModel.h:266
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:270
bool m_bNeedsStencilBuffer
Definition: HBaseModel.h:248
virtual void SetVectorGeometry(bool vector)
Definition: HBaseModel.h:193
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:613
The HBaseModel class is used to store and manage model information.
Definition: HBaseModel.h:47
Definition: HIOManager.h:830
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:332
virtual void SetBRepGeometry(bool brep)
Definition: HBaseModel.h:183
virtual HStreamFileToolkit * GetStreamFileTK() const
Definition: HBaseModel.h:164
bool GetObjectCheck() const
Definition: HBaseModel.h:70
HStreamFileToolkit * m_pHFile
Definition: HBaseModel.h:240
virtual void SetFEAGeometry(bool fea)
Definition: HBaseModel.h:188
virtual bool IsVectorGeometry() const
Definition: HBaseModel.h:191
virtual HC_KEY GetModelKey() const
Definition: HBaseModel.h:167
Definition: HIOManager.h:246
HBhvBehaviorManager * m_pBhvBehaviorManager
Definition: HBaseModel.h:263
virtual bool IsBRepGeometry() const
Definition: HBaseModel.h:181
HModelInfo * m_pModelInfo
Definition: HBaseModel.h:243
bool m_bVectorGeometry
Definition: HBaseModel.h:247
HC_KEY m_BBoxKey
Definition: HBaseModel.h:236
bool m_bFirstFitComplete
Definition: HBaseModel.h:260
bool m_bFileLoadComplete
Definition: HBaseModel.h:252
HC_KEY m_ModelKey
Definition: HBaseModel.h:234
bool m_bObjectCheck
Definition: HBaseModel.h:255
bool m_bFEAGeometry
Definition: HBaseModel.h:246
virtual bool IsFEAGeometry() const
Definition: HBaseModel.h:186
virtual HC_KEY GetModelIncludeKey() const
Definition: HBaseModel.h:170