00001 #ifndef SELECTABLETHING_H 00002 #define SELECTABLETHING_H 00003 #include <QGLViewer/qglviewer.h> 00004 #include "global.h" 00005 /* 00006 _____ _ _ _ _ _______ _ _ 00007 / ____| | | | | | | | | |__ __| | (_) 00008 | (___ ___| | ___ ___| |_ __ _| |__ | | ___| | | |__ _ _ __ __ _ 00009 \___ \ / _ \ |/ _ \/ __| __/ _` | '_ \| |/ _ \ | | '_ \| | '_ \ / _` | 00010 ____) | __/ | __/ (__| || (_| | |_) | | __/ | | | | | | | | | (_| | 00011 |_____/ \___|_|\___|\___|\__\__,_|_.__/|_|\___|_| |_| |_|_|_| |_|\__, | 00012 __/ | 00013 |___/ 00014 */ 00015 using namespace std; 00016 using namespace qglviewer; 00017 00018 class TDPoint; 00019 class BaryPatch; 00021 00025 class SelectableThing 00026 { 00027 public : 00028 // Thing Attributes 00031 SelectableThing** _Workspace; 00033 Vec _Color; 00035 bool _IsSelected; 00037 bool _Show; 00039 bool _ShowNameTag; 00041 QString _NameTag; 00043 int _ThingName; 00045 Frame _ThingGlobalFrame; 00047 Frame _ThingLocalFrame; 00049 bool _IsBeingDeleted; 00052 SelectableThing(int ThingName, SelectableThing** Workspace) 00053 { 00054 _ThingName = ThingName; 00055 _Workspace = Workspace; 00056 _IsSelected = false; 00057 _Show=true; 00058 _ShowNameTag=true; 00059 _ThingGlobalFrame.setPosition(Vec(0.,0.,0.)); 00060 _ThingGlobalFrame.setOrientation(Quaternion(0,0,0,1)); 00061 _NameTag = "UnNamed"; 00062 _Color = Vec(0.9,0.2,0.2); 00063 _IsBeingDeleted = false; 00064 Workspace[ThingName] = this;};; 00066 virtual void draw(ManipulatedFrame* MF)=0; 00068 virtual void UpdateNameTag()=0; 00071 virtual bool IsAPoint()=0; 00074 virtual bool IsAPatch()=0; 00077 virtual TDPoint* GetPoint()=0; 00080 virtual BaryPatch* GetPatch()=0; 00081 }; 00082 00083 #endif