00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Magdalena Georgescu 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: MSS_SingleOpBaseState.h 00015 * 00016 * COMMENTS: 00017 * Parent class for SOP custom states. 00018 * 00019 */ 00020 00021 #ifndef __MSS_SingleOpBaseState_H__ 00022 #define __MSS_SingleOpBaseState_H__ 00023 00024 #include "MSS_API.h" 00025 #include <BM/BM_SingleOpState.h> 00026 00027 class DM_Workbench; 00028 class OP3D_View; 00029 class JEDI_View; 00030 00031 class MSS_API MSS_SingleOpBaseState : public BM_SingleOpState 00032 { 00033 public: 00034 MSS_SingleOpBaseState(JEDI_View &view, PI_StateTemplate &templ, 00035 BM_SceneManager *scene, 00036 const char *cursor = BM_DEFAULT_CURSOR); 00037 virtual ~MSS_SingleOpBaseState(void); 00038 00039 virtual const char *className() const; 00040 00041 protected: 00042 // Provide the Op to work with. The criteria for which OP to use will 00043 // be specific to each network type. This method does NOT overwrite 00044 // the myOpNode pointer. 00045 virtual OP_Node *getChosenOp(void) const; 00046 00047 // Return the directory name for the UI file. 00048 virtual const char *getUIDirectory() const; 00049 00050 // Set the flags (display/current) of the given node: 00051 virtual void setNodeFlags(OP_Node &node); 00052 00053 // Respond to keyboard events 00054 virtual int handleKeyTypeEvent(UI_Event *event, BM_Viewport &); 00055 00056 // This depends on the secure selection button and 00057 // whether a selector is active. 00058 virtual bool isSelecting() const; 00059 virtual bool needSelectMask() const { return true; } 00060 00061 // map viewport coordinates to worldspace location and direction 00062 void mapToWorld(float x, float y, 00063 UT_Vector3 &dir, UT_Vector3 &rayorig); 00064 00065 // get worldspace to cameraspace transform 00066 void getViewportTransform(UT_Matrix4 &xform); 00067 // get cameraspace to worldspace transform 00068 void getViewportItransform(UT_Matrix4 &xform); 00069 00070 // get level of detail for the viewport 00071 float getViewportLOD() const; 00072 00073 // set the prompt's text 00074 void showPrompt(const char *msg); 00075 00076 JEDI_View &viewer() { return (JEDI_View &)baseViewer(); } 00077 const JEDI_View &viewer() const { return (JEDI_View &)baseViewer(); } 00078 00079 DM_Workbench &workbench() 00080 { return (DM_Workbench &)sceneManager(); } 00081 const DM_Workbench &workbench() const 00082 { return (DM_Workbench &)sceneManager(); } 00083 00084 private: 00085 }; 00086 00087 #endif
1.5.9