Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PoStreamSphereMotion.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PO_STREAMSPHEREMOTION_
25#define _PO_STREAMSPHEREMOTION_
26
27#include <MeshViz/3Ddata/PoStreamParticleMotion.h>
28#include <Inventor/fields/SoSFBool.h>
29#include <Inventor/nodes/SoSphere.h>
30
72
73 SO_KIT_HEADER(PoStreamSphereMotion) ;
74
75 /* Define fields for new parts */
76 SO_KIT_CATALOG_ENTRY_HEADER(groupStreamSphereMotion) ;
77
78
79 public:
80
85
89 virtual void rebuild();
90
95
96 /*----------------------------------------------------------------------------*/
97 private:
98 static void initClass() ;
99 static void exitClass() ;
100
101 private:
102 // Destructor
103 virtual ~PoStreamSphereMotion() ;
104
105 // Methods
106 virtual void setDefaultOnNonWritingFields();
107 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
108
109 private:
110 // Sensors
111 FieldSensorList m_fieldSensorList ;
112
113 // List of fields defined in this class
114 SoFieldList m_fieldList ;
115
116 // method to build the frames to be animated
117 void newAnimator(SoGroup *group, SoLineSet *line_set,
118 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
119 SoMFColor *particle_color);
120 void endAnimator(SoGroup *group, SoLineSet *line_set,
121 SoCoordinate3 *particle_coord, SoCoordinate3 *particle_speed,
122 SoMFColor *particle_color);
123 void newFrame(SoGroup *frame, int frame_ind);
124 void endFrame(SoGroup *frame, int frame_ind);
125 void newLine(SoGroup *line, int line_ind);
126 void endLine(SoGroup *line, int line_ind);
127 void newParticle(const SbVec3f &pos, const SbVec3f &speed, const SbVec3f &norm, const SbColor *color, int ind);
128
129 SoGroup *m_currentLine;
130 SoSphere *m_sphere;
131 SoMFColor *m_particleColor;
132} ;
133
134/*----------------------------------------------------------------------------*/
135
136#endif /* _PO_STREAMSPHEREMOTION_ */
137
138
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Animation of particles a...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Animation of sphere part...
PoStreamSphereMotion()
Constructor.
SoSFFloat sphereRadius
Defines the radius of each sphere drawn.
virtual void rebuild()
Forces node-kit rebuilding.
Color vector class.
Definition SbColor.h:82
3D vector class.
Definition SbVec.h:932
Coordinate point node.
Maintains a list of pointers to fields.
Definition SoFieldList.h:72
Base class for all group nodes.
Definition SoGroup.h:122
Polyline shape node.
Definition SoLineSet.h:190
Multiple-value field containing any number of RGB colors stored as three floats.
Definition SoMFColor.h:98
Field containing a floating-point value.
Definition SoSFFloat.h:78
Sphere shape node.
Definition SoSphere.h:128
int SbBool
Boolean type.
Definition SbBase.h:87