00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc. 00002 // 00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., 00004 // and considered a trade secret as defined under civil and criminal statutes. 00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of 00006 // unauthorized use or misappropriation of its trade secrets. Use of this information 00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under 00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use. 00009 00010 #ifndef __Hoops3dStreamCTRL_H_ 00011 #define __Hoops3dStreamCTRL_H_ 00012 00013 #include "resource.h" // main symbols 00014 #include <atlctl.h> 00015 #include "Hoops3dStream.h" 00016 #include "HUtility.h" 00017 #include "HBaseView.h" 00018 00019 #include "HStream.h" 00020 #include "HOpcodeHandler.h" 00021 #include "guidlist.h" 00022 #include "Vector" 00023 #include "Hoops3dStreamCtrlEvents.h" 00024 using namespace std; 00025 00026 class HBaseModel; 00027 class HCtrlView; 00028 class HCtrlDB; 00029 class HBaseOperator; 00030 class CDataLoader; 00031 class HUtilityXMLTag; 00032 00033 #define WM_XML_PARSING_COMPLETE WM_USER+0x100 00034 00035 struct IWebBrowserApp; 00036 00037 // msw driver options debug 00038 #define DEBUG_NO_WINDOWS_HOOK 0x00000040 00039 #define DEBUG_FORCE_FULL_COLOR 0x00000010 00040 #define DEBUG_SFB_COPY_TO_CLIPBOARD 0x00004000 00041 #define DEBUG_PRINTING_MODE 0x00040000 00042 #define DEBUG_CLIPBOARD_MODE 0x00080000 00043 #define DEBUG_PRINT_NOT_FRAMEBUFFER_MODE 0x00020000 00044 #define DEBUG_PRINT_NOT_RASTER_REDUCTION 0x00200000 00045 00046 #define NUM_MARKUP_LAYERS 5 00047 00048 #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) 00049 #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) 00050 00051 // rendering options debug 00052 #define DEBUG_NO_PAINTERS_PANELLING 0x00000008 00053 00054 #define TOGGLE_OFF(x) if(uMsg == WM_PAINT) x=0; 00055 00056 #define WMF 0 00057 #define EMF 1 00058 00059 00061 00068 class ATL_NO_VTABLE CHoops3dStreamCtrl : 00069 public CComObjectRootEx<CComSingleThreadModel>, 00070 public CStockPropImpl<CHoops3dStreamCtrl, IHoops3dStreamCtrl, &IID_IHoops3dStreamCtrl, &LIBID_Hoops3dStreamLib>, 00071 public CComControl<CHoops3dStreamCtrl>, 00072 public IPersistStreamInitImpl<CHoops3dStreamCtrl>, 00073 public IOleControlImpl<CHoops3dStreamCtrl>, 00074 public IOleObjectImpl<CHoops3dStreamCtrl>, 00075 public IOleInPlaceActiveObjectImpl<CHoops3dStreamCtrl>, 00076 public IViewObjectExImpl<CHoops3dStreamCtrl>, 00077 public IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>, 00078 public IConnectionPointContainerImpl<CHoops3dStreamCtrl>, 00079 public IPersistStorageImpl<CHoops3dStreamCtrl>, 00080 public ISpecifyPropertyPagesImpl<CHoops3dStreamCtrl>, 00081 public IQuickActivateImpl<CHoops3dStreamCtrl>, 00082 public IDataObjectImpl<CHoops3dStreamCtrl>, 00083 public IProvideClassInfo2Impl<&CLSID_Hoops3dStreamCtrl, &DIID__IHoops3dStreamCtrlEvents, &LIBID_Hoops3dStreamLib>, 00084 public IPropertyNotifySinkCP<CHoops3dStreamCtrl>, 00085 public IPersistPropertyBagImpl<CHoops3dStreamCtrl>, 00086 public CComCoClass<CHoops3dStreamCtrl, &CLSID_Hoops3dStreamCtrl>, 00087 public CProxy_IHoops3dStreamCtrlEvents< CHoops3dStreamCtrl > 00088 { 00089 public: 00090 00091 CHoops3dStreamCtrl(); 00092 ~CHoops3dStreamCtrl(); 00093 00094 00095 DECLARE_PROTECT_FINAL_CONSTRUCT() 00096 00097 BEGIN_COM_MAP(CHoops3dStreamCtrl) 00098 COM_INTERFACE_ENTRY(IHoops3dStreamCtrl) 00099 COM_INTERFACE_ENTRY(IDispatch) 00100 COM_INTERFACE_ENTRY(IViewObjectEx) 00101 COM_INTERFACE_ENTRY(IViewObject2) 00102 COM_INTERFACE_ENTRY(IViewObject) 00103 COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless) 00104 COM_INTERFACE_ENTRY(IOleInPlaceObject) 00105 COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless) 00106 COM_INTERFACE_ENTRY(IOleInPlaceActiveObject) 00107 COM_INTERFACE_ENTRY(IOleControl) 00108 COM_INTERFACE_ENTRY(IOleObject) 00109 COM_INTERFACE_ENTRY(IPersistStreamInit) 00110 COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit) 00111 COM_INTERFACE_ENTRY(IConnectionPointContainer) 00112 COM_INTERFACE_ENTRY(ISpecifyPropertyPages) 00113 COM_INTERFACE_ENTRY(IQuickActivate) 00114 COM_INTERFACE_ENTRY(IPersistStorage) 00115 COM_INTERFACE_ENTRY(IDataObject) 00116 COM_INTERFACE_ENTRY(IProvideClassInfo) 00117 COM_INTERFACE_ENTRY(IProvideClassInfo2) 00118 COM_INTERFACE_ENTRY_IMPL(IPersistPropertyBag) 00119 COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer) 00120 END_COM_MAP() 00121 00122 BEGIN_PROP_MAP(CHoops3dStreamCtrl) 00123 PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4) 00124 PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4) 00125 PROP_ENTRY_TYPE("BackColor", DISPID_BACKCOLOR, CLSID_NULL, VT_COLOR) 00126 PROP_ENTRY_TYPE("Filename",1, CLSID_Hoops3dStreamProperty, VT_BSTR) 00127 PROP_ENTRY_TYPE("Antialiasing",68, CLSID_Hoops3dStreamProperty, VT_BOOL) 00128 PROP_ENTRY_TYPE("FileType",33, CLSID_Hoops3dStreamProperty, VT_BSTR) 00129 PROP_ENTRY_TYPE("AllowMenu",69, CLSID_Hoops3dStreamProperty, VT_BOOL) 00130 PROP_ENTRY_TYPE("HardwareAntialiasing",73, CLSID_Hoops3dStreamProperty, VT_BOOL) 00131 PROP_ENTRY_TYPE("AxisMode",74, CLSID_Hoops3dStreamProperty, VT_BOOL) 00132 PROP_ENTRY_TYPE("AllowEntitySelection",110, CLSID_Hoops3dStreamProperty, VT_BOOL) 00133 PROP_ENTRY_TYPE("BhvContinuousPlay",112, CLSID_Hoops3dStreamProperty, VT_BOOL) 00134 PROP_ENTRY_TYPE("ConfigFile",129, CLSID_Hoops3dStreamProperty, VT_BSTR) 00135 PROP_ENTRY_TYPE("DefaultConfigFile",146, CLSID_Hoops3dStreamProperty, VT_BSTR) 00136 PROP_ENTRY_TYPE("Key",138, CLSID_Hoops3dStreamProperty, VT_INT) 00137 PROP_ENTRY_TYPE("String1",139, CLSID_Hoops3dStreamProperty, VT_BSTR) 00138 PROP_ENTRY_TYPE("String2",140, CLSID_Hoops3dStreamProperty, VT_BSTR) 00139 PROP_ENTRY_TYPE("String3",141, CLSID_Hoops3dStreamProperty, VT_BSTR) 00140 PROP_ENTRY_TYPE("Int1",142, CLSID_Hoops3dStreamProperty, VT_INT) 00141 PROP_ENTRY_TYPE("SegmentDL",132, CLSID_Hoops3dStreamProperty, VT_BOOL) 00142 PROP_ENTRY_TYPE("DriverType",145, CLSID_Hoops3dStreamProperty, VT_BSTR) 00143 PROP_ENTRY_TYPE("TransparencyOptions",152, CLSID_Hoops3dStreamProperty, VT_BSTR) 00144 PROP_ENTRY_TYPE("AntialiasingLevel",148, CLSID_Hoops3dStreamProperty, VT_INT) 00145 PROP_ENTRY_TYPE("CullingThreshold",149, CLSID_Hoops3dStreamProperty, VT_INT) 00146 PROP_ENTRY_TYPE("MaximumThreshold",151, CLSID_Hoops3dStreamProperty, VT_INT) 00147 PROP_ENTRY_TYPE("FrameRate",150, CLSID_Hoops3dStreamProperty, VT_DECIMAL) 00148 PROP_ENTRY_TYPE("FramerateType",144, CLSID_Hoops3dStreamProperty, VT_BSTR) 00149 PROP_ENTRY_TYPE("StaticModel",147, CLSID_Hoops3dStreamProperty, VT_BOOL) 00150 PROP_ENTRY_TYPE("AntialiasingLevel",148, CLSID_Hoops3dStreamProperty, VT_INT) 00151 PROP_PAGE(CLSID_Hoops3dStreamProperty) 00152 END_PROP_MAP() 00153 00154 BEGIN_CONNECTION_POINT_MAP(CHoops3dStreamCtrl) 00155 CONNECTION_POINT_ENTRY(IID_IPropertyNotifySink) 00156 CONNECTION_POINT_ENTRY(DIID__IHoops3dStreamCtrlEvents) 00157 END_CONNECTION_POINT_MAP() 00158 00159 BEGIN_MSG_MAP(CHoops3dStreamCtrl) 00160 /*if we are drawing to screen, disable print flag (only for WM_PAINT messages!) 00161 *the CHoops3dStreamCtrl::OnDraw() function will turn the flag back on 00162 */ 00163 TOGGLE_OFF(m_iPrintFlag); 00164 COMMAND_ID_HANDLER(ID_TOOLS_OPTIMIZEMODEL, OnToolsOptimizemodel) 00165 COMMAND_ID_HANDLER(ID_TOOLS_SAVEAS, OnToolsSaveas) 00166 CHAIN_MSG_MAP(CComControl<CHoops3dStreamCtrl>) 00167 DEFAULT_REFLECTION_HANDLER() 00168 MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) 00169 MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClk) 00170 MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUP) 00171 MESSAGE_HANDLER(WM_LBUTTONUP, OnRButtonUP) 00172 MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove) 00173 MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate) 00174 MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown) 00175 MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel) 00176 MESSAGE_HANDLER(WM_INPUTLANGCHANGE, OnInputLangChange) 00177 MESSAGE_HANDLER(WM_INPUTLANGCHANGEREQUEST, OnInputLangChangeRequest) 00178 COMMAND_ID_HANDLER(ID_FILEOPEN,OnFileOpen) 00179 COMMAND_ID_HANDLER(ID_ORBIT,OnOrbit) 00180 COMMAND_ID_HANDLER(ID_WINDOW_COLOR,OnWindowColor) 00181 COMMAND_ID_HANDLER(ID_ZOOM_DIRECT,OnZoom) 00182 COMMAND_ID_HANDLER(ID_PAN,OnPan) 00183 COMMAND_ID_HANDLER(ID_RESET,OnReset) 00184 COMMAND_ID_HANDLER(ID_ZOOM_WINDOW,OnZoomWindow) 00185 COMMAND_ID_HANDLER(ID_TOOLS_SMOOTHTRANSITION,OnSmoothTransition) 00186 COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_TEXT,OnToolsVisibilityText) 00187 COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_LINES,OnToolsVisibilityLines) 00188 COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_FACES,OnToolsVisibilityFaces) 00189 COMMAND_ID_HANDLER(ID_ANNOTATE,OnAnnotate) 00190 COMMAND_ID_HANDLER(ID_ADDNOTE,OnAddNote) 00191 COMMAND_ID_HANDLER(ID_TOOLS_REDLINE,OnRedline) 00192 COMMAND_ID_HANDLER(ID_SMOOTH_SHADED,OnSmoothShaded) 00193 COMMAND_ID_HANDLER(ID_FLAT_SHADED,OnFlatShaded) 00194 COMMAND_ID_HANDLER(ID_WIREFRAME,OnWireframe) 00195 COMMAND_ID_HANDLER(ID_HIDDEN_LINE,OnHiddenLine) 00196 COMMAND_ID_HANDLER(ID_SHADOW_SMOOTH,OnShadowSmooth) 00197 COMMAND_ID_HANDLER(ID_PRINT,OnPrint) 00198 COMMAND_ID_HANDLER(ID_COPY,OnCopy) 00199 COMMAND_ID_HANDLER(ID_ABOUT_BOX,OnAboutBox) 00200 00201 COMMAND_ID_HANDLER(ID_BHV_PLAY,OnBhvPlay) 00202 COMMAND_ID_HANDLER(ID_BHV_PAUSE,OnBhvPause) 00203 COMMAND_ID_HANDLER(ID_BHV_REWIND,OnBhvRewind) 00204 00205 MESSAGE_HANDLER(WM_TIMER, OnTimer) 00206 MESSAGE_HANDLER(WM_KEYUP, OnKeyUp) 00207 MESSAGE_HANDLER(WM_DESTROY, OnDestroy) 00208 MESSAGE_HANDLER(WM_EXITMENULOOP, OnExitMenuLoop) 00209 MESSAGE_HANDLER(WM_CHAR, OnChar) 00210 MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd) 00211 MESSAGE_HANDLER(WM_XML_PARSING_COMPLETE, OnXMLParsingComplete) 00212 00213 END_MSG_MAP() 00214 00215 BEGIN_CATEGORY_MAP(CHoops3dStreamCtrl) 00216 IMPLEMENTED_CATEGORY(CATID_SafeForScripting) 00217 IMPLEMENTED_CATEGORY(CATID_SafeForInitializing) 00218 END_CATEGORY_MAP() 00219 00220 00221 00222 // IHoops3dStreamCtr 00223 00224 00225 /* Insert Functions */ 00226 00227 /* A wrapper for HOOPS/3dGS ::Insert_Circle */ 00228 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); 00229 00230 /* A wrapper for HOOPS/3dGS ::Insert_Circle_By_Radius */ 00231 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); 00232 00233 /* A wrapper for HOOPS/3dGS ::Insert_Circular_Arc */ 00234 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); 00235 00236 /* A wrapper for HOOPS/3dGS ::Insert_Circular_Chord */ 00237 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); 00238 00239 /* A wrapper for HOOPS/3dGS ::Insert_Circular_Wedge */ 00240 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); 00241 00242 /* A wrapper for HOOPS/3dGS ::Insert_Cutting_Plane */ 00243 STDMETHOD(HATL_Insert_Cutting_Plane)(float a, float b, float c, float d, /*[out, retval]*/HC_KEY *retkey); 00244 00245 /* A wrapper for HOOPS/3dGS ::Insert_Cutting_Section */ 00246 STDMETHOD(HATL_Insert_Cutting_Section)(int count, VARIANT *planes_var, /*[out, retval]*/HC_KEY *retkey); 00247 00248 /* A wrapper for HOOPS/3dGS ::Insert_Cylinder */ 00249 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); 00250 00251 /* A wrapper for HOOPS/3dGS ::Insert_Ellipse */ 00252 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); 00253 00254 /* A wrapper for HOOPS/3dGS ::Insert_Elliptical_Arc */ 00255 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); 00256 00257 /* A wrapper for HOOPS/3dGS ::Insert_Grid */ 00258 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); 00259 00260 /* A wrapper for HOOPS/3dGS ::Insert_Image */ 00261 STDMETHOD(HATL_Insert_Image)(float x, float y, float z, BSTR format, int width, int height, VARIANT *pixeldata_var, /*[out, retval]*/HC_KEY *retkey); 00262 00263 /* A wrapper for HOOPS/3dGS ::Insert_Ink */ 00264 STDMETHOD(HATL_Insert_Ink)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey); 00265 00266 /* A wrapper for HOOPS/3dGS ::Insert_Line */ 00267 STDMETHOD(HATL_Insert_Line)(float xa, float ya, float za,float xb, float yb, float zb, /*[out, retval]*/HC_KEY *retkey); 00268 00269 /* A wrapper for HOOPS/3dGS ::Insert_Distant_Light */ 00270 STDMETHOD(HATL_Insert_Distant_Light)(float di, float dj, float dk, /*[out, retval]*/HC_KEY *retkey); 00271 00272 /* A wrapper for HOOPS/3dGS ::Insert_Local_Light */ 00273 STDMETHOD(HATL_Insert_Local_Light)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey); 00274 00275 /* A wrapper for HOOPS/3dGS ::Insert_Spot_Light */ 00276 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); 00277 00278 /* A wrapper for HOOPS/3dGS ::Insert_Marker */ 00279 STDMETHOD(HATL_Insert_Marker)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey); 00280 00281 /* A wrapper for HOOPS/3dGS ::Insert_Mesh */ 00282 STDMETHOD(HATL_Insert_Mesh)(int rows,int columns, VARIANT * points, /*[out, retval]*/HC_KEY *retkey); 00283 00284 /* A wrapper for HOOPS/3dGS ::Insert_NURBS_Curve */ 00285 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); 00286 00287 /* A wrapper for HOOPS/3dGS ::Insert_NURBS_Surface */ 00288 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); 00289 00290 /* A wrapper for HOOPS/3dGS ::Insert_Polycylinder */ 00291 STDMETHOD(HATL_Insert_Polycylinder)(int pcount, VARIANT * points_var, int r_count, VARIANT *radii_var, BSTR capping, /*[out, retval]*/HC_KEY *retkey); 00292 00293 /* A wrapper for HOOPS/3dGS ::Insert_Polygon */ 00294 STDMETHOD(HATL_Insert_Polygon)(int count, VARIANT *points_var, /*[out, retval]*/HC_KEY *retkey); 00295 00296 /* A wrapper for HOOPS/3dGS ::Insert_Polyline */ 00297 STDMETHOD(HATL_Insert_Polyline)(int count, VARIANT *points_var, /*[out, retval]*/HC_KEY *retkey); 00298 00299 /* A wrapper for HOOPS/3dGS ::Insert_Shell */ 00300 STDMETHOD(HATL_Insert_Shell)(int npoints, VARIANT * arr, int flen, VARIANT *arr2, /*[out, retval]*/HC_KEY *retkey); 00301 00302 /* A wrapper for HOOPS/3dGS ::Insert_Shell_By_Tristrips */ 00303 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); 00304 00305 /* A wrapper for HOOPS/3dGS ::Insert_Shell_From_Region */ 00306 STDMETHOD(HATL_Insert_Shell_From_Region)(HC_KEY key1, int region, BSTR options, /*[out, retval]*/HC_KEY *retkey); 00307 00308 /* A wrapper for HOOPS/3dGS ::Insert_Sphere */ 00309 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); 00310 00311 /* A wrapper for HOOPS/3dGS ::Insert_Text */ 00312 STDMETHOD(HATL_Insert_Text)(float x, float y, float z, BSTR text, /*[out, retval]*/HC_KEY *retkey); 00313 00314 /* A wrapper for HOOPS/3dGS ::Insert_Text_With_Encoding */ 00315 STDMETHOD(HATL_Insert_Text_With_Encoding)(float x, float y, float z, BSTR encoding, VARIANT *text, /*[out, retval]*/HC_KEY *retkey); 00316 00317 /* A wrapper for HOOPS/3dGS ::Insert_Unicode_Text */ 00318 STDMETHOD(HATL_Insert_Unicode_Text)(float x, float y, float z, VARIANT *text, /*[out, retval]*/HC_KEY *retkey); 00319 00320 00321 00322 /* Misc functions */ 00323 00324 /* A wrapper for HOOPS/3dGS ::Open_Segment */ 00325 STDMETHOD(HATL_Open_Segment)(BSTR segment, HC_KEY *retkey); 00326 00327 /* A wrapper for HOOPS/3dGS ::Close_Segment */ 00328 STDMETHOD(HATL_Close_Segment)(); 00329 00330 /* A wrapper for HOOPS/3dGS ::Open_Geometry */ 00331 STDMETHOD(HATL_Open_Geometry)(HC_KEY key); 00332 00333 /* A wrapper for HOOPS/3dGS ::Close_Geometry */ 00334 STDMETHOD(HATL_Close_Geometry)(); 00335 00336 /* A wrapper for HOOPS/3dGS ::Open_Face */ 00337 STDMETHOD(HATL_Open_Face)(int offset); 00338 00339 /* A wrapper for HOOPS/3dGS ::Close_Face */ 00340 STDMETHOD(HATL_Close_Face)(); 00341 00342 /* A wrapper for HOOPS/3dGS ::Open_Edge */ 00343 STDMETHOD(HATL_Open_Edge)(int offset1, int offset2); 00344 00345 /* A wrapper for HOOPS/3dGS ::Close_Edge */ 00346 STDMETHOD(HATL_Close_Edge)(); 00347 00348 /* A wrapper for HOOPS/3dGS ::Include_Segment */ 00349 STDMETHOD(HATL_Include_Segment)(BSTR segment, HC_KEY *retkey); 00350 00351 /* A wrapper for HOOPS/3dGS ::Delete_By_Key */ 00352 STDMETHOD(HATL_Delete_By_Key)(HC_KEY key); 00353 00354 /* A wrapper for HOOPS/3dGS ::Flush_Contents */ 00355 STDMETHOD(HATL_Flush_Contents)(BSTR segment, BSTR filter); 00356 00357 00358 00359 /* Set functions */ 00360 00361 /* A wrapper for HOOPS/3dGS ::Set_Camera */ 00362 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); 00363 00364 /* A wrapper for HOOPS/3dGS ::Set_Camera_By_Volume */ 00365 STDMETHOD(HATL_Set_Camera_By_Volume)(BSTR projection, float xmin, float xmax, float ymin, float ymax); 00366 00367 /* A wrapper for HOOPS/3dGS ::Set_Camera_Field */ 00368 STDMETHOD(HATL_Set_Camera_Field)(float width, float height); 00369 00370 /* A wrapper for HOOPS/3dGS ::Set_Camera_Near_Limit */ 00371 STDMETHOD(HATL_Set_Camera_Near_Limit)(float wlimit); 00372 00373 /* A wrapper for HOOPS/3dGS ::Set_Camera_Position */ 00374 STDMETHOD(HATL_Set_Camera_Position)(float p_x, float p_y, float p_z); 00375 00376 /* A wrapper for HOOPS/3dGS ::Set_Camera_Projection */ 00377 STDMETHOD(HATL_Set_Camera_Projection)(BSTR projection); 00378 00379 /* A wrapper for HOOPS/3dGS ::Set_Camera_Target */ 00380 STDMETHOD(HATL_Set_Camera_Target)(float t_x, float t_y, float t_z); 00381 00382 /* A wrapper for HOOPS/3dGS ::Set_Camera_Up_Vector */ 00383 STDMETHOD(HATL_Set_Camera_Up_Vector)(float u_x, float u_y, float u_z); 00384 00385 /* A wrapper for HOOPS/3dGS ::Set_Circular_Center */ 00386 STDMETHOD(HATL_Set_Circular_Center)(float x, float y, float z); 00387 00388 /* A wrapper for HOOPS/3dGS ::Set_Circular_Center_By_Key */ 00389 STDMETHOD(HATL_Set_Circular_Center_By_Key)(HC_KEY key, float x, float y, float z); 00390 00391 /* A wrapper for HOOPS/3dGS ::Set_Color */ 00392 STDMETHOD(HATL_Set_Color)(BSTR col); 00393 00394 /* A wrapper for HOOPS/3dGS ::Set_Color_By_FIndex */ 00395 STDMETHOD(HATL_Set_Color_By_FIndex)(BSTR types, float findex); 00396 00397 /* A wrapper for HOOPS/3dGS ::Set_Color_By_Index */ 00398 STDMETHOD(HATL_Set_Color_By_Index)(BSTR types, int index); 00399 00400 /* A wrapper for HOOPS/3dGS ::Set_Color_By_Value */ 00401 STDMETHOD(HATL_Set_Color_By_Value)(BSTR types, BSTR colspace, float a, float b, float c); 00402 00403 /* A wrapper for HOOPS/3dGS ::Set_Color_Map */ 00404 STDMETHOD(HATL_Set_Color_Map)(BSTR col); 00405 00406 /* A wrapper for HOOPS/3dGS ::Set_Color_Map_By_Value */ 00407 STDMETHOD(HATL_Set_Color_Map_By_Value)(BSTR col, int count, VARIANT *values_var); 00408 00409 /* A wrapper for HOOPS/3dGS ::Set_Conditions */ 00410 STDMETHOD(HATL_Set_Conditions)(BSTR conditions); 00411 00412 /* A wrapper for HOOPS/3dGS ::Set_Driver_Options */ 00413 STDMETHOD(HATL_Set_Driver_Options)(BSTR driver_options); 00414 00415 /* A wrapper for HOOPS/3dGS ::Set_Edge_Pattern */ 00416 STDMETHOD(HATL_Set_Edge_Pattern)(BSTR pattern); 00417 00418 /* A wrapper for HOOPS/3dGS ::Set_Edge_Weight */ 00419 STDMETHOD(HATL_Set_Edge_Weight)(float weight); 00420 00421 /* A wrapper for HOOPS/3dGS ::Set_Face_Pattern */ 00422 STDMETHOD(HATL_Set_Face_Pattern)(BSTR pattern); 00423 00424 /* A wrapper for HOOPS/3dGS ::Set_Faces */ 00425 STDMETHOD(HATL_Set_Faces)(int first_face, int face_count); 00426 00427 /* A wrapper for HOOPS/3dGS ::Set_Handedness */ 00428 STDMETHOD(HATL_Set_Handedness)(BSTR handedness); 00429 00430 /* A wrapper for HOOPS/3dGS ::Set_Heuristics */ 00431 STDMETHOD(HATL_Set_Heuristics)(BSTR heuristics); 00432 00433 /* A wrapper for HOOPS/3dGS ::Set_Line_Pattern */ 00434 STDMETHOD(HATL_Set_Line_Pattern)(BSTR pattern); 00435 00436 /* A wrapper for HOOPS/3dGS ::Set_Line_Weight */ 00437 STDMETHOD(HATL_Set_Line_Weight)(float weight); 00438 00439 /* A wrapper for HOOPS/3dGS ::Set_Marker_Size */ 00440 STDMETHOD(HATL_Set_Marker_Size)(float weight); 00441 00442 /* A wrapper for HOOPS/3dGS ::Set_Marker_Symbol */ 00443 STDMETHOD(HATL_Set_Marker_Symbol)(BSTR symbol); 00444 00445 /* A wrapper for HOOPS/3dGS ::Set_Modelling_Matrix */ 00446 STDMETHOD(HATL_Set_Modelling_Matrix)(VARIANT *matrix_var); 00447 00448 /* A wrapper for HOOPS/3dGS ::Set_Normal */ 00449 STDMETHOD(HATL_Set_Normal)(float x, float y, float z); 00450 00451 /* A wrapper for HOOPS/3dGS ::Set_Parameter */ 00452 STDMETHOD(HATL_Set_Parameter)(int number, VARIANT *parameters_var); 00453 00454 /* A wrapper for HOOPS/3dGS ::Set_Polygonal_Clip_Region */ 00455 STDMETHOD(HATL_Set_Polygonal_Clip_Region)(int count, VARIANT *points_var, BSTR options); 00456 00457 /* A wrapper for HOOPS/3dGS ::Set_Priority */ 00458 STDMETHOD(HATL_Set_Priority)(HC_KEY key, long priority); 00459 00460 /* A wrapper for HOOPS/3dGS ::Set_Region */ 00461 STDMETHOD(HATL_Set_Region)(int region); 00462 00463 /* A wrapper for HOOPS/3dGS ::Set_Rendering_Options */ 00464 STDMETHOD(HATL_Set_Rendering_Options)(BSTR rendering_options); 00465 00466 /* A wrapper for HOOPS/3dGS ::Set_Selectability */ 00467 STDMETHOD(HATL_Set_Selectability)(BSTR list); 00468 00469 /* A wrapper for HOOPS/3dGS ::Set_Streaming_Mode */ 00470 STDMETHOD(HATL_Set_Streaming_Mode)(BSTR flag); 00471 00472 /* A wrapper for HOOPS/3dGS ::Set_Text_Alignment */ 00473 STDMETHOD(HATL_Set_Text_Alignment)(BSTR locater); 00474 00475 /* A wrapper for HOOPS/3dGS ::Set_Text_Font */ 00476 STDMETHOD(HATL_Set_Text_Font)(BSTR text_font); 00477 00478 /* A wrapper for HOOPS/3dGS ::Set_Text_Path */ 00479 STDMETHOD(HATL_Set_Text_Path)(float x, float y, float z); 00480 00481 /* A wrapper for HOOPS/3dGS ::Set_Text_Region */ 00482 STDMETHOD(HATL_Set_Text_Region)(int pCount, VARIANT *points_var, BSTR options); 00483 00484 /* A wrapper for HOOPS/3dGS ::Set_Text_Spacing */ 00485 STDMETHOD(HATL_Set_Text_Spacing)(float spacing); 00486 00487 /* A wrapper for HOOPS/3dGS ::Set_Texture_Matrix */ 00488 STDMETHOD(HATL_Set_Texture_Matrix)(VARIANT *matrix_var); 00489 00490 /* A wrapper for HOOPS/3dGS ::Set_Trim_Operation */ 00491 STDMETHOD(HATL_Set_Trim_Operation)(int index, BSTR operation); 00492 00493 /* A wrapper for HOOPS/3dGS ::Set_Unicode_Options */ 00494 STDMETHOD(HATL_Set_Unicode_Options)(VARIANT *options_var); 00495 00496 /* A wrapper for HOOPS/3dGS ::Set_User_Index */ 00497 STDMETHOD(HATL_Set_User_Index)(int index, VARIANT *data_var); 00498 00499 /* A wrapper for HOOPS/3dGS ::Set_User_Options */ 00500 STDMETHOD(HATL_Set_User_Options)(BSTR list); 00501 00502 /* 00503 Method: ::Update_Display wrapper 00504 \return HRESULT 00505 */ 00506 STDMETHOD(Update)(); 00507 00508 /* A wrapper for HOOPS/3dGS ::Set_Visibility */ 00509 STDMETHOD(HATL_Set_Visibility)(BSTR vis); 00510 00511 /* A wrapper for HOOPS/3dGS ::Set_Variable_Edge_Weight */ 00512 STDMETHOD(HATL_Set_Variable_Edge_Weight)(BSTR weight); 00513 00514 /* A wrapper for HOOPS/3dGS ::Set_Variable_Line_Weight */ 00515 STDMETHOD(HATL_Set_Variable_Line_Weight)(BSTR weight); 00516 00517 /* A wrapper for HOOPS/3dGS ::Set_Variable_Marker_Size */ 00518 STDMETHOD(HATL_Set_Variable_Marker_Size)(BSTR weight); 00519 00520 /* A wrapper for HOOPS/3dGS ::Set_Window */ 00521 STDMETHOD(HATL_Set_Window)(float left, float right, float bottom, float top); 00522 00523 /* A wrapper for HOOPS/3dGS ::Set_Window_Frame */ 00524 STDMETHOD(HATL_Set_Window_Frame)(BSTR flag); 00525 00526 /* A wrapper for HOOPS/3dGS ::Set_Window_Pattern */ 00527 STDMETHOD(HATL_Set_Window_Pattern)(BSTR pattern); 00528 00529 00530 00531 /* Unset functions */ 00532 00533 /* A wrapper for HOOPS/3dGS ::UnSet_Camera */ 00534 STDMETHOD(HATL_UnSet_Camera)(); 00535 00536 /* A wrapper for HOOPS/3dGS ::UnSet_Color */ 00537 STDMETHOD(HATL_UnSet_Color)(); 00538 00539 /* A wrapper for HOOPS/3dGS ::UnSet_Color_Map */ 00540 STDMETHOD(HATL_UnSet_Color_Map)(); 00541 00542 /* A wrapper for HOOPS/3dGS ::UnSet_Driver_Options */ 00543 STDMETHOD(HATL_UnSet_Driver_Options)(); 00544 00545 /* A wrapper for HOOPS/3dGS ::UnSet_Edge_Pattern */ 00546 STDMETHOD(HATL_UnSet_Edge_Pattern)(); 00547 00548 /* A wrapper for HOOPS/3dGS ::UnSet_Edge_Weight */ 00549 STDMETHOD(HATL_UnSet_Edge_Weight)(); 00550 00551 /* A wrapper for HOOPS/3dGS ::UnSet_Face_Pattern */ 00552 STDMETHOD(HATL_UnSet_Face_Pattern)(); 00553 00554 /* A wrapper for HOOPS/3dGS ::UnSet_Handedness */ 00555 STDMETHOD(HATL_UnSet_Handedness)(); 00556 00557 /* A wrapper for HOOPS/3dGS ::UnSet_Heuristics */ 00558 STDMETHOD(HATL_UnSet_Heuristics)(); 00559 00560 /* A wrapper for HOOPS/3dGS ::UnSet_Line_Pattern */ 00561 STDMETHOD(HATL_UnSet_Line_Pattern)(); 00562 00563 /* A wrapper for HOOPS/3dGS ::UnSet_Line_Weight */ 00564 STDMETHOD(HATL_UnSet_Line_Weight)(); 00565 00566 /* A wrapper for HOOPS/3dGS ::UnSet_Marker_Size */ 00567 STDMETHOD(HATL_UnSet_Marker_Size)(); 00568 00569 /* A wrapper for HOOPS/3dGS ::UnSet_Marker_Symbol */ 00570 STDMETHOD(HATL_UnSet_Marker_Symbol)(); 00571 00572 /* A wrapper for HOOPS/3dGS ::UnSet_Modelling_Matrix */ 00573 STDMETHOD(HATL_UnSet_Modelling_Matrix)(); 00574 00575 /* A wrapper for HOOPS/3dGS ::UnSet_Normal */ 00576 STDMETHOD(HATL_UnSet_Normal)(); 00577 00578 /* A wrapper for HOOPS/3dGS ::UnSet_One_Color */ 00579 STDMETHOD(HATL_UnSet_One_Color)(BSTR which); 00580 00581 /* A wrapper for HOOPS/3dGS ::UnSet_One_Driver_Option */ 00582 STDMETHOD(HATL_UnSet_One_Driver_Option)(BSTR which); 00583 00584 /* A wrapper for HOOPS/3dGS ::UnSet_One_Heuristic */ 00585 STDMETHOD(HATL_UnSet_One_Heuristic)(BSTR which); 00586 00587 /* A wrapper for HOOPS/3dGS ::UnSet_One_Rendering_Option */ 00588 STDMETHOD(HATL_UnSet_One_Rendering_Option)(BSTR which); 00589 00590 /* A wrapper for HOOPS/3dGS ::UnSet_One_Selectability */ 00591 STDMETHOD(HATL_UnSet_One_Selectability)(BSTR which); 00592 00593 /* A wrapper for HOOPS/3dGS ::UnSet_One_Text_Font */ 00594 STDMETHOD(HATL_UnSet_One_Text_Font)(BSTR which); 00595 00596 /* A wrapper for HOOPS/3dGS ::UnSet_One_User_Index */ 00597 STDMETHOD(HATL_UnSet_One_User_Index)(long which); 00598 00599 /* A wrapper for HOOPS/3dGS ::UnSet_One_User_Option */ 00600 STDMETHOD(HATL_UnSet_One_User_Option)(BSTR which); 00601 00602 /* A wrapper for HOOPS/3dGS ::UnSet_One_Visibility */ 00603 STDMETHOD(HATL_UnSet_One_Visibility)(BSTR which); 00604 00605 /* A wrapper for HOOPS/3dGS ::UnSet_Parameter */ 00606 STDMETHOD(HATL_UnSet_Parameter)(); 00607 00608 /* A wrapper for HOOPS/3dGS ::UnSet_Rendering_Options */ 00609 STDMETHOD(HATL_UnSet_Rendering_Options)(); 00610 00611 /* A wrapper for HOOPS/3dGS ::UnSet_Selectability */ 00612 STDMETHOD(HATL_UnSet_Selectability)(); 00613 00614 /* A wrapper for HOOPS/3dGS ::UnSet_Streaming_Mode */ 00615 STDMETHOD(HATL_UnSet_Streaming_Mode)(); 00616 00617 /* A wrapper for HOOPS/3dGS ::UnSet_Text_Alignment */ 00618 STDMETHOD(HATL_UnSet_Text_Alignment)(); 00619 00620 /* A wrapper for HOOPS/3dGS ::UnSet_Text_Font */ 00621 STDMETHOD(HATL_UnSet_Text_Font)(); 00622 00623 /* A wrapper for HOOPS/3dGS ::UnSet_Text_Path */ 00624 STDMETHOD(HATL_UnSet_Text_Path)(); 00625 00626 /* A wrapper for HOOPS/3dGS ::UnSet_Text_Spacing */ 00627 STDMETHOD(HATL_UnSet_Text_Spacing)(); 00628 00629 /* A wrapper for HOOPS/3dGS ::UnSet_Texture_Matrix */ 00630 STDMETHOD(HATL_UnSet_Texture_Matrix)(); 00631 00632 /* A wrapper for HOOPS/3dGS ::UnSet_User_Options */ 00633 STDMETHOD(HATL_UnSet_User_Options)(); 00634 00635 /* A wrapper for HOOPS/3dGS ::UnSet_Visibility */ 00636 STDMETHOD(HATL_UnSet_Visibility)(); 00637 00638 /* A wrapper for HOOPS/3dGS ::UnSet_Window */ 00639 STDMETHOD(HATL_UnSet_Window)(); 00640 00641 /* A wrapper for HOOPS/3dGS ::UnSet_Window_Frame */ 00642 STDMETHOD(HATL_UnSet_Window_Frame)(); 00643 00644 /* A wrapper for HOOPS/3dGS ::UnSet_Window_Pattern */ 00645 STDMETHOD(HATL_UnSet_Window_Pattern)(); 00646 00647 00648 00649 /* Define functions */ 00650 00651 /* A wrapper for HOOPS/3dGS ::Define_Alias */ 00652 STDMETHOD(HATL_Define_Alias)(BSTR name, BSTR expansion); 00653 00654 /* A wrapper for HOOPS/3dGS ::Define_Color_Name */ 00655 STDMETHOD(HATL_Define_Color_Name)(BSTR name, BSTR er_name, BSTR ish_name, BSTR definition); 00656 00657 /* A wrapper for HOOPS/3dGS ::Define_Font */ 00658 STDMETHOD(HATL_Define_Font)(BSTR name, BSTR options, int data_length, VARIANT *data_var); 00659 00660 /* A wrapper for HOOPS/3dGS ::Define_Glyph */ 00661 STDMETHOD(HATL_Define_Glyph)(BSTR name, int data_size, BSTR data); 00662 00663 /* A wrapper for HOOPS/3dGS ::Define_Line_Style */ 00664 STDMETHOD(HATL_Define_Line_Style)(BSTR name, BSTR definition); 00665 00666 /* A wrapper for HOOPS/3dGS ::Define_Local_Texture */ 00667 STDMETHOD(HATL_Define_Local_Texture)(BSTR name, BSTR definition); 00668 00669 /* A wrapper for HOOPS/3dGS ::Define_System_Options */ 00670 STDMETHOD(HATL_Define_System_Options)(BSTR list); 00671 00672 /* A wrapper for HOOPS/3dGS ::Define_Texture */ 00673 STDMETHOD(HATL_Define_Texture)(BSTR name, BSTR definition); 00674 00675 00676 00677 /* unsorted */ 00678 00679 /* A wrapper for HOOPS/3dGS ::Show_Color */ 00680 STDMETHOD(HATL_Show_Color)(/*[out, retval]*/BSTR *color_spec); 00681 00682 /* A wrapper for HOOPS/3dGS ::Show_Alias */ 00683 STDMETHOD(HATL_Show_Alias)(BSTR alias, /*[out, retval]*/BSTR *expansion); 00684 00685 /* A wrapper for HOOPS/3dGS ::Show_Button */ 00686 STDMETHOD(HATL_Show_Button)(/*[out, retval]*/BSTR *button); 00687 00688 /* A wrapper for HOOPS/3dGS ::Show_Button_Source */ 00689 STDMETHOD(HATL_Show_Button_Source)(); 00690 00691 00692 00693 00694 /* 00695 property: Indicates if Current File has Model Structure Information 00696 \param pVal Boolean 00697 \return HRESULT 00698 */ 00699 STDMETHOD(get_HasModelStructureInfo)(/*[out, retval]*/ BOOL *pVal); 00708 STDMETHOD(SetSelectionMarkerColor)(float r, float g, float b, float a); 00717 STDMETHOD(SetSelectionEdgeColor)(float r, float g, float b, float a); 00726 STDMETHOD(SetSelectionFaceColor)(float r, float g, float b, float a); 00727 /* 00728 property: Indicates if Smooth Transition is set 00729 \param pVal Boolean 00730 \return HRESULT 00731 */ 00732 STDMETHOD(get_SmoothTransitionMode)(/*[out, retval]*/ BOOL *pVal); 00733 /* 00734 property: Set Smooth Transition 00735 \param pVal Boolean 00736 \return HRESULT 00737 */ 00738 STDMETHOD(put_SmoothTransitionMode)(/*[in]*/ BOOL newVal); 00739 /* 00740 property: Indicates if Data Navigator mode is set 00741 \param pVal Boolean 00742 \return HRESULT 00743 */ 00744 STDMETHOD(get_DataNavigatorMode)(/*[out, retval]*/ BOOL *pVal); 00745 /* 00746 property: Indicates if undo is possible 00747 \param pVal Boolean 00748 \return HRESULT 00749 */ 00750 STDMETHOD(get_UndoAvailable)(/*[out, retval]*/ BOOL *pVal); 00751 /* 00752 property: Indicates if redo is possible 00753 \param pVal Boolean 00754 \return HRESULT 00755 */ 00756 STDMETHOD(get_RedoAvailable)(/*[out, retval]*/ BOOL *pVal); 00757 /* 00758 property: Sets Data Navigator Mode 00759 \param newVal Boolean 00760 \return HRESULT 00761 */ 00762 STDMETHOD(put_DataNavigatorMode)(/*[in]*/ BOOL newVal); 00763 /* 00764 property: Sets path for configuration file 00765 \param newVal Boolean 00766 \return HRESULT 00767 */ 00768 STDMETHOD(put_ConfigFile)(BSTR newVal); 00769 /* 00770 property: Retrieve path for configuration file 00771 \param newVal Boolean 00772 \return HRESULT 00773 */ 00774 STDMETHOD(get_ConfigFile)(BSTR *newVal); 00775 /* 00776 property: Sets path for default configuration file 00777 \param newVal Boolean 00778 \return HRESULT 00779 */ 00780 STDMETHOD(put_DefaultConfigFile)(BSTR newVal); 00781 00782 STDMETHOD(put_SegmentDL)(/*[in]*/ BOOL newVal); 00783 STDMETHOD(get_SegmentDL)(/*[out, retval]*/ BOOL *pVal); 00784 00785 /* 00786 property: Sets TransparencyOptions 00787 \param newVal String 00788 \return HRESULT 00789 */ 00790 STDMETHOD(get_TransparencyOptions)(BSTR *newVal); 00791 STDMETHOD(put_TransparencyOptions)(BSTR newVal); 00792 00793 /* 00794 property: Sets HOOPS driver 00795 \param newVal String 00796 \return HRESULT 00797 */ 00798 STDMETHOD(get_DriverType)(BSTR *newVal); 00799 STDMETHOD(put_DriverType)(BSTR newVal); 00800 /* 00801 property: Sets Type of Framerate Mode (FramerateFixed, FramerateTarget, FramerateOff) 00802 \param newVal String 00803 \return HRESULT 00804 */ 00805 STDMETHOD(put_FramerateType)(BSTR newVal); 00806 STDMETHOD(get_FramerateType)(BSTR *pVal); 00807 00808 /* 00809 property: Sets Culling Threshold Value 00810 \param newVal Integer 00811 \return HRESULT 00812 */ 00813 STDMETHOD(put_CullingThreshold)(int newVal); 00814 STDMETHOD(get_CullingThreshold)(int *pVal); 00815 00816 /* 00817 property: Sets Maximum Threshold Value for Framerate 00818 \param newVal Integer 00819 \return HRESULT 00820 */ 00821 STDMETHOD(put_MaximumThreshold)(int newVal); 00822 STDMETHOD(get_MaximumThreshold)(int *pVal); 00823 00824 /* 00825 property: Retrieves path for default configuration file 00826 \param newVal Boolean 00827 \return HRESULT 00828 */ 00829 STDMETHOD(get_DefaultConfigFile)(BSTR *newVal); 00834 STDMETHOD(ShowOptionsDialog)(); 00835 00842 STDMETHOD(GetPathFromIndex)(/*[in]*/ int index, /*[out, retval]*/ BSTR *pPath); 00849 STDMETHOD(KeyToIndex)(/*[in]*/ BSTR key, /*[out, retval]*/ int* pIndex); 00850 /* 00851 property: Retrieves status of given cutting plane 00852 \param name Name of cutting plane segment 00853 \param pVal Boolean indicating if cutting plane is currently active 00854 \return HRESULT 00855 */ 00856 STDMETHOD(get_CuttingPlaneStatus)(BSTR name, /*[out, retval]*/ BOOL *pVal); 00862 STDMETHOD(Run)(BSTR command); 00863 /* 00864 property: Retrieves camera projection mode 00865 \param pVal Projection Mode (perspective, orthographic,etc) 00866 \return HRESULT 00867 */ 00868 STDMETHOD(get_ProjectionMode)(/*[out, retval]*/ BSTR *pVal); 00869 /* 00870 property: Sets camera projection mode 00871 \param pVal Projection Mode (perspective, orthographic,etc) 00872 \return HRESULT 00873 */ 00874 STDMETHOD(put_ProjectionMode)(/*[in]*/ BSTR newVal); 00875 /* 00876 property: Sets Opengl or direct3d software rendering 00877 \param newVal Boolean 00878 \return HRESULT 00879 */ 00880 STDMETHOD(put_SoftwareRendering)(/*[in]*/ BOOL newVal); 00881 /* 00882 property: Retrieves the current setting for software rendering 00883 \param newVal Boolean 00884 \return HRESULT 00885 */ 00886 STDMETHOD(get_SoftwareRendering)(/*[out, retval]*/ BOOL *pVal); 00887 00893 STDMETHOD(Select)(BSTR key); 00899 STDMETHOD(SelectFromIdentifier)(int identifier); 00905 STDMETHOD(SelectFromPath)(BSTR path); 00906 00912 STDMETHOD(AddFileType)(BSTR filetype); 00913 00920 STDMETHOD(FilterIdentifier)(int oldidentifier, int *newidentifier); 00921 00928 STDMETHOD(GenerateNavigationInfo)(int level, BSTR *filepath); 00935 STDMETHOD(GenerateNavigationInfoFromNodePath)(BSTR nodepath, BSTR *filepath); 00936 00941 STDMETHOD(ShowPageSetupDialog)(); 00946 STDMETHOD(ShowPrintDialog)(); 00952 STDMETHOD(CopyToClipboard)(); 00957 STDMETHOD(ShowFileSaveDialog)(); 00958 00959 00960 00965 STDMETHOD(ShowFileOpenDialog)(); 00966 00972 STDMETHODIMP SetRenderMode(BSTR rendermode); 00973 00974 00975 00982 STDMETHOD(ShowCuttingPlane)(BSTR name, BOOL onoff); 00983 00988 STDMETHOD(BhvPlay)(); 00993 STDMETHOD(FlushScene)(); 00994 00999 STDMETHOD(BhvPause)(); 01004 STDMETHOD(BhvRewind)(); 01005 01010 STDMETHOD(OpenModelSegment)(); 01015 STDMETHOD(OpenSceneSegment)(); 01016 01022 STDMETHOD(SetFramerateMode)(BOOL onoff); 01028 STDMETHOD(SetBackplaneCullingMode)(BOOL onoff); 01033 STDMETHOD(SetPolygonHandednessNone)(); 01038 STDMETHOD(SetPolygonHandednessRight)(); 01043 STDMETHOD(SetPolygonHandednessLeft)(); 01048 STDMETHOD(AntialiasScene)(); 01054 STDMETHOD(SetShadowMode)(BOOL onoff); 01059 STDMETHOD(SetProjectionModeOrthographic)(); 01064 STDMETHOD(SetProjectionModePerspective)(); 01070 STDMETHOD(SaveRestoreMarkup)(int layernum); 01075 STDMETHOD(SetCameraToIsometric)(); 01080 STDMETHOD(SetCameraToPlaneYX)(); 01085 STDMETHOD(SetCameraToPlaneZY)(); 01090 STDMETHOD(SetCameraToPlaneZX)(); 01095 STDMETHOD(SetCameraToPlaneYZ)(); 01100 STDMETHOD(SetCameraToPlaneXZ)(); 01105 STDMETHOD(SetViewAxis)(float fx, float fy, float fz, 01106 float tx, float ty, float tz); 01110 STDMETHOD(SetCameraToPlaneXY)(); 01115 STDMETHOD(InsertCuttingPlane)(); 01120 STDMETHOD(SetRenderModeHiddenLine)(); 01125 STDMETHOD(SetRenderModeWireframe)(); 01130 STDMETHOD(SetRenderModeGouraud)(); 01135 STDMETHOD(SetRenderModeGouraudWithEdges)(); 01140 STDMETHOD(SetRenderModeFlat)(); 01145 STDMETHOD(SetRenderModeShaded)(); 01151 STDMETHOD(SetOperator)(BSTR operator_name); 01156 STDMETHOD(SetBackgroundColors)(float r_top, float g_top, float b_top, float r_bottom, float g_bottom, float b_bottom, int percent); 01157 01162 STDMETHOD(SetAmbientColor)(float r_top, float g_top, float b_top); 01163 01164 01165 /* 01166 Property: Get current file type 01167 \param pVal file type (either 2dmodel or 3dmodel) 01168 \return HRESULT 01169 */ 01170 STDMETHOD(get_AllowMenu)(/*[out, retval]*/ BOOL *pVal); 01171 /* 01172 Property: Set current file type 01173 \param newVal file type (either 2dmodel or 3dmodel) 01174 \return HRESULT 01175 */ 01176 STDMETHOD(put_AllowMenu)(/*[in]*/ BOOL newVal); 01177 01178 01179 /* 01180 Property: Get current file type 01181 \param pVal file type (either 2dmodel or 3dmodel) 01182 \return HRESULT 01183 */ 01184 STDMETHOD(get_FileType)(/*[out, retval]*/ BSTR *pVal); 01185 /* 01186 Property: Set current file type 01187 \param newVal file type (either 2dmodel or 3dmodel) 01188 \return HRESULT 01189 */ 01190 STDMETHOD(put_FileType)(/*[in]*/ BSTR newVal); 01191 /* 01192 Property: Get no orbit operator flag 01193 \param pVal true = no orbit operator allowed, false = orbit operator allowed 01194 \return HRESULT 01195 */ 01196 STDMETHOD(get_NoOrbit)(/*[out, retval]*/ BOOL *pVal); 01197 /* 01198 Property: Set no orbit operator flag 01199 \param newVal true = no orbit operator allowed, false = orbit operator allowed 01200 \return HRESULT 01201 */ 01202 STDMETHOD(put_NoOrbit)(/*[in]*/ BOOL newVal); 01203 01204 /* 01205 Property: Get Antialiasing Flag 01206 \param pVal true = use antialiasing step during constant framerate, false = no antialiasing 01207 \return HRESULT 01208 */ 01209 STDMETHOD(get_Antialiasing)(/*[out, retval]*/ BOOL *pVal); 01210 01211 /* 01212 Property: Set Antialiasing Flag 01213 \param newVal true = use antialiasing step during constant framerate, false = no antialiasing 01214 \return HRESULT 01215 */ 01216 STDMETHOD(put_Antialiasing)(/*[in]*/ BOOL newVal); 01217 01218 01219 STDMETHOD(get_FrameRate)(/*[out, retval]*/ float *pVal); 01220 01221 /* 01222 property: Sets desired Framerate (in sec) 01223 \param newVal float 01224 \return HRESULT 01225 */ 01226 STDMETHOD(put_FrameRate)(/*[in]*/ float newVal); 01227 01228 01229 /* 01230 Property: Set Hardware Antialiasing Flag 01231 \param newVal true = use hardware antialiasing, false = no hardware antialiasing 01232 \return HRESULT 01233 */ 01234 STDMETHOD(put_HardwareAntialiasing)(/*[in]*/ BOOL newVal); 01235 /* 01236 Property: Get Hardware Antialiasing Flag 01237 \param pVal true = use hardware Antialiasing, false = no antialiasing 01238 \return HRESULT 01239 */ 01240 STDMETHOD(get_HardwareAntialiasing)(/*[out, retval]*/ BOOL *pVal); 01241 01242 /* 01243 Property: Set Entity Selection Antialiasing Flag 01244 \param newVal true = use entity selection, false = no entity selection 01245 \return HRESULT 01246 */ 01247 STDMETHOD(put_AllowEntitySelection)(/*[in]*/ BOOL newVal); 01248 /* 01249 Property: Get Entity Selection Flag 01250 \param pVal true = use entity selection, false = no entity selection 01251 \return HRESULT 01252 */ 01253 STDMETHOD(get_AllowEntitySelection)(/*[out, retval]*/ BOOL *pVal); 01254 01255 01256 01257 /* 01258 Property: Sets Continues play animation setting indicating if animation should loop 01259 \param newVal boolean 01260 \return HRESULT 01261 */ 01262 STDMETHOD(put_BhvContinuousPlay)(/*[in]*/ BOOL newVal); 01263 01264 /* 01265 Property: Retrieves Continues play animation setting indicating if animation should loop 01266 \param newVal boolean 01267 \return HRESULT 01268 */ 01269 STDMETHOD(get_BhvContinuousPlay)(/*[out, retval]*/ BOOL *pVal); 01270 01271 01272 /* 01273 Property: Set AxisMode Flag 01274 \param newVal true = display axis, false = no axis 01275 \return HRESULT 01276 */ 01277 STDMETHOD(put_AxisMode)(/*[in]*/ BOOL newVal); 01278 /* 01279 Property: Get AxisMode Flag 01280 \param pVal true = Display Axis, false = no axis 01281 \return HRESULT 01282 */ 01283 STDMETHOD(get_AxisMode)(/*[out, retval]*/ BOOL *pVal); 01284 01285 /* 01286 Property: Get Last Returned Key 01287 \param pVal Last key that was returned by a call 01288 \return HRESULT 01289 */ 01290 STDMETHOD(get_Key)(/*[out, retval]*/ LONG *pVal); 01291 01292 /* 01293 Property: Get Last Returned String 01294 \param pVal Last string that was returned by a call 01295 \return HRESULT 01296 */ 01297 STDMETHOD(get_String1)(/*[out, retval]*/ BSTR *pVal); 01298 STDMETHOD(get_String2)(/*[out, retval]*/ BSTR *pVal); 01299 STDMETHOD(get_String3)(/*[out, retval]*/ BSTR *pVal); 01300 STDMETHOD(get_Int1)(/*[out, retval]*/ int *pVal); 01301 01302 /* 01303 Property: Get control embed state 01304 \param PVal true = will be embedded, false = will not be embedded 01305 \return HRESULT 01306 */ 01307 STDMETHOD(get_Embed)(/*[out, retval]*/ BOOL *pVal); 01308 01309 /* 01310 Property: Set Segment Display Listz 01311 \param newVal true = on, false = off 01312 \return HRESULT 01313 */ 01314 01315 /* 01316 Property: Set Segment Display List 01317 \param newVal true = on, false = off 01318 \return HRESULT 01319 */ 01320 STDMETHOD(put_AntialiasingLevel)(/*[in]*/ int newVal); 01321 STDMETHOD(get_AntialiasingLevel)(/*[out]*/ int *pVal); 01322 01323 /* 01324 Property: Set Segment Display List 01325 \param newVal true = on, false = off 01326 \return HRESULT 01327 */ 01328 STDMETHOD(put_StaticModel)(/*[in]*/ BOOL newVal); 01329 STDMETHOD(get_StaticModel)(/*[out]*/ BOOL *pVal); 01330 01331 /* 01332 Property: Set Static Tree 01333 \param newVal true = on, false = off 01334 \return HRESULT 01335 */ 01336 STDMETHOD(put_Embed)(/*[in]*/ BOOL newVal); 01337 01338 /* 01339 Property: Get camera parameters 01340 \param pVal returns current camera position, target, up-vector, width, height as string 01341 \return HRESULT 01342 */ 01343 STDMETHOD(get_CameraParameters)(/*[out, retval]*/ BSTR *pVal); 01359 STDMETHOD(SetCamera)(float px, float py, float pz, float tx, float ty, float tz, float ux, float uy, float uz, float width, float height); 01364 STDMETHOD(FitWorld)(); 01365 /* 01366 Property: Get name of current operator 01367 \param pVal operator name 01368 \return HRESULT 01369 */ 01370 STDMETHOD(get_CurrentOperator)(/*[out, retval]*/ BSTR *pVal); 01371 01372 /* 01373 Property: Get comma separated string listing all model structure types 01374 \param pVal boolean 01375 \return HRESULT 01376 */ 01377 STDMETHOD(get_ModelStructureTypeList)(/*[out, retval]*/ BSTR *pVal); 01378 01383 STDMETHOD(AbortDownload)(); 01384 /* 01385 Property: Get size of currently downloading file 01386 \param pVal file size 01387 \return HRESULT 01388 */ 01389 STDMETHOD(get_DownloadDataMax)(/*[out, retval]*/ long *pVal); 01390 /* 01391 Property: Get amount of data already dowloaded for currently donwloading file 01392 \param pVal amount of data already donwloaded 01393 \return HRESULT 01394 */ 01395 STDMETHOD(get_DownloadDataReceived)(/*[out, retval]*/ long *pVal); 01396 /* 01397 Property: Get download in progress state 01398 \param pVal true = streaming in progress, false = no streaming in progress 01399 \return HRESULT 01400 */ 01401 STDMETHOD(get_DLinProgress)(/*[out, retval]*/ BOOL *pVal); 01402 01403 01404 01405 01406 01407 01408 /* 01409 Property: Get name of currently loaded file 01410 \param pVal name of file 01411 \return HRESULT 01412 */ 01413 STDMETHOD(get_Filename)(/*[out, retval]*/ BSTR *pVal); 01414 01415 /* 01416 Property: Set name of file for download 01417 \param newVal name of file 01418 \return HRESULT 01419 */ 01420 STDMETHOD(put_Filename)(/*[in]*/ BSTR newVal); 01421 01422 /* 01423 Property: Sets if we flush the model before loading a new one with 01424 put_Filename or put_LocalFilename. 01425 \param newVal true if we want to flush the model (default). false if 01426 we want to leave the geometry in the model when loading a new model. 01427 \return HRESULT 01428 */ 01429 STDMETHOD(put_FlushOnLoad)(/*[in]*/ BOOL newVal); 01430 01431 /* 01432 Property: Gets if we flush the model before loading a new one with 01433 put_Filename or put_LocalFilename. 01434 \param newVal true if we want to flush the model (default). false if 01435 we want to leave the geometry in the model when loading a new model. 01436 \return HRESULT 01437 */ 01438 STDMETHOD(get_FlushOnLoad)(/*[out, retval]*/ BOOL *pVal); 01439 01440 /* 01441 Property: Sets model structure filter used to limit selection to parent entities 01442 \param newVal Name of entity 01443 \return HRESULT 01444 */ 01445 STDMETHOD(put_ModelStructureFilter)(/*[in]*/ BSTR newVal); 01446 01447 /* 01448 Property: Get State of Control in progress state 01449 \param pVal true = control window is visible, false = control window is not visible 01450 \return HRESULT 01451 */ 01452 STDMETHOD(get_ControlActive)(/*[out, retval]*/ BOOL *pVal); 01453 /* 01454 Property: Get State of Control in progress state 01455 \param pVal true = control window is visible, false = control window is not visible 01456 \return HRESULT 01457 */ 01458 STDMETHOD(get_IsPlaying)(/*[out, retval]*/ BOOL *pVal); 01459 01464 STDMETHOD (BhvActivateAllAnimations)(); 01469 STDMETHOD (BhvDeactivateAllAnimations)(); 01476 STDMETHOD (BhvActivateAnimation)(BSTR animationname, BOOL allowPartial); 01483 STDMETHOD (BhvDeactivateAnimation)(BSTR animationname, BOOL allowPartial); 01489 STDMETHOD (BhvStartAnimation)(BSTR animationname); 01495 STDMETHOD (BhvStopAnimation)(BSTR animationname); 01501 STDMETHOD (BhvRewindAnimation)(BSTR animationname); 01502 01503 01509 STDMETHOD(BhvSetInfinitePlay)(BOOL onoff); 01510 01511 01512 01513 01518 STDMETHOD(ConfigureFromFile)(); 01519 01523 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 ); 01524 01525 // IViewObjectEx 01526 DECLARE_VIEW_STATUS(VIEWSTATUS_SOLIDBKGND | VIEWSTATUS_OPAQUE) 01527 01528 01529 01530 01531 01532 01537 HRESULT OnDraw(ATL_DRAWINFO& di); 01538 01547 bool GetConfigProperty(char *tagname, char *propertyname, char *result, vlist_s *configurationlist = 0); 01553 HUtilityXMLTag * GetConfigTag(char *tagname); 01554 01555 01556 01563 bool ReadConfigFile(char *ConfigFile, struct vlist_s *ConfigurationList); 01564 01565 01570 HCtrlView* GetHoopsView(); 01571 01578 static void ConvertToChar(char *mbstr, const wchar_t *wcstr, size_t count); 01585 static void ConvertToBSTR(wchar_t *wcstr, const char *mbstr, size_t count) ; 01590 bool RestoreCamera(); 01595 void Set2dModel(bool modeltype); 01601 void SetNoOrbit(bool noorbit); 01602 01607 CDataLoader * GetDataLoader() { return m_pDataLoader; } 01608 01609 01610 /* 01611 Registry "Patch" Function that ensures IDL file gets correctly processed 01612 */ 01613 static HRESULT WINAPI UpdateRegistry(BOOL bRegister) 01614 { 01615 _ATL_REGMAP_ENTRY entries[3]; 01616 01617 01618 01619 wchar_t key1[256]; 01620 wchar_t data1[256]; 01621 wchar_t key2[256]; 01622 wchar_t data2[256]; 01623 01624 FixGuid("CLSIDCTRLCLASS", CLSID_HOOPS3DSTREAMCTRL_CLASS, key1, data1); 01625 FixGuid("CLSIDTYPELIB", CLSID_HOOPS3DSTREAMCTRL_TYPELIB, key2, data2); 01626 01627 entries[0].szKey = key1; 01628 entries[0].szData = data1; 01629 entries[1].szKey = key2; 01630 entries[1].szData = data2; 01631 entries[2].szKey = 0; 01632 entries[2].szData = 0; 01633 01634 _Module.UpdateRegistryFromResource(IDR_Hoops3dStreamCTRL, 01635 bRegister, entries); 01636 01637 return 1; 01638 } 01639 01640 01648 HRESULT ShowFileDialog(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0); 01656 static HRESULT ShowFileDialog2(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0); 01657 01665 static HRESULT ShowFileSaveDialog(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0); 01666 01667 /* XML Read Callback */ 01668 static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData); 01669 01674 void SerializeConfiguration(); 01675 01676 #ifndef DOXYGEN_SHOULD_SKIP_THIS 01677 01678 01679 /* 01680 Overloaded Internal Method 01681 */ 01682 STDMETHOD(UIDeactivate)(void) 01683 { 01684 SendOnDataChange(); 01685 IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>::UIDeactivate(); 01686 return S_OK; 01687 } 01688 01689 01690 /* 01691 Overloaded Internal Method 01692 */ 01693 STDMETHOD(InPlaceDeactivate)(void) 01694 { 01695 SendOnDataChange(); 01696 CComPtr<IOleInPlaceObject> pIPO; 01697 ControlQueryInterface(__uuidof(IOleInPlaceObject), (void**)&pIPO); 01698 if (pIPO) 01699 IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>::InPlaceDeactivate(); 01700 else 01701 { 01702 // based off of: 01703 // inline HRESULT CComControlBase::IOleInPlaceObject_InPlaceDeactivate(void) 01704 01705 m_bInPlaceActive = FALSE; 01706 01707 // if we have a window, tell it to go away. 01708 // 01709 if (m_hWndCD) 01710 { 01711 //ATLTRACE(atlTraceControls,2,_T("Destroying Window\n")); 01712 if (::IsWindow(m_hWndCD)) 01713 DestroyWindow(); 01714 m_hWndCD = NULL; 01715 } 01716 01717 if (m_spInPlaceSite) 01718 m_spInPlaceSite->OnInPlaceDeactivate(); 01719 } 01720 return S_OK; 01721 } 01722 01723 STDMETHOD(Close)(DWORD dwSaveOption) 01724 { 01725 CComPtr<IOleInPlaceObject> pIPO; 01726 ControlQueryInterface(__uuidof(IOleInPlaceObject), (void**)&pIPO); 01727 if (pIPO) 01728 return IOleObjectImpl<CHoops3dStreamCtrl>::Close(dwSaveOption); 01729 else 01730 { 01731 // based off of: 01732 // inline HRESULT CComControlBase::IOleObject_Close(DWORD dwSaveOption) 01733 01734 // handle the save flag. 01735 // 01736 if ((dwSaveOption == OLECLOSE_SAVEIFDIRTY || 01737 dwSaveOption == OLECLOSE_PROMPTSAVE) && m_bRequiresSave) 01738 { 01739 if (m_spClientSite) 01740 m_spClientSite->SaveObject(); 01741 SendOnSave(); 01742 } 01743 01744 m_spInPlaceSite.Release(); 01745 m_bNegotiatedWnd = FALSE; 01746 m_bWndLess = FALSE; 01747 m_bInPlaceSiteEx = FALSE; 01748 m_spAdviseSink.Release(); 01749 return S_OK; 01750 } 01751 return S_OK; 01752 } 01753 LRESULT OnInputLangChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01754 LRESULT OnInputLangChangeRequest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01755 LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01756 LRESULT OnLButtonDblClk(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01757 LRESULT OnLButtonUP(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01758 LRESULT OnRButtonUP(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01759 LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01760 LRESULT OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01761 LRESULT OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01762 LRESULT OnRButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01763 LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01764 LRESULT OnKeyUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01765 LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01766 LRESULT OnOrbit(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01767 LRESULT OnFileOpen(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01768 LRESULT OnZoom(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01769 LRESULT OnPan(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01770 LRESULT OnReset(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01771 LRESULT OnWindowColor(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01772 LRESULT OnZoomWindow(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01773 LRESULT OnSmoothTransition(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01774 LRESULT OnToolsVisibilityText(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01775 LRESULT OnToolsVisibilityLines(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01776 LRESULT OnToolsVisibilityFaces(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01777 LRESULT OnAnnotate(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01778 LRESULT OnAddNote(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01779 LRESULT OnRedline(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01780 LRESULT OnSmoothShaded(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01781 LRESULT OnFlatShaded(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01782 LRESULT OnWireframe(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01783 LRESULT OnHiddenLine(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01784 LRESULT OnShadowSmooth(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01785 01786 LRESULT OnPrint(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01787 LRESULT OnCopy(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01788 LRESULT OnAboutBox(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01789 LRESULT OnExitMenuLoop(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01790 LRESULT OnBhvPlay(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01791 LRESULT OnBhvPause(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01792 LRESULT OnBhvRewind(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled); 01793 LRESULT OnXMLParsingComplete(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01794 01795 01796 HRESULT IPersistStreamInit_Load(LPSTREAM pStm, const ATL_PROPMAP_ENTRY* pMap); 01797 HRESULT IPersistStreamInit_Save(LPSTREAM pStm, BOOL fClearDirty, const ATL_PROPMAP_ENTRY* pMap); 01798 01799 bool FullyQualifyUrl (char *urlname); 01800 bool FullyQualifyUnicodeUrl (BSTR urlname); 01801 bool BreakUrl ( const char * urlname, 01802 char * scheme, 01803 char * hostname, 01804 char * path, 01805 bool & bIsLocalFile); 01806 bool BreakUnicodeUrl ( const wchar_t * urlname, 01807 wchar_t * scheme, 01808 wchar_t * hostname, 01809 wchar_t * path, 01810 bool & bIsLocalFile); 01811 01812 #endif 01813 01814 protected: 01815 01816 /* 01817 Property: Set name of file for loading from local disk 01818 \param newVal name of file 01819 \return HRESULT 01820 */ 01821 STDMETHOD(put_LocalFilename)(/*[in]*/ BSTR newVal); 01822 01823 struct vlist_s* m_ConfigurationList; 01825 HCtrlView *m_pView; 01826 HCtrlDB *m_pHDB; 01827 HBaseModel *m_pModel; 01828 CDataLoader *m_pDataLoader; 01830 struct vlist_s* m_FileTypeList; 01832 bool m_bMetaPrint; 01833 bool m_bSoftwareRendering; 01834 bool m_bFastPrint; 01835 bool m_bUseAntialiasing; 01836 bool m_bUseHardwareAntialiasing; 01837 int m_MetafileType; 01838 bool m_bClipboardTruecolor; 01839 BSTR m_Filename; 01840 bool m_bFilenameChanged; 01841 bool m_bEmbed; 01842 bool m_bIs2dModel; 01843 bool m_bNoOrbit; 01844 bool m_bAllowMenu; 01846 void DrawToMetafile (HWND hWnd, HDC hDC); 01847 void WriteFileToArchive (LPSTREAM pStm); 01848 void ReadFileFromArchive (LPSTREAM pStm); 01849 void InitModel(); 01850 void StartDownload(); 01851 void OnData (CBindStatusCallback<CHoops3dStreamCtrl>* pbsc, BYTE* pBytes, DWORD dwSize); 01852 void LocalSetOperator(HBaseOperator * NewOperator); 01854 bool SaveFile( LPCTSTR csFilePathName ); 01855 bool Print(); 01857 bool m_bAllowEntitySelection; 01858 int m_iPrintFlag; 01868 void GetPointArrayFromVariant(VARIANT * varKeys, HPoint **array, int &length); 01875 void GetFloatArrayFromVariant(VARIANT * varKeys, float **array, int &length); 01882 void GetByteArrayFromVariant(VARIANT * varKeys, char **array, int &length); 01891 void GetArrayFromVariant(VARIANT * varKeys, float **arrayfloat, int **arrayint, char **arraychar, int &length); 01899 void GetArrayFromVariant2(VARIANT * varKeys, void **ret_array, char *type, int &length); 01906 void GetIntegerArrayFromVariant(VARIANT * varKeys, int **arrayint, int &length); 01907 01914 void GetShortArrayFromVariant(VARIANT * varKeys, short **arrayshort, int &length); 01915 01916 01917 01918 // MVO event handlers 01919 /* 01920 Selection Event 01921 */ 01922 static bool signal_selected(int signal, void *signal_data, void *user_data); 01923 /* 01924 Selection handler 01925 */ 01926 bool OnSignalSelected(); 01927 01928 /* 01929 Deselect All Event 01930 */ 01931 static bool signal_deselected_all(int signal, void *signal_data, void *user_data); 01932 /* 01933 Deselect All handler 01934 */ 01935 bool OnSignalDeSelectedAll(); 01936 01937 /* 01938 Creates and realizes a Windows palette 01939 */ 01940 void MakePalette(); 01941 01942 01943 private: 01944 01945 bool m_text; 01946 bool m_lines; 01947 bool m_faces; 01948 FramerateMode m_FramerateType; 01949 HPALETTE m_pPalette; 01950 HC_KEY m_activelayerkeys[NUM_MARKUP_LAYERS]; 01951 int m_cx, m_cy; 01952 HPoint m_camPosition, m_camTarget, m_camUp; 01953 HPoint m_window_top_color, m_window_bottom_color, m_ambient_color; 01954 float m_camWidth, m_camHeight; 01955 char m_camProjection[256]; 01956 bool m_bCameraRestored; 01957 IWebBrowserApp * m_pInternetExplorer; 01958 static void FixGuid(char *in1, char *in2, wchar_t *out1, wchar_t *out2); 01959 unsigned long MapFlags( unsigned long state ); 01960 bool OperatorStarted(); 01961 bool IsVisible(char *geom); 01962 bool ContainerIsIE (void); 01963 bool m_bJustCreated; 01964 TCHAR stemp[4096]; 01965 char ctemp[4096]; 01966 char m_DriverType[4096]; 01967 char m_TransparencyOptions[4096]; 01968 char m_ConfigFile[4096]; 01969 char m_DefaultConfigFile[4096]; 01970 AxisMode m_StoredAxisMode; 01971 long m_CookieSelected; // cookie for HSignalSelected signal subscription 01972 long m_CookieDeSelectedAll; // cookie for HSignalDeSelectedAll signal subscription 01973 bool m_bContinuousPlay; 01974 bool m_bFirstRun; 01975 bool m_bShadowMode; 01976 bool m_bDataNavigatorMode; 01977 HC_KEY LastKey; // stores the key of the last object inserted 01978 char String1[4096]; // stores a return string 01979 char String2[4096]; // stores a return string 01980 char String3[4096]; // stores a return string 01981 int Int1; // stores a return int 01982 bool m_bFlushOnLoad; 01983 bool m_bFileOpenActive; 01984 bool m_bSegmentDL; 01985 bool m_bStaticModel; 01986 int m_AntialiasingLevel; 01987 int m_CullingThreshold; 01988 int m_MaximumThreshold; 01989 float m_FrameRate; 01990 LRESULT OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 01991 01992 LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) 01993 { 01994 if (!m_pView) 01995 DefWindowProc(uMsg, wParam, lParam); 01996 return 0; 01997 } 01998 LRESULT OnToolsOptimizemodel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 01999 LRESULT OnToolsSaveas(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 02000 02001 static HHOOK hHook; 02002 static bool menuActive; 02003 02004 static void create_mouse_hook(HINSTANCE hinst); 02005 static LRESULT CALLBACK mouse_hook_callback(int code,WPARAM wParam, LPARAM lParam); 02006 static void set_menu_active(bool active); 02007 }; 02008 02009 02010 02011 02012 02014 class TK_Custom_Bounding : public HTK_Bounding 02015 { 02016 02017 private: 02018 02019 CHoops3dStreamCtrl * m_pControl; 02020 02021 public: 02022 02024 TK_Custom_Bounding(unsigned char opcode, CHoops3dStreamCtrl * pCtrl) : HTK_Bounding(opcode) { m_pControl = pCtrl; } 02025 02026 TK_Status Execute (BStreamFileToolkit & tk); 02028 }; 02029 02030 02031 02032 02033 02034 02035 #endif //__Hoops3dStreamCTRL_H_