Gravity Engine 12.0
Unity Asset for Gravity
Loading...
Searching...
No Matches
IGravityParticlesInit Interface Reference

Interface defining methods to be implemented to define particle positions and velocities for GravityParticles. More...

Inheritance diagram for IGravityParticlesInit:
DustBall DustBox DustOrbit DustRing ExplosionFromNBody

Public Member Functions

void InitNewParticles (int fromParticle, int toParticle, ref double[,] r, ref double[,] v)
 Provide the initial positions and velocity for a range of particles. This method will be called as particles are created by the particle system. The implementing class must fill in the r[,] and v[,] arrays for the range specified. These arrays are indexed by [particle_num, dimension] where dimension 0,1,2 correspond to x,y,z.
 

Detailed Description

Interface defining methods to be implemented to define particle positions and velocities for GravityParticles.

Member Function Documentation

◆ InitNewParticles()

void IGravityParticlesInit.InitNewParticles ( int  fromParticle,
int  toParticle,
ref double  r[,],
ref double  v[,] 
)

Provide the initial positions and velocity for a range of particles. This method will be called as particles are created by the particle system. The implementing class must fill in the r[,] and v[,] arrays for the range specified. These arrays are indexed by [particle_num, dimension] where dimension 0,1,2 correspond to x,y,z.

See the DustBox script for a sample usage of this interface.

Parameters
fromParticleFrom particle number.
toParticleTo particle number.
r(out) 2D array [numParticles, 3] to hold physics position (x,y,z) per particle
v(out) 2D array [numParticles, 3] to hold velocity (x,y,z) per particle

Implemented in ExplosionFromNBody, DustBox, DustBall, DustOrbit, and DustRing.


The documentation for this interface was generated from the following file: