Alphabetical Class Index   Compound Members   File List  

Hoops3dStreamCtrl.h
1 // Copyright (c) 1998-2014 by 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 __Hoops3dStreamCTRL_H_
11 #define __Hoops3dStreamCTRL_H_
12 
13 #include "resource.h" // main symbols
14 #include <atlctl.h>
15 #include "Hoops3dStream.h"
16 #include "HUtility.h"
17 #include "HBaseView.h"
18 
19 #include "HStream.h"
20 #include "HOpcodeHandler.h"
21 #include "guidlist.h"
22 #include "Vector"
23 #include "Hoops3dStreamCtrlEvents.h"
24 using namespace std;
25 
26 class HBaseModel;
27 class HCtrlView;
28 class HCtrlDB;
29 class HBaseOperator;
30 class CDataLoader;
31 class HUtilityXMLTag;
32 
33 #define WM_XML_PARSING_COMPLETE WM_USER+0x100
34 
35 struct IWebBrowserApp;
36 
37 // msw driver options debug
38 #define DEBUG_NO_WINDOWS_HOOK 0x00000040
39 #define DEBUG_FORCE_FULL_COLOR 0x00000010
40 #define DEBUG_SFB_COPY_TO_CLIPBOARD 0x00004000
41 #define DEBUG_PRINTING_MODE 0x00040000
42 #define DEBUG_CLIPBOARD_MODE 0x00080000
43 #define DEBUG_PRINT_NOT_FRAMEBUFFER_MODE 0x00020000
44 #define DEBUG_PRINT_NOT_RASTER_REDUCTION 0x00200000
45 
46 #define NUM_MARKUP_LAYERS 5
47 
48 #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
49 #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
50 
51 // rendering options debug
52 #define DEBUG_NO_PAINTERS_PANELLING 0x00000008
53 
54 #define TOGGLE_OFF(x) if(uMsg == WM_PAINT) x=0;
55 
56 #define WMF 0
57 #define EMF 1
58 
59 
61 
68 class ATL_NO_VTABLE CHoops3dStreamCtrl :
69  public CComObjectRootEx<CComSingleThreadModel>,
70  public CStockPropImpl<CHoops3dStreamCtrl, IHoops3dStreamCtrl, &IID_IHoops3dStreamCtrl, &LIBID_Hoops3dStreamLib>,
71  public CComControl<CHoops3dStreamCtrl>,
72  public IPersistStreamInitImpl<CHoops3dStreamCtrl>,
73  public IOleControlImpl<CHoops3dStreamCtrl>,
74  public IOleObjectImpl<CHoops3dStreamCtrl>,
75  public IOleInPlaceActiveObjectImpl<CHoops3dStreamCtrl>,
76  public IViewObjectExImpl<CHoops3dStreamCtrl>,
77  public IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>,
78  public IConnectionPointContainerImpl<CHoops3dStreamCtrl>,
79  public IPersistStorageImpl<CHoops3dStreamCtrl>,
80  public ISpecifyPropertyPagesImpl<CHoops3dStreamCtrl>,
81  public IQuickActivateImpl<CHoops3dStreamCtrl>,
82  public IDataObjectImpl<CHoops3dStreamCtrl>,
83  public IProvideClassInfo2Impl<&CLSID_Hoops3dStreamCtrl, &DIID__IHoops3dStreamCtrlEvents, &LIBID_Hoops3dStreamLib>,
84  public IPropertyNotifySinkCP<CHoops3dStreamCtrl>,
85  public IPersistPropertyBagImpl<CHoops3dStreamCtrl>,
86  public CComCoClass<CHoops3dStreamCtrl, &CLSID_Hoops3dStreamCtrl>,
87  public CProxy_IHoops3dStreamCtrlEvents< CHoops3dStreamCtrl >
88 {
89 public:
90 
93 
94 
95 DECLARE_PROTECT_FINAL_CONSTRUCT()
96 
97 BEGIN_COM_MAP(CHoops3dStreamCtrl)
98  COM_INTERFACE_ENTRY(IHoops3dStreamCtrl)
99  COM_INTERFACE_ENTRY(IDispatch)
100  COM_INTERFACE_ENTRY(IViewObjectEx)
101  COM_INTERFACE_ENTRY(IViewObject2)
102  COM_INTERFACE_ENTRY(IViewObject)
103  COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)
104  COM_INTERFACE_ENTRY(IOleInPlaceObject)
105  COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless)
106  COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)
107  COM_INTERFACE_ENTRY(IOleControl)
108  COM_INTERFACE_ENTRY(IOleObject)
109  COM_INTERFACE_ENTRY(IPersistStreamInit)
110  COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)
111  COM_INTERFACE_ENTRY(IConnectionPointContainer)
112  COM_INTERFACE_ENTRY(ISpecifyPropertyPages)
113  COM_INTERFACE_ENTRY(IQuickActivate)
114  COM_INTERFACE_ENTRY(IPersistStorage)
115  COM_INTERFACE_ENTRY(IDataObject)
116  COM_INTERFACE_ENTRY(IProvideClassInfo)
117  COM_INTERFACE_ENTRY(IProvideClassInfo2)
118  COM_INTERFACE_ENTRY_IMPL(IPersistPropertyBag)
119  COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
120 END_COM_MAP()
121 
122 BEGIN_PROP_MAP(CHoops3dStreamCtrl)
123  PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
124  PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
125  PROP_ENTRY_TYPE("BackColor", DISPID_BACKCOLOR, CLSID_NULL, VT_COLOR)
126  PROP_ENTRY_TYPE("Filename",1, CLSID_Hoops3dStreamProperty, VT_BSTR)
127  PROP_ENTRY_TYPE("Antialiasing",68, CLSID_Hoops3dStreamProperty, VT_BOOL)
128  PROP_ENTRY_TYPE("FileType",33, CLSID_Hoops3dStreamProperty, VT_BSTR)
129  PROP_ENTRY_TYPE("AllowMenu",69, CLSID_Hoops3dStreamProperty, VT_BOOL)
130  PROP_ENTRY_TYPE("HardwareAntialiasing",73, CLSID_Hoops3dStreamProperty, VT_BOOL)
131  PROP_ENTRY_TYPE("AxisMode",74, CLSID_Hoops3dStreamProperty, VT_BOOL)
132  PROP_ENTRY_TYPE("AllowEntitySelection",110, CLSID_Hoops3dStreamProperty, VT_BOOL)
133  PROP_ENTRY_TYPE("BhvContinuousPlay",112, CLSID_Hoops3dStreamProperty, VT_BOOL)
134  PROP_ENTRY_TYPE("ConfigFile",129, CLSID_Hoops3dStreamProperty, VT_BSTR)
135  PROP_ENTRY_TYPE("DefaultConfigFile",146, CLSID_Hoops3dStreamProperty, VT_BSTR)
136  PROP_ENTRY_TYPE("Key",138, CLSID_Hoops3dStreamProperty, VT_INT)
137  PROP_ENTRY_TYPE("String1",139, CLSID_Hoops3dStreamProperty, VT_BSTR)
138  PROP_ENTRY_TYPE("String2",140, CLSID_Hoops3dStreamProperty, VT_BSTR)
139  PROP_ENTRY_TYPE("String3",141, CLSID_Hoops3dStreamProperty, VT_BSTR)
140  PROP_ENTRY_TYPE("Int1",142, CLSID_Hoops3dStreamProperty, VT_INT)
141  PROP_ENTRY_TYPE("SegmentDL",132, CLSID_Hoops3dStreamProperty, VT_BOOL)
142  PROP_ENTRY_TYPE("DriverType",145, CLSID_Hoops3dStreamProperty, VT_BSTR)
143  PROP_ENTRY_TYPE("TransparencyOptions",152, CLSID_Hoops3dStreamProperty, VT_BSTR)
144  PROP_ENTRY_TYPE("AntialiasingLevel",148, CLSID_Hoops3dStreamProperty, VT_INT)
145  PROP_ENTRY_TYPE("CullingThreshold",149, CLSID_Hoops3dStreamProperty, VT_INT)
146  PROP_ENTRY_TYPE("MaximumThreshold",151, CLSID_Hoops3dStreamProperty, VT_INT)
147  PROP_ENTRY_TYPE("FrameRate",150, CLSID_Hoops3dStreamProperty, VT_DECIMAL)
148  PROP_ENTRY_TYPE("FramerateType",144, CLSID_Hoops3dStreamProperty, VT_BSTR)
149  PROP_ENTRY_TYPE("StaticModel",147, CLSID_Hoops3dStreamProperty, VT_BOOL)
150  PROP_ENTRY_TYPE("AntialiasingLevel",148, CLSID_Hoops3dStreamProperty, VT_INT)
151  PROP_PAGE(CLSID_Hoops3dStreamProperty)
152 END_PROP_MAP()
153 
154 BEGIN_CONNECTION_POINT_MAP(CHoops3dStreamCtrl)
155  CONNECTION_POINT_ENTRY(IID_IPropertyNotifySink)
156  CONNECTION_POINT_ENTRY(DIID__IHoops3dStreamCtrlEvents)
157 END_CONNECTION_POINT_MAP()
158 
159 BEGIN_MSG_MAP(CHoops3dStreamCtrl)
160  /*if we are drawing to screen, disable print flag (only for WM_PAINT messages!)
161  *the CHoops3dStreamCtrl::OnDraw() function will turn the flag back on
162  */
163  TOGGLE_OFF(m_iPrintFlag);
164  COMMAND_ID_HANDLER(ID_TOOLS_OPTIMIZEMODEL, OnToolsOptimizemodel)
165  COMMAND_ID_HANDLER(ID_TOOLS_SAVEAS, OnToolsSaveas)
166  CHAIN_MSG_MAP(CComControl<CHoops3dStreamCtrl>)
167  DEFAULT_REFLECTION_HANDLER()
168  MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
169  MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClk)
170  MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUP)
171  MESSAGE_HANDLER(WM_LBUTTONUP, OnRButtonUP)
172  MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
173  MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate)
174  MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown)
175  MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel)
176  MESSAGE_HANDLER(WM_INPUTLANGCHANGE, OnInputLangChange)
177  MESSAGE_HANDLER(WM_INPUTLANGCHANGEREQUEST, OnInputLangChangeRequest)
178  COMMAND_ID_HANDLER(ID_FILEOPEN,OnFileOpen)
179  COMMAND_ID_HANDLER(ID_ORBIT,OnOrbit)
180  COMMAND_ID_HANDLER(ID_WINDOW_COLOR,OnWindowColor)
181  COMMAND_ID_HANDLER(ID_ZOOM_DIRECT,OnZoom)
182  COMMAND_ID_HANDLER(ID_PAN,OnPan)
183  COMMAND_ID_HANDLER(ID_RESET,OnReset)
184  COMMAND_ID_HANDLER(ID_ZOOM_WINDOW,OnZoomWindow)
185  COMMAND_ID_HANDLER(ID_TOOLS_SMOOTHTRANSITION,OnSmoothTransition)
186  COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_TEXT,OnToolsVisibilityText)
187  COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_LINES,OnToolsVisibilityLines)
188  COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_FACES,OnToolsVisibilityFaces)
189  COMMAND_ID_HANDLER(ID_ANNOTATE,OnAnnotate)
190  COMMAND_ID_HANDLER(ID_ADDNOTE,OnAddNote)
191  COMMAND_ID_HANDLER(ID_TOOLS_REDLINE,OnRedline)
192  COMMAND_ID_HANDLER(ID_SMOOTH_SHADED,OnSmoothShaded)
193  COMMAND_ID_HANDLER(ID_FLAT_SHADED,OnFlatShaded)
194  COMMAND_ID_HANDLER(ID_WIREFRAME,OnWireframe)
195  COMMAND_ID_HANDLER(ID_HIDDEN_LINE,OnHiddenLine)
196  COMMAND_ID_HANDLER(ID_SHADOW_SMOOTH,OnShadowSmooth)
197  COMMAND_ID_HANDLER(ID_PRINT,OnPrint)
198  COMMAND_ID_HANDLER(ID_COPY,OnCopy)
199  COMMAND_ID_HANDLER(ID_ABOUT_BOX,OnAboutBox)
200 
201  COMMAND_ID_HANDLER(ID_BHV_PLAY,OnBhvPlay)
202  COMMAND_ID_HANDLER(ID_BHV_PAUSE,OnBhvPause)
203  COMMAND_ID_HANDLER(ID_BHV_REWIND,OnBhvRewind)
204 
205  MESSAGE_HANDLER(WM_TIMER, OnTimer)
206  MESSAGE_HANDLER(WM_KEYUP, OnKeyUp)
207  MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
208  MESSAGE_HANDLER(WM_EXITMENULOOP, OnExitMenuLoop)
209  MESSAGE_HANDLER(WM_CHAR, OnChar)
210  MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
211  MESSAGE_HANDLER(WM_XML_PARSING_COMPLETE, OnXMLParsingComplete)
212 
213 END_MSG_MAP()
214 
215 BEGIN_CATEGORY_MAP(CHoops3dStreamCtrl)
216  IMPLEMENTED_CATEGORY(CATID_SafeForScripting)
217  IMPLEMENTED_CATEGORY(CATID_SafeForInitializing)
218 END_CATEGORY_MAP()
219 
220 
221 
222 // IHoops3dStreamCtr
223 
224 
225  /* Insert Functions */
226 
227  /* A wrapper for HOOPS/3dGS ::Insert_Circle */
228  STDMETHOD(HATL_Insert_Circle)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float p3_x, float p3_y, float p3_z, /*[out, retval]*/HC_KEY *retkey);
229 
230  /* A wrapper for HOOPS/3dGS ::Insert_Circle_By_Radius */
231  STDMETHOD(HATL_Insert_Circle_By_Radius)(float c_x, float c_y, float c_z, float radius, float n_x, float n_y, float n_z, /*[out, retval]*/HC_KEY *retkey);
232 
233  /* A wrapper for HOOPS/3dGS ::Insert_Circular_Arc */
234  STDMETHOD(HATL_Insert_Circular_Arc)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float p3_x, float p3_y, float p3_z, /*[out, retval]*/HC_KEY *retkey);
235 
236  /* A wrapper for HOOPS/3dGS ::Insert_Circular_Chord */
237  STDMETHOD(HATL_Insert_Circular_Chord)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float p3_x, float p3_y, float p3_z, /*[out, retval]*/HC_KEY *retkey);
238 
239  /* A wrapper for HOOPS/3dGS ::Insert_Circular_Wedge */
240  STDMETHOD(HATL_Insert_Circular_Wedge)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float p3_x, float p3_y, float p3_z, /*[out, retval]*/HC_KEY *retkey);
241 
242  /* A wrapper for HOOPS/3dGS ::Insert_Cutting_Plane */
243  STDMETHOD(HATL_Insert_Cutting_Plane)(float a, float b, float c, float d, /*[out, retval]*/HC_KEY *retkey);
244 
245  /* A wrapper for HOOPS/3dGS ::Insert_Cutting_Section */
246  STDMETHOD(HATL_Insert_Cutting_Section)(int count, VARIANT *planes_var, /*[out, retval]*/HC_KEY *retkey);
247 
248  /* A wrapper for HOOPS/3dGS ::Insert_Cylinder */
249  STDMETHOD(HATL_Insert_Cylinder)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float r, BSTR cap, /*[out, retval]*/HC_KEY *retkey);
250 
251  /* A wrapper for HOOPS/3dGS ::Insert_Ellipse */
252  STDMETHOD(HATL_Insert_Ellipse)(float c_x, float c_y, float c_z, float major_x, float major_y, float major_z, float minor_x, float minor_y, float minor_z, /*[out, retval]*/HC_KEY *retkey);
253 
254  /* A wrapper for HOOPS/3dGS ::Insert_Elliptical_Arc */
255  STDMETHOD(HATL_Insert_Elliptical_Arc)(float c_x, float c_y, float c_z, float major_x, float major_y, float major_z, float minor_x, float minor_y, float minor_z, float start, float end, /*[out, retval]*/HC_KEY *retkey);
256 
257  /* A wrapper for HOOPS/3dGS ::Insert_Grid */
258  STDMETHOD(HATL_Insert_Grid)(BSTR type, float o_x, float o_y, float o_z, float ref1_x, float ref1_y, float ref1_z, float ref2_x, float ref2_y, float ref2_z, int count1, int count2, /*[out, retval]*/HC_KEY *retkey);
259 
260  /* A wrapper for HOOPS/3dGS ::Insert_Image */
261  STDMETHOD(HATL_Insert_Image)(float x, float y, float z, BSTR format, int width, int height, VARIANT *pixeldata_var, /*[out, retval]*/HC_KEY *retkey);
262 
263  /* A wrapper for HOOPS/3dGS ::Insert_Ink */
264  STDMETHOD(HATL_Insert_Ink)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey);
265 
266  /* A wrapper for HOOPS/3dGS ::Insert_Line */
267  STDMETHOD(HATL_Insert_Line)(float xa, float ya, float za,float xb, float yb, float zb, /*[out, retval]*/HC_KEY *retkey);
268 
269  /* A wrapper for HOOPS/3dGS ::Insert_Distant_Light */
270  STDMETHOD(HATL_Insert_Distant_Light)(float di, float dj, float dk, /*[out, retval]*/HC_KEY *retkey);
271 
272  /* A wrapper for HOOPS/3dGS ::Insert_Local_Light */
273  STDMETHOD(HATL_Insert_Local_Light)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey);
274 
275  /* A wrapper for HOOPS/3dGS ::Insert_Spot_Light */
276  STDMETHOD(HATL_Insert_Spot_Light)(float p_x, float p_y, float p_z, float t_x, float t_y, float t_z, BSTR list, /*[out, retval]*/HC_KEY *retkey);
277 
278  /* A wrapper for HOOPS/3dGS ::Insert_Marker */
279  STDMETHOD(HATL_Insert_Marker)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey);
280 
281  /* A wrapper for HOOPS/3dGS ::Insert_Mesh */
282  STDMETHOD(HATL_Insert_Mesh)(int rows,int columns, VARIANT * points, /*[out, retval]*/HC_KEY *retkey);
283 
284  /* A wrapper for HOOPS/3dGS ::Insert_NURBS_Curve */
285  STDMETHOD(HATL_Insert_NURBS_Curve)(int degree, int cpcount, VARIANT *cpoints_var, VARIANT *weights_var, VARIANT *knots_var, float start_u, float end_u, /*[out, retval]*/HC_KEY *retkey);
286 
287  /* A wrapper for HOOPS/3dGS ::Insert_NURBS_Surface */
288  STDMETHOD(HATL_Insert_NURBS_Surface)(int u_degree, int v_degree, int u_count, int v_count, VARIANT *points_var, VARIANT *weights_var, VARIANT *u_knots_var, VARIANT *v_knots_var, /*[out, retval]*/HC_KEY *retkey);
289 
290  /* A wrapper for HOOPS/3dGS ::Insert_Polycylinder */
291  STDMETHOD(HATL_Insert_Polycylinder)(int pcount, VARIANT * points_var, int r_count, VARIANT *radii_var, BSTR capping, /*[out, retval]*/HC_KEY *retkey);
292 
293  /* A wrapper for HOOPS/3dGS ::Insert_Polygon */
294  STDMETHOD(HATL_Insert_Polygon)(int count, VARIANT *points_var, /*[out, retval]*/HC_KEY *retkey);
295 
296  /* A wrapper for HOOPS/3dGS ::Insert_Polyline */
297  STDMETHOD(HATL_Insert_Polyline)(int count, VARIANT *points_var, /*[out, retval]*/HC_KEY *retkey);
298 
299  /* A wrapper for HOOPS/3dGS ::Insert_Shell */
300  STDMETHOD(HATL_Insert_Shell)(int npoints, VARIANT * arr, int flen, VARIANT *arr2, /*[out, retval]*/HC_KEY *retkey);
301 
302  /* A wrapper for HOOPS/3dGS ::Insert_Shell_By_Tristrips */
303  STDMETHOD(HATL_Insert_Shell_By_Tristrips)(int pcount, VARIANT *points_var, int tlen, VARIANT *tlist_var, int flen, VARIANT *flist_var, /*[out, retval]*/HC_KEY *retkey);
304 
305  /* A wrapper for HOOPS/3dGS ::Insert_Shell_From_Region */
306  STDMETHOD(HATL_Insert_Shell_From_Region)(HC_KEY key1, int region, BSTR options, /*[out, retval]*/HC_KEY *retkey);
307 
308  /* A wrapper for HOOPS/3dGS ::Insert_Sphere */
309  STDMETHOD(HATL_Insert_Sphere)( float c_x, float c_y, float c_z, float radius, float a_x, float a_y, float a_z, float o_x, float o_y, float o_z, /*[out, retval]*/HC_KEY *retkey);
310 
311  /* A wrapper for HOOPS/3dGS ::Insert_Text */
312  STDMETHOD(HATL_Insert_Text)(float x, float y, float z, BSTR text, /*[out, retval]*/HC_KEY *retkey);
313 
314  /* A wrapper for HOOPS/3dGS ::Insert_Text_With_Encoding */
315  STDMETHOD(HATL_Insert_Text_With_Encoding)(float x, float y, float z, BSTR encoding, VARIANT *text, /*[out, retval]*/HC_KEY *retkey);
316 
317  /* A wrapper for HOOPS/3dGS ::Insert_Unicode_Text */
318  STDMETHOD(HATL_Insert_Unicode_Text)(float x, float y, float z, VARIANT *text, /*[out, retval]*/HC_KEY *retkey);
319 
320 
321 
322  /* Misc functions */
323 
324  /* A wrapper for HOOPS/3dGS ::Open_Segment */
325  STDMETHOD(HATL_Open_Segment)(BSTR segment, HC_KEY *retkey);
326 
327  /* A wrapper for HOOPS/3dGS ::Close_Segment */
328  STDMETHOD(HATL_Close_Segment)();
329 
330  /* A wrapper for HOOPS/3dGS ::Open_Geometry */
331  STDMETHOD(HATL_Open_Geometry)(HC_KEY key);
332 
333  /* A wrapper for HOOPS/3dGS ::Close_Geometry */
334  STDMETHOD(HATL_Close_Geometry)();
335 
336  /* A wrapper for HOOPS/3dGS ::Open_Face */
337  STDMETHOD(HATL_Open_Face)(int offset);
338 
339  /* A wrapper for HOOPS/3dGS ::Close_Face */
340  STDMETHOD(HATL_Close_Face)();
341 
342  /* A wrapper for HOOPS/3dGS ::Open_Edge */
343  STDMETHOD(HATL_Open_Edge)(int offset1, int offset2);
344 
345  /* A wrapper for HOOPS/3dGS ::Close_Edge */
346  STDMETHOD(HATL_Close_Edge)();
347 
348  /* A wrapper for HOOPS/3dGS ::Include_Segment */
349  STDMETHOD(HATL_Include_Segment)(BSTR segment, HC_KEY *retkey);
350 
351  /* A wrapper for HOOPS/3dGS ::Delete_By_Key */
352  STDMETHOD(HATL_Delete_By_Key)(HC_KEY key);
353 
354  /* A wrapper for HOOPS/3dGS ::Flush_Contents */
355  STDMETHOD(HATL_Flush_Contents)(BSTR segment, BSTR filter);
356 
357 
358 
359  /* Set functions */
360 
361  /* A wrapper for HOOPS/3dGS ::Set_Camera */
362  STDMETHOD(HATL_Set_Camera)(float p_x, float p_y, float p_z, float t_x, float t_y, float t_z, float u_x, float u_y, float u_z, float width, float height, BSTR projection);
363 
364  /* A wrapper for HOOPS/3dGS ::Set_Camera_By_Volume */
365  STDMETHOD(HATL_Set_Camera_By_Volume)(BSTR projection, float xmin, float xmax, float ymin, float ymax);
366 
367  /* A wrapper for HOOPS/3dGS ::Set_Camera_Field */
368  STDMETHOD(HATL_Set_Camera_Field)(float width, float height);
369 
370  /* A wrapper for HOOPS/3dGS ::Set_Camera_Near_Limit */
371  STDMETHOD(HATL_Set_Camera_Near_Limit)(float wlimit);
372 
373  /* A wrapper for HOOPS/3dGS ::Set_Camera_Position */
374  STDMETHOD(HATL_Set_Camera_Position)(float p_x, float p_y, float p_z);
375 
376  /* A wrapper for HOOPS/3dGS ::Set_Camera_Projection */
377  STDMETHOD(HATL_Set_Camera_Projection)(BSTR projection);
378 
379  /* A wrapper for HOOPS/3dGS ::Set_Camera_Target */
380  STDMETHOD(HATL_Set_Camera_Target)(float t_x, float t_y, float t_z);
381 
382  /* A wrapper for HOOPS/3dGS ::Set_Camera_Up_Vector */
383  STDMETHOD(HATL_Set_Camera_Up_Vector)(float u_x, float u_y, float u_z);
384 
385  /* A wrapper for HOOPS/3dGS ::Set_Circular_Center */
386  STDMETHOD(HATL_Set_Circular_Center)(float x, float y, float z);
387 
388  /* A wrapper for HOOPS/3dGS ::Set_Circular_Center_By_Key */
389  STDMETHOD(HATL_Set_Circular_Center_By_Key)(HC_KEY key, float x, float y, float z);
390 
391  /* A wrapper for HOOPS/3dGS ::Set_Color */
392  STDMETHOD(HATL_Set_Color)(BSTR col);
393 
394  /* A wrapper for HOOPS/3dGS ::Set_Color_By_FIndex */
395  STDMETHOD(HATL_Set_Color_By_FIndex)(BSTR types, float findex);
396 
397  /* A wrapper for HOOPS/3dGS ::Set_Color_By_Index */
398  STDMETHOD(HATL_Set_Color_By_Index)(BSTR types, int index);
399 
400  /* A wrapper for HOOPS/3dGS ::Set_Color_By_Value */
401  STDMETHOD(HATL_Set_Color_By_Value)(BSTR types, BSTR colspace, float a, float b, float c);
402 
403  /* A wrapper for HOOPS/3dGS ::Set_Color_Map */
404  STDMETHOD(HATL_Set_Color_Map)(BSTR col);
405 
406  /* A wrapper for HOOPS/3dGS ::Set_Color_Map_By_Value */
407  STDMETHOD(HATL_Set_Color_Map_By_Value)(BSTR col, int count, VARIANT *values_var);
408 
409  /* A wrapper for HOOPS/3dGS ::Set_Conditions */
410  STDMETHOD(HATL_Set_Conditions)(BSTR conditions);
411 
412  /* A wrapper for HOOPS/3dGS ::Set_Driver_Options */
413  STDMETHOD(HATL_Set_Driver_Options)(BSTR driver_options);
414 
415  /* A wrapper for HOOPS/3dGS ::Set_Edge_Pattern */
416  STDMETHOD(HATL_Set_Edge_Pattern)(BSTR pattern);
417 
418  /* A wrapper for HOOPS/3dGS ::Set_Edge_Weight */
419  STDMETHOD(HATL_Set_Edge_Weight)(float weight);
420 
421  /* A wrapper for HOOPS/3dGS ::Set_Face_Pattern */
422  STDMETHOD(HATL_Set_Face_Pattern)(BSTR pattern);
423 
424  /* A wrapper for HOOPS/3dGS ::Set_Faces */
425  STDMETHOD(HATL_Set_Faces)(int first_face, int face_count);
426 
427  /* A wrapper for HOOPS/3dGS ::Set_Handedness */
428  STDMETHOD(HATL_Set_Handedness)(BSTR handedness);
429 
430  /* A wrapper for HOOPS/3dGS ::Set_Heuristics */
431  STDMETHOD(HATL_Set_Heuristics)(BSTR heuristics);
432 
433  /* A wrapper for HOOPS/3dGS ::Set_Line_Pattern */
434  STDMETHOD(HATL_Set_Line_Pattern)(BSTR pattern);
435 
436  /* A wrapper for HOOPS/3dGS ::Set_Line_Weight */
437  STDMETHOD(HATL_Set_Line_Weight)(float weight);
438 
439  /* A wrapper for HOOPS/3dGS ::Set_Marker_Size */
440  STDMETHOD(HATL_Set_Marker_Size)(float weight);
441 
442  /* A wrapper for HOOPS/3dGS ::Set_Marker_Symbol */
443  STDMETHOD(HATL_Set_Marker_Symbol)(BSTR symbol);
444 
445  /* A wrapper for HOOPS/3dGS ::Set_Modelling_Matrix */
446  STDMETHOD(HATL_Set_Modelling_Matrix)(VARIANT *matrix_var);
447 
448  /* A wrapper for HOOPS/3dGS ::Set_Normal */
449  STDMETHOD(HATL_Set_Normal)(float x, float y, float z);
450 
451  /* A wrapper for HOOPS/3dGS ::Set_Parameter */
452  STDMETHOD(HATL_Set_Parameter)(int number, VARIANT *parameters_var);
453 
454  /* A wrapper for HOOPS/3dGS ::Set_Polygonal_Clip_Region */
455  STDMETHOD(HATL_Set_Polygonal_Clip_Region)(int count, VARIANT *points_var, BSTR options);
456 
457  /* A wrapper for HOOPS/3dGS ::Set_Priority */
458  STDMETHOD(HATL_Set_Priority)(HC_KEY key, long priority);
459 
460  /* A wrapper for HOOPS/3dGS ::Set_Region */
461  STDMETHOD(HATL_Set_Region)(int region);
462 
463  /* A wrapper for HOOPS/3dGS ::Set_Rendering_Options */
464  STDMETHOD(HATL_Set_Rendering_Options)(BSTR rendering_options);
465 
466  /* A wrapper for HOOPS/3dGS ::Set_Selectability */
467  STDMETHOD(HATL_Set_Selectability)(BSTR list);
468 
469  /* A wrapper for HOOPS/3dGS ::Set_Streaming_Mode */
470  STDMETHOD(HATL_Set_Streaming_Mode)(BSTR flag);
471 
472  /* A wrapper for HOOPS/3dGS ::Set_Text_Alignment */
473  STDMETHOD(HATL_Set_Text_Alignment)(BSTR locater);
474 
475  /* A wrapper for HOOPS/3dGS ::Set_Text_Font */
476  STDMETHOD(HATL_Set_Text_Font)(BSTR text_font);
477 
478  /* A wrapper for HOOPS/3dGS ::Set_Text_Path */
479  STDMETHOD(HATL_Set_Text_Path)(float x, float y, float z);
480 
481  /* A wrapper for HOOPS/3dGS ::Set_Text_Region */
482  STDMETHOD(HATL_Set_Text_Region)(int pCount, VARIANT *points_var, BSTR options);
483 
484  /* A wrapper for HOOPS/3dGS ::Set_Text_Spacing */
485  STDMETHOD(HATL_Set_Text_Spacing)(float spacing);
486 
487  /* A wrapper for HOOPS/3dGS ::Set_Texture_Matrix */
488  STDMETHOD(HATL_Set_Texture_Matrix)(VARIANT *matrix_var);
489 
490  /* A wrapper for HOOPS/3dGS ::Set_Trim_Operation */
491  STDMETHOD(HATL_Set_Trim_Operation)(int index, BSTR operation);
492 
493  /* A wrapper for HOOPS/3dGS ::Set_Unicode_Options */
494  STDMETHOD(HATL_Set_Unicode_Options)(VARIANT *options_var);
495 
496  /* A wrapper for HOOPS/3dGS ::Set_User_Index */
497  STDMETHOD(HATL_Set_User_Index)(int index, VARIANT *data_var);
498 
499  /* A wrapper for HOOPS/3dGS ::Set_User_Options */
500  STDMETHOD(HATL_Set_User_Options)(BSTR list);
501 
502  /*
503  Method: ::Update_Display wrapper
504  \return HRESULT
505  */
506  STDMETHOD(Update)();
507 
508  /* A wrapper for HOOPS/3dGS ::Set_Visibility */
509  STDMETHOD(HATL_Set_Visibility)(BSTR vis);
510 
511  /* A wrapper for HOOPS/3dGS ::Set_Variable_Edge_Weight */
512  STDMETHOD(HATL_Set_Variable_Edge_Weight)(BSTR weight);
513 
514  /* A wrapper for HOOPS/3dGS ::Set_Variable_Line_Weight */
515  STDMETHOD(HATL_Set_Variable_Line_Weight)(BSTR weight);
516 
517  /* A wrapper for HOOPS/3dGS ::Set_Variable_Marker_Size */
518  STDMETHOD(HATL_Set_Variable_Marker_Size)(BSTR weight);
519 
520  /* A wrapper for HOOPS/3dGS ::Set_Window */
521  STDMETHOD(HATL_Set_Window)(float left, float right, float bottom, float top);
522 
523  /* A wrapper for HOOPS/3dGS ::Set_Window_Frame */
524  STDMETHOD(HATL_Set_Window_Frame)(BSTR flag);
525 
526  /* A wrapper for HOOPS/3dGS ::Set_Window_Pattern */
527  STDMETHOD(HATL_Set_Window_Pattern)(BSTR pattern);
528 
529 
530 
531  /* Unset functions */
532 
533  /* A wrapper for HOOPS/3dGS ::UnSet_Camera */
534  STDMETHOD(HATL_UnSet_Camera)();
535 
536  /* A wrapper for HOOPS/3dGS ::UnSet_Color */
537  STDMETHOD(HATL_UnSet_Color)();
538 
539  /* A wrapper for HOOPS/3dGS ::UnSet_Color_Map */
540  STDMETHOD(HATL_UnSet_Color_Map)();
541 
542  /* A wrapper for HOOPS/3dGS ::UnSet_Driver_Options */
543  STDMETHOD(HATL_UnSet_Driver_Options)();
544 
545  /* A wrapper for HOOPS/3dGS ::UnSet_Edge_Pattern */
546  STDMETHOD(HATL_UnSet_Edge_Pattern)();
547 
548  /* A wrapper for HOOPS/3dGS ::UnSet_Edge_Weight */
549  STDMETHOD(HATL_UnSet_Edge_Weight)();
550 
551  /* A wrapper for HOOPS/3dGS ::UnSet_Face_Pattern */
552  STDMETHOD(HATL_UnSet_Face_Pattern)();
553 
554  /* A wrapper for HOOPS/3dGS ::UnSet_Handedness */
555  STDMETHOD(HATL_UnSet_Handedness)();
556 
557  /* A wrapper for HOOPS/3dGS ::UnSet_Heuristics */
558  STDMETHOD(HATL_UnSet_Heuristics)();
559 
560  /* A wrapper for HOOPS/3dGS ::UnSet_Line_Pattern */
561  STDMETHOD(HATL_UnSet_Line_Pattern)();
562 
563  /* A wrapper for HOOPS/3dGS ::UnSet_Line_Weight */
564  STDMETHOD(HATL_UnSet_Line_Weight)();
565 
566  /* A wrapper for HOOPS/3dGS ::UnSet_Marker_Size */
567  STDMETHOD(HATL_UnSet_Marker_Size)();
568 
569  /* A wrapper for HOOPS/3dGS ::UnSet_Marker_Symbol */
570  STDMETHOD(HATL_UnSet_Marker_Symbol)();
571 
572  /* A wrapper for HOOPS/3dGS ::UnSet_Modelling_Matrix */
573  STDMETHOD(HATL_UnSet_Modelling_Matrix)();
574 
575  /* A wrapper for HOOPS/3dGS ::UnSet_Normal */
576  STDMETHOD(HATL_UnSet_Normal)();
577 
578  /* A wrapper for HOOPS/3dGS ::UnSet_One_Color */
579  STDMETHOD(HATL_UnSet_One_Color)(BSTR which);
580 
581  /* A wrapper for HOOPS/3dGS ::UnSet_One_Driver_Option */
582  STDMETHOD(HATL_UnSet_One_Driver_Option)(BSTR which);
583 
584  /* A wrapper for HOOPS/3dGS ::UnSet_One_Heuristic */
585  STDMETHOD(HATL_UnSet_One_Heuristic)(BSTR which);
586 
587  /* A wrapper for HOOPS/3dGS ::UnSet_One_Rendering_Option */
588  STDMETHOD(HATL_UnSet_One_Rendering_Option)(BSTR which);
589 
590  /* A wrapper for HOOPS/3dGS ::UnSet_One_Selectability */
591  STDMETHOD(HATL_UnSet_One_Selectability)(BSTR which);
592 
593  /* A wrapper for HOOPS/3dGS ::UnSet_One_Text_Font */
594  STDMETHOD(HATL_UnSet_One_Text_Font)(BSTR which);
595 
596  /* A wrapper for HOOPS/3dGS ::UnSet_One_User_Index */
597  STDMETHOD(HATL_UnSet_One_User_Index)(long which);
598 
599  /* A wrapper for HOOPS/3dGS ::UnSet_One_User_Option */
600  STDMETHOD(HATL_UnSet_One_User_Option)(BSTR which);
601 
602  /* A wrapper for HOOPS/3dGS ::UnSet_One_Visibility */
603  STDMETHOD(HATL_UnSet_One_Visibility)(BSTR which);
604 
605  /* A wrapper for HOOPS/3dGS ::UnSet_Parameter */
606  STDMETHOD(HATL_UnSet_Parameter)();
607 
608  /* A wrapper for HOOPS/3dGS ::UnSet_Rendering_Options */
609  STDMETHOD(HATL_UnSet_Rendering_Options)();
610 
611  /* A wrapper for HOOPS/3dGS ::UnSet_Selectability */
612  STDMETHOD(HATL_UnSet_Selectability)();
613 
614  /* A wrapper for HOOPS/3dGS ::UnSet_Streaming_Mode */
615  STDMETHOD(HATL_UnSet_Streaming_Mode)();
616 
617  /* A wrapper for HOOPS/3dGS ::UnSet_Text_Alignment */
618  STDMETHOD(HATL_UnSet_Text_Alignment)();
619 
620  /* A wrapper for HOOPS/3dGS ::UnSet_Text_Font */
621  STDMETHOD(HATL_UnSet_Text_Font)();
622 
623  /* A wrapper for HOOPS/3dGS ::UnSet_Text_Path */
624  STDMETHOD(HATL_UnSet_Text_Path)();
625 
626  /* A wrapper for HOOPS/3dGS ::UnSet_Text_Spacing */
627  STDMETHOD(HATL_UnSet_Text_Spacing)();
628 
629  /* A wrapper for HOOPS/3dGS ::UnSet_Texture_Matrix */
630  STDMETHOD(HATL_UnSet_Texture_Matrix)();
631 
632  /* A wrapper for HOOPS/3dGS ::UnSet_User_Options */
633  STDMETHOD(HATL_UnSet_User_Options)();
634 
635  /* A wrapper for HOOPS/3dGS ::UnSet_Visibility */
636  STDMETHOD(HATL_UnSet_Visibility)();
637 
638  /* A wrapper for HOOPS/3dGS ::UnSet_Window */
639  STDMETHOD(HATL_UnSet_Window)();
640 
641  /* A wrapper for HOOPS/3dGS ::UnSet_Window_Frame */
642  STDMETHOD(HATL_UnSet_Window_Frame)();
643 
644  /* A wrapper for HOOPS/3dGS ::UnSet_Window_Pattern */
645  STDMETHOD(HATL_UnSet_Window_Pattern)();
646 
647 
648 
649  /* Define functions */
650 
651  /* A wrapper for HOOPS/3dGS ::Define_Alias */
652  STDMETHOD(HATL_Define_Alias)(BSTR name, BSTR expansion);
653 
654  /* A wrapper for HOOPS/3dGS ::Define_Color_Name */
655  STDMETHOD(HATL_Define_Color_Name)(BSTR name, BSTR er_name, BSTR ish_name, BSTR definition);
656 
657  /* A wrapper for HOOPS/3dGS ::Define_Font */
658  STDMETHOD(HATL_Define_Font)(BSTR name, BSTR options, int data_length, VARIANT *data_var);
659 
660  /* A wrapper for HOOPS/3dGS ::Define_Glyph */
661  STDMETHOD(HATL_Define_Glyph)(BSTR name, int data_size, BSTR data);
662 
663  /* A wrapper for HOOPS/3dGS ::Define_Line_Style */
664  STDMETHOD(HATL_Define_Line_Style)(BSTR name, BSTR definition);
665 
666  /* A wrapper for HOOPS/3dGS ::Define_Local_Texture */
667  STDMETHOD(HATL_Define_Local_Texture)(BSTR name, BSTR definition);
668 
669  /* A wrapper for HOOPS/3dGS ::Define_System_Options */
670  STDMETHOD(HATL_Define_System_Options)(BSTR list);
671 
672  /* A wrapper for HOOPS/3dGS ::Define_Texture */
673  STDMETHOD(HATL_Define_Texture)(BSTR name, BSTR definition);
674 
675 
676 
677  /* unsorted */
678 
679  /* A wrapper for HOOPS/3dGS ::Show_Color */
680  STDMETHOD(HATL_Show_Color)(/*[out, retval]*/BSTR *color_spec);
681 
682  /* A wrapper for HOOPS/3dGS ::Show_Alias */
683  STDMETHOD(HATL_Show_Alias)(BSTR alias, /*[out, retval]*/BSTR *expansion);
684 
685  /* A wrapper for HOOPS/3dGS ::Show_Button */
686  STDMETHOD(HATL_Show_Button)(/*[out, retval]*/BSTR *button);
687 
688  /* A wrapper for HOOPS/3dGS ::Show_Button_Source */
689  STDMETHOD(HATL_Show_Button_Source)();
690 
691 
692 
693 
694  /*
695  property: Indicates if Current File has Model Structure Information
696  \param pVal Boolean
697  \return HRESULT
698  */
699  STDMETHOD(get_HasModelStructureInfo)(/*[out, retval]*/ BOOL *pVal);
708  STDMETHOD(SetSelectionMarkerColor)(float r, float g, float b, float a);
717  STDMETHOD(SetSelectionEdgeColor)(float r, float g, float b, float a);
726  STDMETHOD(SetSelectionFaceColor)(float r, float g, float b, float a);
727  /*
728  property: Indicates if Smooth Transition is set
729  \param pVal Boolean
730  \return HRESULT
731  */
732  STDMETHOD(get_SmoothTransitionMode)(/*[out, retval]*/ BOOL *pVal);
733  /*
734  property: Set Smooth Transition
735  \param pVal Boolean
736  \return HRESULT
737  */
738  STDMETHOD(put_SmoothTransitionMode)(/*[in]*/ BOOL newVal);
739  /*
740  property: Indicates if Data Navigator mode is set
741  \param pVal Boolean
742  \return HRESULT
743  */
744  STDMETHOD(get_DataNavigatorMode)(/*[out, retval]*/ BOOL *pVal);
745  /*
746  property: Indicates if undo is possible
747  \param pVal Boolean
748  \return HRESULT
749  */
750  STDMETHOD(get_UndoAvailable)(/*[out, retval]*/ BOOL *pVal);
751  /*
752  property: Indicates if redo is possible
753  \param pVal Boolean
754  \return HRESULT
755  */
756  STDMETHOD(get_RedoAvailable)(/*[out, retval]*/ BOOL *pVal);
757  /*
758  property: Sets Data Navigator Mode
759  \param newVal Boolean
760  \return HRESULT
761  */
762  STDMETHOD(put_DataNavigatorMode)(/*[in]*/ BOOL newVal);
763  /*
764  property: Sets path for configuration file
765  \param newVal Boolean
766  \return HRESULT
767  */
768  STDMETHOD(put_ConfigFile)(BSTR newVal);
769  /*
770  property: Retrieve path for configuration file
771  \param newVal Boolean
772  \return HRESULT
773  */
774  STDMETHOD(get_ConfigFile)(BSTR *newVal);
775  /*
776  property: Sets path for default configuration file
777  \param newVal Boolean
778  \return HRESULT
779  */
780  STDMETHOD(put_DefaultConfigFile)(BSTR newVal);
781 
782  STDMETHOD(put_SegmentDL)(/*[in]*/ BOOL newVal);
783  STDMETHOD(get_SegmentDL)(/*[out, retval]*/ BOOL *pVal);
784 
785  /*
786  property: Sets TransparencyOptions
787  \param newVal String
788  \return HRESULT
789  */
790  STDMETHOD(get_TransparencyOptions)(BSTR *newVal);
791  STDMETHOD(put_TransparencyOptions)(BSTR newVal);
792 
793  /*
794  property: Sets HOOPS driver
795  \param newVal String
796  \return HRESULT
797  */
798  STDMETHOD(get_DriverType)(BSTR *newVal);
799  STDMETHOD(put_DriverType)(BSTR newVal);
800  /*
801  property: Sets Type of Framerate Mode (FramerateFixed, FramerateTarget, FramerateOff)
802  \param newVal String
803  \return HRESULT
804  */
805  STDMETHOD(put_FramerateType)(BSTR newVal);
806  STDMETHOD(get_FramerateType)(BSTR *pVal);
807 
808  /*
809  property: Sets Culling Threshold Value
810  \param newVal Integer
811  \return HRESULT
812  */
813  STDMETHOD(put_CullingThreshold)(int newVal);
814  STDMETHOD(get_CullingThreshold)(int *pVal);
815 
816  /*
817  property: Sets Maximum Threshold Value for Framerate
818  \param newVal Integer
819  \return HRESULT
820  */
821  STDMETHOD(put_MaximumThreshold)(int newVal);
822  STDMETHOD(get_MaximumThreshold)(int *pVal);
823 
824  /*
825  property: Retrieves path for default configuration file
826  \param newVal Boolean
827  \return HRESULT
828  */
829  STDMETHOD(get_DefaultConfigFile)(BSTR *newVal);
834  STDMETHOD(ShowOptionsDialog)();
835 
842  STDMETHOD(GetPathFromIndex)(/*[in]*/ int index, /*[out, retval]*/ BSTR *pPath);
849  STDMETHOD(KeyToIndex)(/*[in]*/ BSTR key, /*[out, retval]*/ int* pIndex);
850  /*
851  property: Retrieves status of given cutting plane
852  \param name Name of cutting plane segment
853  \param pVal Boolean indicating if cutting plane is currently active
854  \return HRESULT
855  */
856  STDMETHOD(get_CuttingPlaneStatus)(BSTR name, /*[out, retval]*/ BOOL *pVal);
862  STDMETHOD(Run)(BSTR command);
863  /*
864  property: Retrieves camera projection mode
865  \param pVal Projection Mode (perspective, orthographic,etc)
866  \return HRESULT
867  */
868  STDMETHOD(get_ProjectionMode)(/*[out, retval]*/ BSTR *pVal);
869  /*
870  property: Sets camera projection mode
871  \param pVal Projection Mode (perspective, orthographic,etc)
872  \return HRESULT
873  */
874  STDMETHOD(put_ProjectionMode)(/*[in]*/ BSTR newVal);
875  /*
876  property: Sets Opengl or direct3d software rendering
877  \param newVal Boolean
878  \return HRESULT
879  */
880  STDMETHOD(put_SoftwareRendering)(/*[in]*/ BOOL newVal);
881  /*
882  property: Retrieves the current setting for software rendering
883  \param newVal Boolean
884  \return HRESULT
885  */
886  STDMETHOD(get_SoftwareRendering)(/*[out, retval]*/ BOOL *pVal);
887 
893  STDMETHOD(Select)(BSTR key);
899  STDMETHOD(SelectFromIdentifier)(int identifier);
905  STDMETHOD(SelectFromPath)(BSTR path);
906 
912  STDMETHOD(AddFileType)(BSTR filetype);
913 
920  STDMETHOD(FilterIdentifier)(int oldidentifier, int *newidentifier);
921 
928  STDMETHOD(GenerateNavigationInfo)(int level, BSTR *filepath);
935  STDMETHOD(GenerateNavigationInfoFromNodePath)(BSTR nodepath, BSTR *filepath);
936 
941  STDMETHOD(ShowPageSetupDialog)();
946  STDMETHOD(ShowPrintDialog)();
952  STDMETHOD(CopyToClipboard)();
957  STDMETHOD(ShowFileSaveDialog)();
958 
959 
960 
965  STDMETHOD(ShowFileOpenDialog)();
966 
972  STDMETHODIMP SetRenderMode(BSTR rendermode);
973 
974 
975 
982  STDMETHOD(ShowCuttingPlane)(BSTR name, BOOL onoff);
983 
988  STDMETHOD(BhvPlay)();
993  STDMETHOD(FlushScene)();
994 
999  STDMETHOD(BhvPause)();
1004  STDMETHOD(BhvRewind)();
1005 
1010  STDMETHOD(OpenModelSegment)();
1015  STDMETHOD(OpenSceneSegment)();
1016 
1022  STDMETHOD(SetFramerateMode)(BOOL onoff);
1028  STDMETHOD(SetBackplaneCullingMode)(BOOL onoff);
1033  STDMETHOD(SetPolygonHandednessNone)();
1038  STDMETHOD(SetPolygonHandednessRight)();
1043  STDMETHOD(SetPolygonHandednessLeft)();
1048  STDMETHOD(AntialiasScene)();
1054  STDMETHOD(SetShadowMode)(BOOL onoff);
1059  STDMETHOD(SetProjectionModeOrthographic)();
1064  STDMETHOD(SetProjectionModePerspective)();
1070  STDMETHOD(SaveRestoreMarkup)(int layernum);
1075  STDMETHOD(SetCameraToIsometric)();
1080  STDMETHOD(SetCameraToPlaneYX)();
1085  STDMETHOD(SetCameraToPlaneZY)();
1090  STDMETHOD(SetCameraToPlaneZX)();
1095  STDMETHOD(SetCameraToPlaneYZ)();
1100  STDMETHOD(SetCameraToPlaneXZ)();
1105  STDMETHOD(SetViewAxis)(float fx, float fy, float fz,
1106  float tx, float ty, float tz);
1110  STDMETHOD(SetCameraToPlaneXY)();
1115  STDMETHOD(InsertCuttingPlane)();
1120  STDMETHOD(SetRenderModeHiddenLine)();
1125  STDMETHOD(SetRenderModeWireframe)();
1130  STDMETHOD(SetRenderModeGouraud)();
1135  STDMETHOD(SetRenderModeGouraudWithEdges)();
1140  STDMETHOD(SetRenderModeFlat)();
1145  STDMETHOD(SetRenderModeShaded)();
1151  STDMETHOD(SetOperator)(BSTR operator_name);
1156  STDMETHOD(SetBackgroundColors)(float r_top, float g_top, float b_top, float r_bottom, float g_bottom, float b_bottom, int percent);
1157 
1162  STDMETHOD(SetAmbientColor)(float r_top, float g_top, float b_top);
1163 
1164 
1165  /*
1166  Property: Get current file type
1167  \param pVal file type (either 2dmodel or 3dmodel)
1168  \return HRESULT
1169  */
1170  STDMETHOD(get_AllowMenu)(/*[out, retval]*/ BOOL *pVal);
1171  /*
1172  Property: Set current file type
1173  \param newVal file type (either 2dmodel or 3dmodel)
1174  \return HRESULT
1175  */
1176  STDMETHOD(put_AllowMenu)(/*[in]*/ BOOL newVal);
1177 
1178 
1179  /*
1180  Property: Get current file type
1181  \param pVal file type (either 2dmodel or 3dmodel)
1182  \return HRESULT
1183  */
1184  STDMETHOD(get_FileType)(/*[out, retval]*/ BSTR *pVal);
1185  /*
1186  Property: Set current file type
1187  \param newVal file type (either 2dmodel or 3dmodel)
1188  \return HRESULT
1189  */
1190  STDMETHOD(put_FileType)(/*[in]*/ BSTR newVal);
1191  /*
1192  Property: Get no orbit operator flag
1193  \param pVal true = no orbit operator allowed, false = orbit operator allowed
1194  \return HRESULT
1195  */
1196  STDMETHOD(get_NoOrbit)(/*[out, retval]*/ BOOL *pVal);
1197  /*
1198  Property: Set no orbit operator flag
1199  \param newVal true = no orbit operator allowed, false = orbit operator allowed
1200  \return HRESULT
1201  */
1202  STDMETHOD(put_NoOrbit)(/*[in]*/ BOOL newVal);
1203 
1204  /*
1205  Property: Get Antialiasing Flag
1206  \param pVal true = use antialiasing step during constant framerate, false = no antialiasing
1207  \return HRESULT
1208  */
1209  STDMETHOD(get_Antialiasing)(/*[out, retval]*/ BOOL *pVal);
1210 
1211  /*
1212  Property: Set Antialiasing Flag
1213  \param newVal true = use antialiasing step during constant framerate, false = no antialiasing
1214  \return HRESULT
1215  */
1216  STDMETHOD(put_Antialiasing)(/*[in]*/ BOOL newVal);
1217 
1218 
1219  STDMETHOD(get_FrameRate)(/*[out, retval]*/ float *pVal);
1220 
1221  /*
1222  property: Sets desired Framerate (in sec)
1223  \param newVal float
1224  \return HRESULT
1225  */
1226  STDMETHOD(put_FrameRate)(/*[in]*/ float newVal);
1227 
1228 
1229  /*
1230  Property: Set Hardware Antialiasing Flag
1231  \param newVal true = use hardware antialiasing, false = no hardware antialiasing
1232  \return HRESULT
1233  */
1234  STDMETHOD(put_HardwareAntialiasing)(/*[in]*/ BOOL newVal);
1235  /*
1236  Property: Get Hardware Antialiasing Flag
1237  \param pVal true = use hardware Antialiasing, false = no antialiasing
1238  \return HRESULT
1239  */
1240  STDMETHOD(get_HardwareAntialiasing)(/*[out, retval]*/ BOOL *pVal);
1241 
1242  /*
1243  Property: Set Entity Selection Antialiasing Flag
1244  \param newVal true = use entity selection, false = no entity selection
1245  \return HRESULT
1246  */
1247  STDMETHOD(put_AllowEntitySelection)(/*[in]*/ BOOL newVal);
1248  /*
1249  Property: Get Entity Selection Flag
1250  \param pVal true = use entity selection, false = no entity selection
1251  \return HRESULT
1252  */
1253  STDMETHOD(get_AllowEntitySelection)(/*[out, retval]*/ BOOL *pVal);
1254 
1255 
1256 
1257  /*
1258  Property: Sets Continues play animation setting indicating if animation should loop
1259  \param newVal boolean
1260  \return HRESULT
1261  */
1262  STDMETHOD(put_BhvContinuousPlay)(/*[in]*/ BOOL newVal);
1263 
1264  /*
1265  Property: Retrieves Continues play animation setting indicating if animation should loop
1266  \param newVal boolean
1267  \return HRESULT
1268  */
1269  STDMETHOD(get_BhvContinuousPlay)(/*[out, retval]*/ BOOL *pVal);
1270 
1271 
1272  /*
1273  Property: Set AxisMode Flag
1274  \param newVal true = display axis, false = no axis
1275  \return HRESULT
1276  */
1277  STDMETHOD(put_AxisMode)(/*[in]*/ BOOL newVal);
1278  /*
1279  Property: Get AxisMode Flag
1280  \param pVal true = Display Axis, false = no axis
1281  \return HRESULT
1282  */
1283  STDMETHOD(get_AxisMode)(/*[out, retval]*/ BOOL *pVal);
1284 
1285  /*
1286  Property: Get Last Returned Key
1287  \param pVal Last key that was returned by a call
1288  \return HRESULT
1289  */
1290  STDMETHOD(get_Key)(/*[out, retval]*/ LONG *pVal);
1291 
1292  /*
1293  Property: Get Last Returned String
1294  \param pVal Last string that was returned by a call
1295  \return HRESULT
1296  */
1297  STDMETHOD(get_String1)(/*[out, retval]*/ BSTR *pVal);
1298  STDMETHOD(get_String2)(/*[out, retval]*/ BSTR *pVal);
1299  STDMETHOD(get_String3)(/*[out, retval]*/ BSTR *pVal);
1300  STDMETHOD(get_Int1)(/*[out, retval]*/ int *pVal);
1301 
1302  /*
1303  Property: Get control embed state
1304  \param PVal true = will be embedded, false = will not be embedded
1305  \return HRESULT
1306  */
1307  STDMETHOD(get_Embed)(/*[out, retval]*/ BOOL *pVal);
1308 
1309  /*
1310  Property: Set Segment Display Listz
1311  \param newVal true = on, false = off
1312  \return HRESULT
1313  */
1314 
1315  /*
1316  Property: Set Segment Display List
1317  \param newVal true = on, false = off
1318  \return HRESULT
1319  */
1320  STDMETHOD(put_AntialiasingLevel)(/*[in]*/ int newVal);
1321  STDMETHOD(get_AntialiasingLevel)(/*[out]*/ int *pVal);
1322 
1323  /*
1324  Property: Set Segment Display List
1325  \param newVal true = on, false = off
1326  \return HRESULT
1327  */
1328  STDMETHOD(put_StaticModel)(/*[in]*/ BOOL newVal);
1329  STDMETHOD(get_StaticModel)(/*[out]*/ BOOL *pVal);
1330 
1331  /*
1332  Property: Set Static Tree
1333  \param newVal true = on, false = off
1334  \return HRESULT
1335  */
1336  STDMETHOD(put_Embed)(/*[in]*/ BOOL newVal);
1337 
1338  /*
1339  Property: Get camera parameters
1340  \param pVal returns current camera position, target, up-vector, width, height as string
1341  \return HRESULT
1342  */
1343  STDMETHOD(get_CameraParameters)(/*[out, retval]*/ BSTR *pVal);
1359  STDMETHOD(SetCamera)(float px, float py, float pz, float tx, float ty, float tz, float ux, float uy, float uz, float width, float height);
1364  STDMETHOD(FitWorld)();
1365  /*
1366  Property: Get name of current operator
1367  \param pVal operator name
1368  \return HRESULT
1369  */
1370  STDMETHOD(get_CurrentOperator)(/*[out, retval]*/ BSTR *pVal);
1371 
1372  /*
1373  Property: Get comma separated string listing all model structure types
1374  \param pVal boolean
1375  \return HRESULT
1376  */
1377  STDMETHOD(get_ModelStructureTypeList)(/*[out, retval]*/ BSTR *pVal);
1378 
1383  STDMETHOD(AbortDownload)();
1384  /*
1385  Property: Get size of currently downloading file
1386  \param pVal file size
1387  \return HRESULT
1388  */
1389  STDMETHOD(get_DownloadDataMax)(/*[out, retval]*/ long *pVal);
1390  /*
1391  Property: Get amount of data already dowloaded for currently donwloading file
1392  \param pVal amount of data already donwloaded
1393  \return HRESULT
1394  */
1395  STDMETHOD(get_DownloadDataReceived)(/*[out, retval]*/ long *pVal);
1396  /*
1397  Property: Get download in progress state
1398  \param pVal true = streaming in progress, false = no streaming in progress
1399  \return HRESULT
1400  */
1401  STDMETHOD(get_DLinProgress)(/*[out, retval]*/ BOOL *pVal);
1402 
1403 
1404 
1405 
1406 
1407 
1408  /*
1409  Property: Get name of currently loaded file
1410  \param pVal name of file
1411  \return HRESULT
1412  */
1413  STDMETHOD(get_Filename)(/*[out, retval]*/ BSTR *pVal);
1414 
1415  /*
1416  Property: Set name of file for download
1417  \param newVal name of file
1418  \return HRESULT
1419  */
1420  STDMETHOD(put_Filename)(/*[in]*/ BSTR newVal);
1421 
1422  /*
1423  Property: Sets if we flush the model before loading a new one with
1424  put_Filename or put_LocalFilename.
1425  \param newVal true if we want to flush the model (default). false if
1426  we want to leave the geometry in the model when loading a new model.
1427  \return HRESULT
1428  */
1429  STDMETHOD(put_FlushOnLoad)(/*[in]*/ BOOL newVal);
1430 
1431  /*
1432  Property: Gets if we flush the model before loading a new one with
1433  put_Filename or put_LocalFilename.
1434  \param newVal true if we want to flush the model (default). false if
1435  we want to leave the geometry in the model when loading a new model.
1436  \return HRESULT
1437  */
1438  STDMETHOD(get_FlushOnLoad)(/*[out, retval]*/ BOOL *pVal);
1439 
1440  /*
1441  Property: Sets model structure filter used to limit selection to parent entities
1442  \param newVal Name of entity
1443  \return HRESULT
1444  */
1445  STDMETHOD(put_ModelStructureFilter)(/*[in]*/ BSTR newVal);
1446 
1447  /*
1448  Property: Get State of Control in progress state
1449  \param pVal true = control window is visible, false = control window is not visible
1450  \return HRESULT
1451  */
1452  STDMETHOD(get_ControlActive)(/*[out, retval]*/ BOOL *pVal);
1453  /*
1454  Property: Get State of Control in progress state
1455  \param pVal true = control window is visible, false = control window is not visible
1456  \return HRESULT
1457  */
1458  STDMETHOD(get_IsPlaying)(/*[out, retval]*/ BOOL *pVal);
1459 
1464  STDMETHOD (BhvActivateAllAnimations)();
1469  STDMETHOD (BhvDeactivateAllAnimations)();
1476  STDMETHOD (BhvActivateAnimation)(BSTR animationname, BOOL allowPartial);
1483  STDMETHOD (BhvDeactivateAnimation)(BSTR animationname, BOOL allowPartial);
1489  STDMETHOD (BhvStartAnimation)(BSTR animationname);
1495  STDMETHOD (BhvStopAnimation)(BSTR animationname);
1501  STDMETHOD (BhvRewindAnimation)(BSTR animationname);
1502 
1503 
1509  STDMETHOD(BhvSetInfinitePlay)(BOOL onoff);
1510 
1511 
1512 
1513 
1518  STDMETHOD(ConfigureFromFile)();
1519 
1523  HWND Create( HWND hWndParent, RECT& rcPos, LPCTSTR szWindowName = NULL, DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPED, DWORD dwExStyle = 0, UINT nID = 0 );
1524 
1525 // IViewObjectEx
1526  DECLARE_VIEW_STATUS(VIEWSTATUS_SOLIDBKGND | VIEWSTATUS_OPAQUE)
1527 
1528 
1529 
1530 
1531 
1532 
1537  HRESULT OnDraw(ATL_DRAWINFO& di);
1538 
1547  bool GetConfigProperty(char *tagname, char *propertyname, char *result, vlist_s *configurationlist = 0);
1553  HUtilityXMLTag * GetConfigTag(char *tagname);
1554 
1555 
1556 
1563  bool ReadConfigFile(char *ConfigFile, struct vlist_s *ConfigurationList);
1564 
1565 
1570  HCtrlView* GetHoopsView();
1571 
1578  static void ConvertToChar(char *mbstr, const wchar_t *wcstr, size_t count);
1585  static void ConvertToBSTR(wchar_t *wcstr, const char *mbstr, size_t count) ;
1590  bool RestoreCamera();
1595  void Set2dModel(bool modeltype);
1601  void SetNoOrbit(bool noorbit);
1602 
1607  CDataLoader * GetDataLoader() { return m_pDataLoader; }
1608 
1609 
1610  /*
1611  Registry "Patch" Function that ensures IDL file gets correctly processed
1612  */
1613  static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
1614  {
1615  _ATL_REGMAP_ENTRY entries[3];
1616 
1617 
1618 
1619  wchar_t key1[256];
1620  wchar_t data1[256];
1621  wchar_t key2[256];
1622  wchar_t data2[256];
1623 
1624  FixGuid("CLSIDCTRLCLASS", CLSID_HOOPS3DSTREAMCTRL_CLASS, key1, data1);
1625  FixGuid("CLSIDTYPELIB", CLSID_HOOPS3DSTREAMCTRL_TYPELIB, key2, data2);
1626 
1627  entries[0].szKey = key1;
1628  entries[0].szData = data1;
1629  entries[1].szKey = key2;
1630  entries[1].szData = data2;
1631  entries[2].szKey = 0;
1632  entries[2].szData = 0;
1633 
1634  _Module.UpdateRegistryFromResource(IDR_Hoops3dStreamCTRL,
1635  bRegister, entries);
1636 
1637  return 1;
1638  }
1639 
1640 
1648  HRESULT ShowFileDialog(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0);
1656  static HRESULT ShowFileDialog2(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0);
1657 
1665  static HRESULT ShowFileSaveDialog(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0);
1666 
1667  /* XML Read Callback */
1668  static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
1669 
1674  void SerializeConfiguration();
1675 
1676 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1677 
1678 
1679  /*
1680  Overloaded Internal Method
1681  */
1682  STDMETHOD(UIDeactivate)(void)
1683  {
1684  SendOnDataChange();
1685  IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>::UIDeactivate();
1686  return S_OK;
1687  }
1688 
1689 
1690  /*
1691  Overloaded Internal Method
1692  */
1693  STDMETHOD(InPlaceDeactivate)(void)
1694  {
1695  SendOnDataChange();
1696  CComPtr<IOleInPlaceObject> pIPO;
1697  ControlQueryInterface(__uuidof(IOleInPlaceObject), (void**)&pIPO);
1698  if (pIPO)
1699  IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>::InPlaceDeactivate();
1700  else
1701  {
1702  // based off of:
1703  // inline HRESULT CComControlBase::IOleInPlaceObject_InPlaceDeactivate(void)
1704 
1705  m_bInPlaceActive = FALSE;
1706 
1707  // if we have a window, tell it to go away.
1708  //
1709  if (m_hWndCD)
1710  {
1711  //ATLTRACE(atlTraceControls,2,_T("Destroying Window\n"));
1712  if (::IsWindow(m_hWndCD))
1713  DestroyWindow();
1714  m_hWndCD = NULL;
1715  }
1716 
1717  if (m_spInPlaceSite)
1718  m_spInPlaceSite->OnInPlaceDeactivate();
1719  }
1720  return S_OK;
1721  }
1722 
1723  STDMETHOD(Close)(DWORD dwSaveOption)
1724  {
1725  CComPtr<IOleInPlaceObject> pIPO;
1726  ControlQueryInterface(__uuidof(IOleInPlaceObject), (void**)&pIPO);
1727  if (pIPO)
1728  return IOleObjectImpl<CHoops3dStreamCtrl>::Close(dwSaveOption);
1729  else
1730  {
1731  // based off of:
1732  // inline HRESULT CComControlBase::IOleObject_Close(DWORD dwSaveOption)
1733 
1734  // handle the save flag.
1735  //
1736  if ((dwSaveOption == OLECLOSE_SAVEIFDIRTY ||
1737  dwSaveOption == OLECLOSE_PROMPTSAVE) && m_bRequiresSave)
1738  {
1739  if (m_spClientSite)
1740  m_spClientSite->SaveObject();
1741  SendOnSave();
1742  }
1743 
1744  m_spInPlaceSite.Release();
1745  m_bNegotiatedWnd = FALSE;
1746  m_bWndLess = FALSE;
1747  m_bInPlaceSiteEx = FALSE;
1748  m_spAdviseSink.Release();
1749  return S_OK;
1750  }
1751  return S_OK;
1752  }
1753  LRESULT OnInputLangChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1754  LRESULT OnInputLangChangeRequest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1755  LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1756  LRESULT OnLButtonDblClk(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1757  LRESULT OnLButtonUP(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1758  LRESULT OnRButtonUP(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1759  LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1760  LRESULT OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1761  LRESULT OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1762  LRESULT OnRButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1763  LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1764  LRESULT OnKeyUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1765  LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1766  LRESULT OnOrbit(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1767  LRESULT OnFileOpen(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1768  LRESULT OnZoom(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1769  LRESULT OnPan(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1770  LRESULT OnReset(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1771  LRESULT OnWindowColor(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1772  LRESULT OnZoomWindow(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1773  LRESULT OnSmoothTransition(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1774  LRESULT OnToolsVisibilityText(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1775  LRESULT OnToolsVisibilityLines(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1776  LRESULT OnToolsVisibilityFaces(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1777  LRESULT OnAnnotate(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1778  LRESULT OnAddNote(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1779  LRESULT OnRedline(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1780  LRESULT OnSmoothShaded(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1781  LRESULT OnFlatShaded(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1782  LRESULT OnWireframe(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1783  LRESULT OnHiddenLine(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1784  LRESULT OnShadowSmooth(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1785 
1786  LRESULT OnPrint(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1787  LRESULT OnCopy(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1788  LRESULT OnAboutBox(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1789  LRESULT OnExitMenuLoop(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1790  LRESULT OnBhvPlay(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1791  LRESULT OnBhvPause(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1792  LRESULT OnBhvRewind(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
1793  LRESULT OnXMLParsingComplete(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1794 
1795 
1796  HRESULT IPersistStreamInit_Load(LPSTREAM pStm, const ATL_PROPMAP_ENTRY* pMap);
1797  HRESULT IPersistStreamInit_Save(LPSTREAM pStm, BOOL fClearDirty, const ATL_PROPMAP_ENTRY* pMap);
1798 
1799  bool FullyQualifyUrl (char *urlname);
1800  bool FullyQualifyUnicodeUrl (BSTR urlname);
1801  bool BreakUrl ( const char * urlname,
1802  char * scheme,
1803  char * hostname,
1804  char * path,
1805  bool & bIsLocalFile);
1806  bool BreakUnicodeUrl ( const wchar_t * urlname,
1807  wchar_t * scheme,
1808  wchar_t * hostname,
1809  wchar_t * path,
1810  bool & bIsLocalFile);
1811 
1812 #endif
1813 
1814 protected:
1815 
1816  /*
1817  Property: Set name of file for loading from local disk
1818  \param newVal name of file
1819  \return HRESULT
1820  */
1821  STDMETHOD(put_LocalFilename)(/*[in]*/ BSTR newVal);
1822 
1823  struct vlist_s* m_ConfigurationList;
1830  struct vlist_s* m_FileTypeList;
1839  BSTR m_Filename;
1841  bool m_bEmbed;
1843  bool m_bNoOrbit;
1846  void DrawToMetafile (HWND hWnd, HDC hDC);
1847  void WriteFileToArchive (LPSTREAM pStm);
1848  void ReadFileFromArchive (LPSTREAM pStm);
1849  void InitModel();
1850  void StartDownload();
1851  void OnData (CBindStatusCallback<CHoops3dStreamCtrl>* pbsc, BYTE* pBytes, DWORD dwSize);
1852  void LocalSetOperator(HBaseOperator * NewOperator);
1854  bool SaveFile( LPCTSTR csFilePathName );
1855  bool Print();
1868  void GetPointArrayFromVariant(VARIANT * varKeys, HPoint **array, int &length);
1875  void GetFloatArrayFromVariant(VARIANT * varKeys, float **array, int &length);
1882  void GetByteArrayFromVariant(VARIANT * varKeys, char **array, int &length);
1891  void GetArrayFromVariant(VARIANT * varKeys, float **arrayfloat, int **arrayint, char **arraychar, int &length);
1899  void GetArrayFromVariant2(VARIANT * varKeys, void **ret_array, char *type, int &length);
1906  void GetIntegerArrayFromVariant(VARIANT * varKeys, int **arrayint, int &length);
1907 
1914  void GetShortArrayFromVariant(VARIANT * varKeys, short **arrayshort, int &length);
1915 
1916 
1917 
1918  // MVO event handlers
1919  /*
1920  Selection Event
1921  */
1922  static bool signal_selected(int signal, void *signal_data, void *user_data);
1923  /*
1924  Selection handler
1925  */
1926  bool OnSignalSelected();
1927 
1928  /*
1929  Deselect All Event
1930  */
1931  static bool signal_deselected_all(int signal, void *signal_data, void *user_data);
1932  /*
1933  Deselect All handler
1934  */
1935  bool OnSignalDeSelectedAll();
1936 
1937  /*
1938  Creates and realizes a Windows palette
1939  */
1940  void MakePalette();
1941 
1942 
1943 private:
1944 
1945  bool m_text;
1946  bool m_lines;
1947  bool m_faces;
1948  FramerateMode m_FramerateType;
1949  HPALETTE m_pPalette;
1950  HC_KEY m_activelayerkeys[NUM_MARKUP_LAYERS];
1951  int m_cx, m_cy;
1952  HPoint m_camPosition, m_camTarget, m_camUp;
1953  HPoint m_window_top_color, m_window_bottom_color, m_ambient_color;
1954  float m_camWidth, m_camHeight;
1955  char m_camProjection[256];
1956  bool m_bCameraRestored;
1957  IWebBrowserApp * m_pInternetExplorer;
1958  static void FixGuid(char *in1, char *in2, wchar_t *out1, wchar_t *out2);
1959  unsigned long MapFlags( unsigned long state );
1960  bool OperatorStarted();
1961  bool IsVisible(char *geom);
1962  bool ContainerIsIE (void);
1963  bool m_bJustCreated;
1964  TCHAR stemp[4096];
1965  char ctemp[4096];
1966  char m_DriverType[4096];
1967  char m_TransparencyOptions[4096];
1968  char m_ConfigFile[4096];
1969  char m_DefaultConfigFile[4096];
1970  AxisMode m_StoredAxisMode;
1971  long m_CookieSelected; // cookie for HSignalSelected signal subscription
1972  long m_CookieDeSelectedAll; // cookie for HSignalDeSelectedAll signal subscription
1973  bool m_bContinuousPlay;
1974  bool m_bFirstRun;
1975  bool m_bShadowMode;
1976  bool m_bDataNavigatorMode;
1977  HC_KEY LastKey; // stores the key of the last object inserted
1978  char String1[4096]; // stores a return string
1979  char String2[4096]; // stores a return string
1980  char String3[4096]; // stores a return string
1981  int Int1; // stores a return int
1982  bool m_bFlushOnLoad;
1983  bool m_bFileOpenActive;
1984  bool m_bSegmentDL;
1985  bool m_bStaticModel;
1986  int m_AntialiasingLevel;
1987  int m_CullingThreshold;
1988  int m_MaximumThreshold;
1989  float m_FrameRate;
1990  LRESULT OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1991 
1992  LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
1993  {
1994  if (!m_pView)
1995  DefWindowProc(uMsg, wParam, lParam);
1996  return 0;
1997  }
1998  LRESULT OnToolsOptimizemodel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
1999  LRESULT OnToolsSaveas(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
2000 
2001  static HHOOK hHook;
2002  static bool menuActive;
2003 
2004  static void create_mouse_hook(HINSTANCE hinst);
2005  static LRESULT CALLBACK mouse_hook_callback(int code,WPARAM wParam, LPARAM lParam);
2006  static void set_menu_active(bool active);
2007 };
2008 
2009 
2010 
2011 
2012 
2015 {
2016 
2017 private:
2018 
2019  CHoops3dStreamCtrl * m_pControl;
2020 
2021 public:
2022 
2024  TK_Custom_Bounding(unsigned char opcode, CHoops3dStreamCtrl * pCtrl) : HTK_Bounding(opcode) { m_pControl = pCtrl; }
2025 
2026  TK_Status Execute (BStreamFileToolkit & tk);
2028 };
2029 
2030 
2031 
2032 
2033 
2034 
2035 #endif //__Hoops3dStreamCTRL_H_
BSTR m_Filename
Definition: Hoops3dStreamCtrl.h:1839
bool m_bEmbed
Definition: Hoops3dStreamCtrl.h:1841
HCtrlDB * m_pHDB
Definition: Hoops3dStreamCtrl.h:1826
FramerateMode
Custom HTK_Bounding class. Used to correctly setup camera for stream file processing.
Definition: Hoops3dStreamCtrl.h:2014
TK_Custom_Bounding(unsigned char opcode, CHoops3dStreamCtrl *pCtrl)
Definition: Hoops3dStreamCtrl.h:2024
bool m_bUseAntialiasing
Definition: Hoops3dStreamCtrl.h:1835
bool m_bFastPrint
Definition: Hoops3dStreamCtrl.h:1834
bool m_bIs2dModel
Definition: Hoops3dStreamCtrl.h:1842
bool m_bClipboardTruecolor
Definition: Hoops3dStreamCtrl.h:1838
bool m_bAllowEntitySelection
Definition: Hoops3dStreamCtrl.h:1857
A HOOPS/ATL specific implmentation of the HOOPS/MVO HDB class.
Definition: HCtrlDB.h:27
CDataLoader * GetDataLoader()
Definition: Hoops3dStreamCtrl.h:1607
HBaseModel * m_pModel
Definition: Hoops3dStreamCtrl.h:1827
bool m_bUseHardwareAntialiasing
Definition: Hoops3dStreamCtrl.h:1836
The CHoops3dStreamCtrl is the primary HOOPS ATL Control class.
Definition: Hoops3dStreamCtrl.h:68
struct vlist_s * m_ConfigurationList
Definition: Hoops3dStreamCtrl.h:1823
The CDataLoader class provides support for loading a file in a piecwise fashion (streaming) ...
Definition: DataLoader.h:55
HCtrlView * m_pView
Definition: Hoops3dStreamCtrl.h:1825
int m_MetafileType
Definition: Hoops3dStreamCtrl.h:1837
bool m_bAllowMenu
Definition: Hoops3dStreamCtrl.h:1844
bool m_bSoftwareRendering
Definition: Hoops3dStreamCtrl.h:1833
bool m_bMetaPrint
Definition: Hoops3dStreamCtrl.h:1832
A HOOPS/ActiveX specific implmentation of the HOOPS/MVO HBaseView class.
Definition: HCtrlView.h:32
TK_Status
bool m_bNoOrbit
Definition: Hoops3dStreamCtrl.h:1843
int m_iPrintFlag
Definition: Hoops3dStreamCtrl.h:1858
struct vlist_s * m_FileTypeList
Definition: Hoops3dStreamCtrl.h:1830
AxisMode
bool m_bFilenameChanged
Definition: Hoops3dStreamCtrl.h:1840
Definition: Hoops3dStream.idl:36
CDataLoader * m_pDataLoader
Definition: Hoops3dStreamCtrl.h:1828