Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameIndex
"Particle UV"0
"Particle UW"1
"Particle VW"2
"Velocity Modulus"3
"Velocity Vx"4
"Velocity Vy"5
"Velocity Vz"6
"Velocity Vx Vy"7
"Velocity Vx Vz"8
"Velocity Vy Vz"9
"Force Modulus"10
"Force Fx"11
"Force Fy"12
"Force Fz"13
"Force Fx Fy"14
"Force Fx Fz"15
"Force Fy Fz"16
"Vorticity Modulus"17
"Vorticity wx"18
"Vorticity wy"19
"Vorticity wz"20
"Vorticity wx wy"21
"Vorticity wx wz"22
"Vorticity wy wz"23
"Normal Nx"24
"Normal Ny"25
"Normal Nz"26
"Normal Nx Ny"27
"Normal Nx Nz"28
"Normal Ny Nz"29
"No. neighbors"30
"Age"31
"Isolation Time"32
"Viscosity"33
"Density"34
"Pressure"35
"Mass"36
"Temperature"37
"ID"38

 

 

"FileName"

Name of the file that contains particles data. It is a NULL terminated string.

...

Particle data can come whether in a file or internally stored in the .mxs file. If a filename is not supplied, the extension checks for internal data, and if successful, loads it. This parameter is a linear array of floats xyzxyzxyzxyzxyz...., whose length is 3*numberOfParticles.

Example:

Code Block
languagecpp
int numParticles = 4;
float points[ 3*4 ];
for( int idx = 0; idx < numParticles; idx++ )
{
	points[ 3*idx + 0 ] = (float)idx;
	points[ 3*idx + 1 ] = (float)idx;
	points[ 3*idx + 2 ] = (float)idx;
}
extParam->setFloatArray( "PARTICLE_POSITIONS", points, 3*numParticles );
 

"PARTICLE_SPEEDS"

Linear array of particle speeds, floating point numbers, needed to enable calculation of motion blur: VxVyVzVxVyVzVxVyVz...., whose length is 3*numberOfParticles.

Example:

Code Block
languagecpp
int numParticles = 4;
float speeds[ 3*4 ];
for( int idx = 0; idx < numParticles; idx++ )
{
 speeds[ 3*idx + 0 ] = (float)idx;
 speeds[ 3*idx + 1 ] = (float)idx;
 speeds[ 3*idx + 2 ] = (float)idx;
}
extParam->setFloatArray( "PARTICLE_SPEEDS", speeds, 3*numParticles );


"PARTICLE_RADII"

Linear array of particle radii, floating point numbers: rrrrrrr.... The length of this array can be either 1 or numParticles. If only one radius is given , it is applied to all the particles, otherwise each particle gets its own radius.

Example:

Code Block
languagecpp
//Each particle its own radius
int numParticles = 4;
float radius[ 4 ];
for( int idx = 0; idx < numParticles; idx++ )
{
 radius[ idx ] = (float)idx + 0.01f;
}
extParam->setFloatArray( "PARTICLE_RADII", radius, numParticles );

//One radius for all particles
float r = 0.4f;
setFloatArray( "PARTICLE_RADII", &r, 1 );


"PARTICLE_IDS"

Linear array of particle IDs, needed to enable coherent calculation of multipoint. It is an integer array.

Example:

Code Block
languagecpp
int numParticles = 3;
int ids[ 3 ];
ids[ 0 ] = 23;
ids[ 1 ] = 9;
ids[ 2 ] = 51;

extParam->setIntArray( "PARTICLE_IDS", ids, numParticles );