Exemple #1
0
void PolicyDestroy(Policy *policy)
{
    if (policy)
    {
        DeleteBundles(policy->bundles);
        DeleteBodies(policy->bodies);
        free(policy->current_namespace);
        free(policy);
    }
}
Exemple #2
0
int main()
{
    PopulateBodyVectorDisk(&Bodies, NumParticles, SimWidth, SimHeight, DiskRadiusMax, DiskRadiusMin, ObjectMassMin, ObjectMassMax, GalaticCenterMass);

        if (!IsPaused)  //These will not if the simulation is paused
        {
            AttractToCenter(Bodies, SimWidth, SimHeight, GalaticCenterMass);
            UpdateBodies(Bodies);
            ResetForces(Bodies);
            GlobalNode.Reset();
            GlobalNode.SetParam(Bodies, SimWidth, SimHeight);
            OctreeBodyAttraction();
        }

    DeleteBodies(Bodies);
}
// Triggered by domain after make step
void TurbulentDispersionScene_4Types::AfterMakeStep(dReal a)
{
    //delete particles which hit ground. and store information about them in the file
    DeleteBodies(true);
}