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_STREAMPARTICLEMOTION_
00025 #define _PO_STREAMPARTICLEMOTION_
00026
00027 #include <MeshViz/3Ddata/PoBaseStreamLine.h>
00028 #include <Inventor/fields/SoSFBool.h>
00029
00030
00031 class SoLineSet;
00032
00100 class PoStreamParticleMotion : public PoBaseStreamLine {
00101
00102 SO_KIT_HEADER(PoStreamParticleMotion) ;
00103
00104
00105 public:
00106
00107
00108
00113 SoSFInt32 pulseFrequency;
00114
00119 SoSFFloat shiftStart;
00120
00125 SoSFFloat timeStep;
00126
00132 SoSFBool isStartRandomized;
00133
00138 SoSFBool isBlinking;
00139
00144 SoSFInt32 viewFrame;
00145
00150 SoSFFloat blinkSpeed;
00151
00152
00153 private:
00154 static void initClass() ;
00155 static void exitClass() ;
00156
00157 private:
00158 PoStreamParticleMotion();
00159
00160
00161 virtual ~PoStreamParticleMotion() ;
00162
00163
00164 virtual void setDefaultOnNonWritingFields();
00165 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
00166
00167 void saveSpeed(PiStreamPath &stream_path, SbVec3f &speed);
00168 void saveTime(PiStreamPath &stream_path, float time);
00169
00170 void rebuildFrames( const SbString& part_name );
00171 SbBool modifyBlinkerParams( const SbString& part_name );
00172
00173 SbBool fieldsHaveChanged();
00174
00175 PiStreamPath *m_streamPath;
00176 int m_allocStreamPath;
00177
00178 private:
00179 FieldSensorList m_fieldSensorList ;
00180
00181
00182 SoFieldList m_fieldList ;
00183
00184
00185 virtual void newAnimator(SoGroup *group, SoLineSet *line_set,
00186 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
00187 SoMFColor *particle_color);
00188 virtual void endAnimator(SoGroup *group, SoLineSet *line_set,
00189 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
00190 SoMFColor *particle_color);
00191 virtual void newFrame(SoGroup *frame, int frame_ind);
00192 virtual void endFrame(SoGroup *frame, int frame_ind);
00193 virtual void newLine(SoGroup *line, int line_ind);
00194 virtual void endLine(SoGroup *line, int line_ind);
00195 virtual void newParticle(const SbVec3f &pos, const SbVec3f &speed, const SbVec3f &norm, const SbColor *color, int ind);
00196
00197 } ;
00198
00199
00200
00201 #endif
00202
00203
00204