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_STREAMLINEMOTION_
00025 #define _PO_STREAMLINEMOTION_
00026
00027 #include <MeshViz/3Ddata/PoStreamParticleMotion.h>
00028 #include <Inventor/fields/SoSFFloat.h>
00029 #include <Inventor/fields/SoSFColor.h>
00030
00077 class PoStreamLineMotion : public PoStreamParticleMotion {
00078
00079 SO_KIT_HEADER(PoStreamLineMotion) ;
00080
00081
00082 SO_KIT_CATALOG_ENTRY_HEADER(groupStreamLineMotion) ;
00083
00084
00085 public:
00086
00090 PoStreamLineMotion();
00091
00095 virtual void rebuild();
00096
00097
00098
00103 SoSFFloat lineWidth;
00104
00108 SoSFColor lineColor;
00109
00114 SoSFColor particleColor;
00115
00116
00117 private:
00118 static void initClass() ;
00119 static void exitClass() ;
00120
00121 private:
00122 virtual ~PoStreamLineMotion() ;
00123
00124
00125 virtual void setDefaultOnNonWritingFields();
00126 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
00127
00128 private:
00129 FieldSensorList m_fieldSensorList ;
00130
00131
00132 SoFieldList m_fieldList ;
00133
00134
00135 void newAnimator(SoGroup *group, SoLineSet *line_set,
00136 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
00137 SoMFColor *particle_color);
00138 void endAnimator(SoGroup *group, SoLineSet *line_set,
00139 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
00140 SoMFColor *particle_color);
00141 void newFrame(SoGroup *frame, int frame_ind);
00142 void endFrame(SoGroup *frame, int frame_ind);
00143 void newLine(SoGroup *line, int line_ind);
00144 void endLine(SoGroup *line, int line_ind);
00145 void newParticle(const SbVec3f &pos, const SbVec3f &speed, const SbVec3f &norm, const SbColor *color, int ind);
00146
00147
00148 int m_numPoints;
00149
00150 } ;
00151
00152
00153
00154 #endif
00155
00156
00157