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_STREAMTADPOLEMOTION_
00025 #define _PO_STREAMTADPOLEMOTION_
00026
00027 #include <MeshViz/3Ddata/PoStreamParticleMotion.h>
00028 #include <Inventor/fields/SoSFFloat.h>
00029 #include <Inventor/fields/SoSFColor.h>
00030
00090 class PoStreamTadpoleMotion : public PoStreamParticleMotion {
00091
00092 SO_KIT_HEADER(PoStreamTadpoleMotion) ;
00093
00094
00095 SO_KIT_CATALOG_ENTRY_HEADER(groupStreamTadpoleMotion) ;
00096
00097
00098 public:
00099
00103 PoStreamTadpoleMotion();
00104
00108 virtual void rebuild();
00109
00113 SoSFFloat width;
00114
00118 SoSFFloat lengthFactor;
00119
00123 SoSFColor backColor;
00124
00129 SoSFColor particleColor;
00130
00131
00132 private:
00133 static void initClass() ;
00134 static void exitClass() ;
00135
00136 private:
00137
00138 virtual ~PoStreamTadpoleMotion() ;
00139
00140
00141 virtual void setDefaultOnNonWritingFields();
00142 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
00143
00144 private:
00145
00146 FieldSensorList m_fieldSensorList ;
00147
00148
00149 SoFieldList m_fieldList ;
00150
00151
00152 void newAnimator(SoGroup *group, SoLineSet *line_set,
00153 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
00154 SoMFColor *particle_color);
00155 void endAnimator(SoGroup *group, SoLineSet *line_set,
00156 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
00157 SoMFColor *particle_color);
00158 void newFrame(SoGroup *frame, int frame_ind);
00159 void endFrame(SoGroup *frame, int frame_ind);
00160 void newLine(SoGroup *line, int line_ind);
00161 void endLine(SoGroup *line, int line_ind);
00162 void newParticle(const SbVec3f &pos, const SbVec3f &speed, const SbVec3f &norm, const SbColor *color, int ind);
00163
00164 int m_lineNumPoints;
00165 SoCoordinate3 *m_lineCoordinate;
00166
00167 } ;
00168
00169
00170
00171 #endif
00172
00173
00174