Alphabetical Class Index   Compound Members   File List  

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