00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _PO_STREAMSPHEREMOTION_
00025 #define _PO_STREAMSPHEREMOTION_
00026
00027 #include <MeshViz/3Ddata/PoStreamParticleMotion.h>
00028 #include <Inventor/fields/SoSFBool.h>
00029 #include <Inventor/nodes/SoSphere.h>
00030
00071 class PoStreamSphereMotion : public PoStreamParticleMotion {
00072
00073 SO_KIT_HEADER(PoStreamSphereMotion) ;
00074
00075
00076 SO_KIT_CATALOG_ENTRY_HEADER(groupStreamSphereMotion) ;
00077
00078
00079 public:
00080
00084 PoStreamSphereMotion();
00085
00089 virtual void rebuild();
00090
00094 SoSFFloat sphereRadius;
00095
00096
00097 private:
00098 static void initClass() ;
00099 static void exitClass() ;
00100
00101 private:
00102
00103 virtual ~PoStreamSphereMotion() ;
00104
00105
00106 virtual void setDefaultOnNonWritingFields();
00107 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
00108
00109 private:
00110
00111 FieldSensorList m_fieldSensorList ;
00112
00113
00114 SoFieldList m_fieldList ;
00115
00116
00117 void newAnimator(SoGroup *group, SoLineSet *line_set,
00118 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
00119 SoMFColor *particle_color);
00120 void endAnimator(SoGroup *group, SoLineSet *line_set,
00121 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
00122 SoMFColor *particle_color);
00123 void newFrame(SoGroup *frame, int frame_ind);
00124 void endFrame(SoGroup *frame, int frame_ind);
00125 void newLine(SoGroup *line, int line_ind);
00126 void endLine(SoGroup *line, int line_ind);
00127 void newParticle(const SbVec3f &pos, const SbVec3f &speed, const SbVec3f &norm, const SbColor *color, int ind);
00128
00129 SoGroup *m_currentLine;
00130 SoSphere *m_sphere;
00131 SoMFColor *m_particleColor;
00132 } ;
00133
00134
00135
00136 #endif
00137
00138
00139