00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00031
00032 #ifndef RICDEMOAPP_H
00033 #define RICDEMOAPP_H
00034
00035 #include "OIVAppShell.h"
00036 #include "Observer.h"
00037
00038 #include <Inventor/SbBox.h>
00039 #include <Inventor/SoDB.h>
00040 #include <Inventor/actions/SoGLRenderAction.h>
00041 #include <Inventor/actions/SoHandleEventAction.h>
00042 #include <Inventor/nodes/SoPointLight.h>
00043 #include <Inventor/nodes/SoSeparator.h>
00044 #include <Inventor/nodes/SoSphere.h>
00045 #include <Inventor/nodes/SoTransform.h>
00046
00047 #include <gstPHANToM.h>
00048 #include <gstPHANToM_SCP.h>
00049 #include <gstScene.h>
00050 #include <gstTransform.h>
00051 #include <gstTranslateManipulator.h>
00052
00064 class RICDemoApp : public OIVAppShell, public Observer
00065 {
00066 public:
00068 RICDemoApp(int, char**);
00069
00071 virtual ~RICDemoApp();
00072
00074 static void PointerGraphicCB(gstTransform*, void*, void*);
00075
00077
00078
00080 virtual void buildScene();
00081
00083 virtual void frameUpdate();
00084
00086 virtual void update();
00087
00089
00091 SbBox3f getWorkspaceSize();
00092
00094 void setPhantomOffset(const SbVec3f&);
00095
00097 virtual void update(Subject*);
00098
00099 protected:
00101 bool m_canTranslate;
00103 int m_stylusButtonOn;
00104
00106
00107
00109 SoSeparator* m_ghostSep;
00110
00112 SoTransform* m_phantomOffset;
00113
00115 SoTransform* m_phantomTransform;
00116
00118
00120
00121
00123 gstScene* m_hapScene;
00124
00126 gstSeparator* m_hapRoot;
00127
00129 gstPHANToM* m_phantom;
00130
00132 gstPHANToM_SCP* m_phantomSCP;
00133
00135 gstTranslateManipulator* m_translateManip;
00136
00138 SbBox3f m_workspaceSize;
00139
00141
00142 };
00143
00144 #endif