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 RICBALL_H
00033 #define RICBALL_H
00034
00035 #include <Inventor/SbLinear.h>
00036 #include "Observer.h"
00037
00038
00039 class SoMaterial;
00040 class SoMatrixTransform;
00041 class SoSphere;
00042 class SoTransformSeparator;
00043 class gstSeparator;
00044 class gstSphere;
00045 class gstTransform;
00046
00059 class RICBall : public Subject
00060 {
00061 public:
00063 RICBall();
00064
00066 virtual ~RICBall();
00067
00069 static void EventCB(gstTransform*, void*, void*);
00070
00072 static void GraphicCB(gstTransform*, void*, void*);
00073
00075 SoTransformSeparator* getOIVNode();
00076
00078 gstSeparator* getGHOSTNode();
00079
00081 int isTouched();
00082
00084 void setDiffuseColor(const SbVec3f&);
00085
00087 void setRadius(const float&);
00088
00090 void setTransform(const SbMatrix&);
00091
00093 void setTransparency(const float&);
00094
00095 protected:
00097
00098
00100 SoMaterial* material;
00101
00103 SoTransformSeparator* separator;
00104
00106 SoSphere* sphere;
00107
00109 SoMatrixTransform* transform;
00110
00112
00114
00115
00117 gstSeparator* hapticSeparator;
00118
00120 gstSphere* hapticSphere;
00121
00123 };
00124
00125 #endif