00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __MSS_PeltSelector_h__
00021 #define __MSS_PeltSelector_h__
00022
00023 #include "MSS_API.h"
00024 #include <OP3D/OP3D_GenericSelector.h>
00025 #include <SOP/SOP_Node.h>
00026 #include <UI/UI_Value.h>
00027 #include <UT/UT_DMatrix4.h>
00028
00029 class MSS_API MSS_PeltSelector : public OP3D_GenericSelector
00030 {
00031 public:
00032 MSS_PeltSelector(OP3D_View &viewer, PI_SelectorTemplate &templ);
00033 virtual ~MSS_PeltSelector();
00034
00035 static BM_InputSelector *ourConstructor(BM_View &Viewer,
00036 PI_SelectorTemplate &templ);
00037
00038 virtual const char *className() const;
00039
00040 virtual int handleMouseEvent(UI_Event *event);
00041 virtual int handleKeyEvent(UI_Event *event, DM_Viewport &viewport);
00042
00043
00044 virtual UI_Menu *getSelectorMenu() const;
00045
00046 void setSelectedOpPath(const char *path, int selinst);
00047 void setHintPrimitive(int prim) { myHintPrimId = prim; }
00048 int getHintPrimitive() { return myHintPrimId; }
00049
00050 virtual void makeValidSelections(DM_GeometryType &geo_type,
00051 bool &connected,
00052 int &group_type_menu_val);
00053
00054 protected:
00055 virtual void addToSelection(UI_Event *event,
00056 const char *path,
00057 int selinst,
00058 void *added_geo);
00059 virtual void startSelecting(bool copy_cooked_selection);
00060 void invalidateGuideCache();
00061 bool selectPrimitive(UI_Event * );
00062 void doRender(RE_Render *r, short x, short y, int ghost);
00063 bool isCachedDetailValid();
00064
00065 virtual void saveForUndo();
00066
00067 GU_Detail *getDetail();
00068 int getSelectedInstance() const;
00069
00070 virtual void initApplication(UI_Manager *uims, int argc,
00071 const char **argv);
00072 void handleShowGuideChange(UI_Event *event);
00073
00074 private:
00075 SELECTOR_SETUP()
00076
00077 UT_String mySelectedOpPath;
00078 int myCacheDetailId;
00079 int mySelectedInstance;
00080 int myMetaCacheCount;
00081 int myHintPrimId;
00082
00083
00084 UI_Value *myShowGuideValue;
00085 int myGuideCache;
00086
00087 friend class MSS_PeltSelectorUndo;
00088 };
00089
00090 #endif