Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HMarkupManager.h
1 //
2 // Copyright (c) 2000 by Tech Soft 3D, LLC.
3 // The information contained herein is confidential and proprietary to
4 // Tech Soft 3D, LLC., and considered a trade secret as defined under
5 // civil and criminal statutes. Tech Soft 3D shall pursue its civil
6 // and criminal remedies in the event of unauthorized use or misappropriation
7 // of its trade secrets. Use of this information by anyone other than
8 // authorized employees of Tech Soft 3D, LLC. is granted only under a
9 // written non-disclosure agreement, expressly prescribing the scope and
10 // manner of such use.
11 //
12 // $Id: fb842bbd1d561a43c2da8ce75e469b8602aea4d3 $
13 //
14 
15 
16 
17 #ifndef H_MARKUP_MANAGER_H
18 #define H_MARKUP_MANAGER_H
19 
20 #ifdef H_PACK_8
21 #pragma pack(push)
22 #pragma pack(8)
23 #endif
24 
25 #include "HTools.h"
26 #include "HUtility.h"
27 
28 
29 class HBaseView;
30 
35 class MVO_API HMarkupManager {
36 
37 public:
39  HMarkupManager(HBaseView *view);
40 
41 
44  void ReInit(HBaseView *view);
45 
46  virtual ~HMarkupManager();
47 
55  virtual HC_KEY OpenLayer(const char *layername, bool setcamera = true, bool emit_message = true);
56 
58  virtual HC_KEY RenameLayer(HC_KEY laykey, char const * new_name);
59 
61  virtual HC_KEY CopyLayer(HC_KEY laykey, char const * new_name);
62 
64  virtual bool GetCamera(HC_KEY layerkey, HCamera & cam) const;
65 
71  virtual HC_KEY OpenLayer(HC_KEY layerkey, bool setcamera = true);
72 
73 
78  virtual HC_KEY FindLayer(const char *layername) const;
79 
81  virtual char const * GetLayerNames(void) const;
82 
83 
86  virtual HC_KEY GetCurrentLayerKey() const;
87 
90  virtual char const * GetCurrentLayerName() const;
91 
92 
98  virtual void DisableCurrentLayer(bool emit_message = true);
99 
100 
106  virtual void DeleteLayer(const char *layername);
107 
112  virtual void DeleteLayer(HC_KEY layerkey);
113 
114 
118  void SetDefaultLayerKey(HC_KEY layerkey) {m_DefaultLayerKey = layerkey; }
119 
123  HC_KEY GetDefaultLayerKey() {return m_DefaultLayerKey; }
124 
128  HC_KEY GetMarkupKey() {return m_MarkupKey; }
129 
133  HC_KEY GetMarkupLayerKey() {return m_MarkupLayerKey; }
134 
137  virtual float GetMarkupWeight(){return m_fMarkupWeight;};
138 
144  virtual void SetMarkupWeight(float weight);
145 
149  virtual void GetMarkupColor(HPoint &markup_color){markup_color.Set(m_MarkupColor);};
150 
156  virtual void SetMarkupColor(HPoint markup_color);
157 
158 // HNet Work
159 
164  virtual void EmitMarkupSegment(HC_KEY key);
165 
172  virtual void InsertMarkupSegmentFromMessage(const char *in_data, unsigned int data_length);
173 
176  virtual void EmitDisableCurrentMarkupLayer();
177 
183  virtual void DisableCurrentMarkupLayerFromMessage(const char *data, unsigned int data_length);
184 
187  virtual void EmitSetMarkupLayer(const char *layer);
188 
194  virtual void SetMarkupLayerFromMessage(const char *data, unsigned int data_length);
195 
197  virtual bool GetPreviewImage(char const *, int*, int*, int*, unsigned char const**);
198 
199 
200  virtual void UpdatePreviewImage(bool forceUpdate = false);
201  bool IsCameraLayer(HC_KEY layerkey);
202 
203  /*
204  get and apply condition on model segments
205  */
206  void SetLayerCondition(HC_KEY layerkey);
207  /*
208  reset conditions applied on model segments
209  */
210  void UnsetCurrentLayerCondition();
211 
212  void UnsetLayerCondition(HC_KEY layerkey);
213 
214  void SetGeneratePreviewImage(bool onoff) {m_bGeneratePreviewImage = onoff; }
215  bool GetGeneratePreviewImage() { return m_bGeneratePreviewImage; }
216 
217  void SetNoResetOnCameraChange();
218  bool GetResetOnCameraChange(HC_KEY layerkey);
219 
220 
221 protected:
224  virtual void SetupNewLayer();
230  virtual void OpenLayerInternal(HC_KEY layerkey, bool setcamera);
235  virtual char *FindValidLayerName(char *newlayername);
238  mutable char * m_ActiveLayerName;
244  mutable char * m_allNames;
245  bool m_bGeneratePreviewImage;
246 };
247 
248 
249 #ifdef H_PACK_8
250 #pragma pack(pop)
251 #endif
252 
253 #endif
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
float m_fMarkupWeight
Weight of markup geometry.
Definition: HMarkupManager.h:243
HC_KEY GetMarkupKey()
Definition: HMarkupManager.h:128
Definition: HMarkupManager.h:35
#define HC_KEY
The HCamera class is the data type of a HOOPS Camera Attribute.
Definition: HUtility.h:543
virtual float GetMarkupWeight()
Definition: HMarkupManager.h:137
HC_KEY GetMarkupLayerKey()
Definition: HMarkupManager.h:133
void SetDefaultLayerKey(HC_KEY layerkey)
Definition: HMarkupManager.h:118
char * m_ActiveLayerName
Currently open lay name.
Definition: HMarkupManager.h:238
HC_KEY m_DefaultLayerKey
Default layer (gets used if no other layer is open)
Definition: HMarkupManager.h:239
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:126
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:337
HC_KEY GetDefaultLayerKey()
Definition: HMarkupManager.h:123
HC_KEY m_MarkupLayerKey
Key to parent segment of all layers.
Definition: HMarkupManager.h:241
HBaseView * m_pHView
A pointer to the view object.
Definition: HMarkupManager.h:236
HC_KEY m_ActiveLayerKey
Currently open markup layer.
Definition: HMarkupManager.h:237
HC_KEY m_MarkupKey
Key to the top level markup layer.
Definition: HMarkupManager.h:240
HPoint m_MarkupColor
Color of markup geometry.
Definition: HMarkupManager.h:242
void Set(float X, float Y, float Z=0.0f)
Definition: HGlobals.h:146
virtual void GetMarkupColor(HPoint &markup_color)
Definition: HMarkupManager.h:149